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 Engine::on_prepare_block, call randomness and validator set. #82

Closed
wants to merge 2 commits into from

Conversation

afck
Copy link
Collaborator

@afck afck commented Jan 31, 2019

This adds an Engine::on_prepare_block method that is called from within the miner right after a new block for mining has been opened. The transactions it returns are put directly into the block, without going through the queue.

This change also moves the calls to the randomness and validator set contracts into on_prepare_block, but the latter still puts the transactions in the queue for now.

See #75.

@afck
Copy link
Collaborator Author

afck commented Jan 31, 2019

Closing this for now; as discussed, let's keep putting transactions into the queue: that at least is more robust in cases where e.g. one validator is skipped multiple times.

@afck afck closed this Jan 31, 2019
@varasev
Copy link

varasev commented Jan 31, 2019

Closing this for now; as discussed, let's keep putting transactions into the queue: that at least is more robust in cases where e.g. one validator is skipped multiple times.

@afck I forgot to mention that afck-new-block solved the issue I wrote in Slack about (I mean Block import failed for #2). The afck-new-block branch solved this but if we don't merge this into aura-pos, the error will still occur.

@afck
Copy link
Collaborator Author

afck commented Jan 31, 2019

Right! Now I'm confused why it solved that, though. 🤔
But at least we know that it was the first commit that did, and not the second…

@varasev
Copy link

varasev commented Jan 31, 2019

Yes, we need the changes from this commit: 7e9a265

@afck
Copy link
Collaborator Author

afck commented Feb 4, 2019

I can't reopen (probably because I changed the branch), so I created #89.

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