Skip to content

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

Open
wants to merge 3 commits into
base: juanmardefago/horizon-stage-1
Choose a base branch
from

Conversation

tmigone
Copy link
Member

@tmigone tmigone commented May 8, 2025

No description provided.

Comment on lines 54 to 66
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()
}

Copy link
Collaborator

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 😅

Comment on lines +229 to +231
provision.queryFeeCut = BigInt.fromI32(1000000)
provision.indexingFeeCut = BigInt.fromI32(1000000)
provision.indexingRewardsCut = BigInt.fromI32(1000000)
Copy link
Collaborator

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

tmigone added 2 commits May 9, 2025 16:25
Signed-off-by: Tomás Migone <[email protected]>
Signed-off-by: Tomás Migone <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants