-
Notifications
You must be signed in to change notification settings - Fork 48
feat: invert cuts to keep meaning consistent with pre-horizon #290
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: juanmardefago/horizon-stage-1
Are you sure you want to change the base?
Conversation
Signed-off-by: Tomás Migone <[email protected]>
src/mappings/staking.ts
Outdated
export function handleDelegationParametersUpdated(event: DelegationParametersUpdated): void { | ||
let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) | ||
let indexer = createOrLoadLegacyIndexer(event.params.indexer, event.block.timestamp) | ||
indexer.indexingRewardCut = event.params.indexingRewardCut.toI32() | ||
indexer.queryFeeCut = event.params.queryFeeCut.toI32() | ||
indexer.delegatorParameterCooldown = event.params.cooldownBlocks.toI32() | ||
indexer.lastDelegationParameterUpdate = ( | ||
addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber! | ||
).toI32() | ||
indexer = updateAdvancedIndexerMetrics(indexer as Indexer) | ||
indexer.save() | ||
} | ||
|
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.
I would not delete this at all, since we essentially lose historical tracking of delegation cuts. Particularly given that we are now moving all of the new delegation cuts to line up with these ones 😅
provision.queryFeeCut = BigInt.fromI32(1000000) | ||
provision.indexingFeeCut = BigInt.fromI32(1000000) | ||
provision.indexingRewardsCut = BigInt.fromI32(1000000) |
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.
Do we want to move all delegation cuts to the legacy version? Or do we keep Provision level ones lined up with Horizon, and Indexer level ones lined up with Legacy?
I think the latter is better, since it allows the UIs to move to "Stage 2"-like cuts or keep Legacy cuts by using different entities, and keeping both as Legacy just means that once we move to a more generic network subgraph (Stage 2) we'll have extra work that needs to be timed correctly
Signed-off-by: Tomás Migone <[email protected]>
Signed-off-by: Tomás Migone <[email protected]>
No description provided.