-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add support for increased delegated stakes #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| -- Add replacement_hash field to dag_token_locks | ||
|
|
||
| ALTER TABLE dag_token_locks | ||
| ADD COLUMN replacement_hash varchar NULL; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| -- Add current_token_lock_hash and current_amount fields to delegate_stake_create_events | ||
|
|
||
| ALTER TABLE delegate_stake_create_events | ||
| ADD COLUMN current_token_lock_hash varchar NULL, | ||
| ADD COLUMN current_amount int8 NULL; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| -- Add current_token_lock_hash and current_amount fields to delegate_stake_withdraw_events | ||
|
|
||
| ALTER TABLE delegate_stake_withdraw_events | ||
| ADD COLUMN current_token_lock_hash varchar NULL, | ||
| ADD COLUMN current_amount int8 NULL; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ALTER TABLE delegate_stake_create_events ADD COLUMN created_at_epoch int8 NULL; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,8 @@ const delegateStakeCreateResponse = (event) => ({ | |
| timestamp: event.created_at, | ||
| globalSnapshotHash: event.global_snapshot_hash, | ||
| globalSnapshotOrdinal: event.global_snapshot?.ordinal, | ||
| currentTokenLockHash: event.lock_reference_hash, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This uses Should be: currentTokenLockHash: event.current_token_lock_hash,(The previous review flagged this too -- just confirming with the tessellation type reference: |
||
| currentAmount: event.current_amount, | ||
| }); | ||
|
|
||
| const delegateStakeCreateResponses = (txs) => | ||
|
|
@@ -70,6 +72,8 @@ const delegateStakeWithdrawResponse = (event) => ({ | |
| timestamp: event.created_at, | ||
| globalSnapshotHash: event.global_snapshot_hash, | ||
| globalSnapshotOrdinal: event.global_snapshot?.ordinal, | ||
| currentTokenLockHash: event.lock_reference_hash, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same bug here -- |
||
| currentAmount: event.current_amount, | ||
| }); | ||
|
|
||
| const delegateStakeWithdrawResponses = (txs) => | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re: naming -- snapshot-streaming PR #114 creates this column as
replace_token_lock_refin its SQL schema (sql/snapshot.sql:358), notreplacement_hash. Whichever name we pick, both repos need to agree on it or the block_explorer won't be able to read data that snapshot-streaming writes.I'd suggest
replace_token_lock_refsince it matches the tessellation Scala type field name (TokenLock.replaceTokenLockRefattokenLock.scala:90onfeature/increase-delegated-stake).