Skip to content

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

Merged
buddh0 merged 1 commit intobnb-chain:developfrom
buddh0:kepler_hardfork
Nov 22, 2023
Merged

core/systemcontracts: include BEP-319 on kepler hardfork#1973
buddh0 merged 1 commit intobnb-chain:developfrom
buddh0:kepler_hardfork

Conversation

@buddh0
Copy link
Copy Markdown
Contributor

@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 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 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
// 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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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
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