Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fast path for importing locally-authored or consensus-checked blocks #1232

Closed
rphmeier opened this issue Dec 7, 2018 · 3 comments · Fixed by #3860
Closed

Fast path for importing locally-authored or consensus-checked blocks #1232

rphmeier opened this issue Dec 7, 2018 · 3 comments · Fixed by #3860
Assignees
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Milestone

Comments

@rphmeier
Copy link
Contributor

rphmeier commented Dec 7, 2018

Right now, we have a block-authoring pattern in Aura where we a) build the block and b) re-execute and import.

In Rhododendron, we either build a proposal or evaluate someone else's and then re-execute and import.

In both situations, there should be a shortcut-path through BlockImport for blocks which already have been executed.

@rphmeier rphmeier added the I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. label Dec 7, 2018
@rphmeier rphmeier added this to the 1.0 (final) milestone Dec 7, 2018
@rphmeier rphmeier added Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. labels Dec 10, 2018
@joepetrowski joepetrowski self-assigned this Dec 14, 2018
@gavofyork gavofyork modified the milestones: 1.0 (final), 1.x series Dec 18, 2018
@gnunicorn
Copy link
Contributor

gnunicorn commented Dec 18, 2018

and b) re-execute and import.

You sure? Because the importer does commit the changes (even from the proposer) for said block to the database and the next time execute_and_import is triggered with the same block, it should stop early with the success-code AlreadyInChain, no?

What conditions would lead to us executing the block twice? Which code path even allows for that to happen?

@rphmeier
Copy link
Contributor Author

As far as i know, we don't pass the state changes generated by building the block to the client. And execute_and_import_block calls the execute_block api, which, if this was a locally authored block, is a re-execution.

@rphmeier rphmeier removed Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. labels Jan 4, 2019
@rphmeier
Copy link
Contributor Author

rphmeier commented Jan 4, 2019

This will require altering the Proposer trait so some kind of "execution result" is returned as opposed to just the block.

@rphmeier rphmeier added the Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. label Jan 4, 2019
@joepetrowski joepetrowski removed their assignment Sep 24, 2019
@gavofyork gavofyork modified the milestones: 2.x series, As-and-when Nov 28, 2019
@bkchr bkchr self-assigned this Nov 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Projects
None yet
5 participants