-
Notifications
You must be signed in to change notification settings - Fork 19.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consensus: improve consensus engine definition
This PR improves the Finalize and FinalizedAndAssemble definition, clearly stats that: - In Finalize function, a serial of state operations will be applied according to consensus rules, but only passed in statedb is mutated and the root hash can be checked and compared later on. This function should be used in block processing(receive a block from network and apply it locally) but not block generation. - In FinalizeAndAssemble function, except applying post-transaction state mutatations, the block needs to be assembled with the latest state root computed. This function should be used in block generation only.
- Loading branch information
1 parent
789de23
commit e4364ec
Showing
4 changed files
with
22 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters