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

core/systemcontracts: include BEP-319 on kepler hardfork #1973

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

buddh0
Copy link
Collaborator

@buddh0 buddh0 commented Nov 7, 2023

Description

core/systemcontracts: include BEP-319 on kepler hardfork

Rationale

two contents in kepler hard fork

  1. BEP-319: Optimize the incentive mechanism of the Fast Finality feature
  2. increase maxsize of validators to 100

related code is implemented in bsc-genesis-contract

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@buddh0 buddh0 changed the base branch from master to develop November 7, 2023 10:21
@buddh0 buddh0 force-pushed the kepler_hardfork branch 6 times, most recently from 675f7a6 to 54b4257 Compare November 7, 2023 13:16
@buddh0 buddh0 added the wip work in process label Nov 8, 2023
@buddh0 buddh0 marked this pull request as draft November 8, 2023 12:55
@buddh0 buddh0 changed the title core/systemcontracts: update SlashContract for kepler hardfork core/systemcontracts: update systemcontracts for kepler hard fork Nov 9, 2023
@buddh0 buddh0 force-pushed the kepler_hardfork branch 2 times, most recently from f73f8e9 to a9e9b1e Compare November 16, 2023 08:03
@buddh0 buddh0 changed the title core/systemcontracts: update systemcontracts for kepler hard fork core/systemcontracts: include BEP-319 on kepler hardfork Nov 16, 2023
@buddh0 buddh0 marked this pull request as ready for review November 21, 2023 10:44
@buddh0 buddh0 added r4r ready for review and removed wip work in process labels Nov 21, 2023
@@ -74,7 +74,11 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
misc.ApplyDAOHardFork(statedb)
}
// Handle upgrade build-in system contract code
systemcontracts.UpgradeBuildInSystemContract(p.config, block.Number(), statedb)
lastBlock := p.bc.GetBlockByHash(block.ParentHash())
if lastBlock == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thinking about edge case here, there is no need to check if the block itself is nil similar to how we are checking its parent to be nil?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the parent may be pruned.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but the block itself is always non-nil in this case right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. there is only two places call the func Process ,except in test cases
and they all check block to be non-nill before calling Process

@buddh0 buddh0 requested a review from galaio November 22, 2023 10:56
@buddh0 buddh0 merged commit cd0356b into bnb-chain:develop Nov 22, 2023
5 checks passed
@buddh0 buddh0 deleted the kepler_hardfork branch December 12, 2023 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r4r ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants