-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1975 from AntelopeIO/gh_1941
Changes to support new `block_header_state` and `block_state`
- Loading branch information
Showing
59 changed files
with
3,394 additions
and
2,606 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
The following diagram describes Leap block production, as implemented in `libraries/chain/controller.cpp`: | ||
|
||
```mermaid | ||
flowchart TD | ||
pp[producer_plugin] --> D | ||
A("replay()"):::fun --> B("replay_push_block()"):::fun | ||
B --> E("maybe_switch_forks()"):::fun | ||
C("init()"):::fun ---> E | ||
C --> A | ||
D("push_block()"):::fun ---> E | ||
subgraph G["apply_block()"] | ||
direction TB | ||
start -- "stage = Ø" --> sb | ||
sb("start_block()"):::fun -- "stage = building_block" --> et | ||
et["execute transactions" ] -- "stage = building_block" --> fb("finalize_block()"):::fun | ||
fb -- "stage = assembled block" --> cb["add transaction metadata and create completed block"] | ||
cb -- "stage = completed block" --> commit("commit_block() (where we [maybe] add to fork_db and mark valid)"):::fun | ||
end | ||
B ----> start | ||
E --> G | ||
D --> F("log_irreversible()"):::fun | ||
commit -- "stage = Ø" --> F | ||
F -- "if in irreversible mode" --> G | ||
classDef fun fill:#f96 | ||
``` |
Oops, something went wrong.