Skip to content
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

Delegation compliance, count all blocks in epoch #8884

Merged
merged 2 commits into from May 17, 2021

Conversation

psteckler
Copy link
Member

@psteckler psteckler commented May 14, 2021

In the delegation compliance app, the number of blocks produced for a given block producer was less than the number reported by Gareth. That was due to the change to consider only payments between slots 3500 of the current epoch and slot 3500 of the next epoch, to avoid double-attribution of payments to epochs.

Instead, obtain all block ids for slots between the start of the current epoch and slot 3500 of the following epoch along the canonical chain. To get the number of blocks produced, obtain block ids for produced blocks in current epoch, filtered to the canonical chain. For payments, filter the block ids between slot 3500 of the current epoch and slot 3500 of the following epoch and membership in the canonical chain.

Tested by running with a payout address where the result mismatched Gareth's result, new result did match.

Update: also consider indirect payments to a payout address, neither from the delegatee block producer nor from a coinbase receiver.

@psteckler psteckler added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label May 14, 2021
Copy link
Member

@bkase bkase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@mrmr1993 mrmr1993 merged commit d954c2b into compatible May 17, 2021
@mrmr1993 mrmr1993 deleted the fix/count-all-blocks branch May 17, 2021 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants