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

add AuRa's empty step reward type #2596

Merged
merged 2 commits into from
Aug 22, 2019
Merged

Conversation

ayrat555
Copy link
Contributor

Instead of producing empty blocks nodes in Aura consensus protocol
broadcast an EmptyStep(step, parent_hash) message.
https://github.com/paritytech/wiki/blob/master/Aura.md#empty-steps

resolves #2347

Changelog

  • add AuRa's empty step reward type

Instead of producing empty blocks nodes in Aura consensus protocol
broadcast an EmptyStep(step, parent_hash) message.
https://github.com/paritytech/wiki/blob/master/Aura.md#empty-steps
@coveralls
Copy link

coveralls commented Aug 20, 2019

Pull Request Test Coverage Report for Build e2626d9a-28e7-4ba8-84ec-565506f11c4e

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.08%) to 79.047%

Totals Coverage Status
Change from base Build 0978d318-74bd-414a-8d12-2434e16ef351: 0.08%
Covered Lines: 5195
Relevant Lines: 6572

💛 - Coveralls

Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

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

@ayrat555 could you please test this? IIRC these changes are not enough to avoid errors.

@ayrat555
Copy link
Contributor Author

@vbaranov you suggested returning nil previous time. which caused address_type: "can't be blank".
Let's wait for @S3bb1 's feedback. I'll try deploying Aura chain with emptyStep myself later today if we don't get any feedback

@S3bb1
Copy link

S3bb1 commented Aug 21, 2019

I'll try it today and give feedback If the errors still occur

@S3bb1
Copy link

S3bb1 commented Aug 21, 2019

Looks good! No error occurs anymore :) Thanks!

This also more than halves the CPU/Network usage because the "erroring" Block now must not be retried

@@ -182,4 +182,5 @@ defmodule EthereumJSONRPC.Parity.FetchedBeneficiaries do
defp get_address_type(reward_type, index) when reward_type == "external" and index == 10, do: :validator
defp get_address_type(reward_type, _index) when reward_type == "block", do: :validator
defp get_address_type(reward_type, _index) when reward_type == "uncle", do: :uncle
defp get_address_type(reward_type, _index) when reward_type == "emptyStep", do: :validator
Copy link
Member

Choose a reason for hiding this comment

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

@ayrat555 I wonder, why :validator and not null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vbaranov I think because it's validators who produce empty steps

@vbaranov vbaranov self-requested a review August 22, 2019 17:15
@vbaranov vbaranov merged commit d19e481 into master Aug 22, 2019
@vbaranov vbaranov deleted the ab-add-empty-step-support branch August 22, 2019 17:15
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.

Add support of empty steps in AuRa consensus protocol
6 participants