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

IF: Update fork database fork-choice rule - complex #2265

Merged
merged 28 commits into from
Mar 1, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented Feb 27, 2024

Update fork_database for-choice rule.
Computed fields for index (in order):

  1. next_core_metadata.last_final_block_num
  2. next_core_metadata.latest_qc_claim_block_num
  3. block timestamp
  4. block ID (as final tie breaker to ensure uniqueness)

Potentially switches forks before starting to produce a block. Does not interrupt producing blocks once block production has started.

Includes some misc performance improvements to fork_database.

Resolves #2125

@heifner heifner added the OCI Work exclusive to OCI team label Feb 27, 2024
@heifner heifner requested review from greg7mdp and linh2931 February 27, 2024 14:51
@heifner heifner linked an issue Feb 27, 2024 that may be closed by this pull request
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: INTERNALS
summary: Update for database for-choice rules with the following computed fields, listed in order of importance, next_core_metadata.last_final_block_num, next_core_metadata.latest_qc_claim_block_num, block timestamp, block ID
Note:end

libraries/chain/include/eosio/chain/hotstuff/hotstuff.hpp Outdated Show resolved Hide resolved
libraries/chain/fork_database.cpp Outdated Show resolved Hide resolved
libraries/chain/fork_database.cpp Show resolved Hide resolved
libraries/chain/fork_database.cpp Outdated Show resolved Hide resolved
libraries/chain/fork_database.cpp Show resolved Hide resolved
libraries/chain/controller.cpp Outdated Show resolved Hide resolved
libraries/chain/fork_database.cpp Outdated Show resolved Hide resolved
libraries/chain/fork_database.cpp Outdated Show resolved Hide resolved
@heifner heifner marked this pull request as draft February 29, 2024 20:56
@heifner heifner changed the title IF: Update fork database fork-choice rule IF: Update fork database fork-choice rule - complex Feb 29, 2024
@heifner heifner merged commit bbe24e7 into hotstuff_integration Mar 1, 2024
26 checks passed
@heifner heifner deleted the GH-2125-forkdb branch March 1, 2024 19:29
@heifner
Copy link
Member Author

heifner commented Mar 1, 2024

This was not merged. Instead #2273 was merged. It was marked as merged because #2273 built off of it.

@heifner heifner restored the GH-2125-forkdb branch March 1, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IF: Update fork-choice rule for fork database
4 participants