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

feat: add new fork block and precompile contract for BEP294 and BEP299 #2047

Merged
merged 36 commits into from
Feb 26, 2024

Conversation

unclezoro
Copy link
Collaborator

Description

This pr is to support

  • BEP-294: BSC Native Staking after BC Fusion
  • BEP-299: Token Migration after BC Fusion

Rationale

See 4. Motivation in BEP-294, BEP-299,

Changes

Notable changes:

  • add new precompile contract verifyDoubleSignEvidence and secp256k1SignatureRecover
  • add new systemTx to parlia to update validatorSet everyday after the fusion fork
  • add upgrade setting

.github/workflows/lint.yml Outdated Show resolved Hide resolved
pythonberg1997 and others added 19 commits December 8, 2023 16:20
chore: merge with develop branch
# Conflicts:
#	params/config.go
chore: merge with develop branch
# Conflicts:
#	core/systemcontracts/upgrade.go
#	params/config.go
chore: merge with develop branch
* fix: adjusted the timing of `UpgradeBuildInSystemContract`

* fix review comments

* fix review comments

* fix review comments

* fix review comments

* add `UpgradeBuildInSystemContract` to `traceBlock`

* add `UpgradeBuildInSystemContract` to `traceBlock`

* add `UpgradeBuildInSystemContract` to all trace functions
consensus/parlia/parlia.go Outdated Show resolved Hide resolved
for idx, tx := range block.Transactions() {
// upgrade build-in system contract before system txs if Feynman is enabled
if beforeSystemTx {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it ok to move this posa, ok := eth.Engine().(consensus.PoSA) before the loop?

* fix: adjust the timing of initializing Feynman system contracts

* fix test case
Copy link
Collaborator

@zzzckck zzzckck left a comment

Choose a reason for hiding this comment

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

LGTM

core/vm/contracts.go Outdated Show resolved Hide resolved
core/vm/contracts.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@zzzckck zzzckck left a comment

Choose a reason for hiding this comment

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

check the latest comments

params/protocol_params.go Outdated Show resolved Hide resolved
zzzckck
zzzckck previously approved these changes Feb 6, 2024
@unclezoro unclezoro merged commit 73f27a5 into develop Feb 26, 2024
6 of 7 checks passed
@fslmultiservice22
Copy link

Ottimo.

@WARbitCOIN
Copy link

Description

This pr is to support

  • BEP-294: BSC Native Staking after BC Fusion
  • BEP-299: Token Migration after BC Fusion

Rationale

See 4. Motivation in BEP-294, BEP-299,

Changes

Notable changes:

  • add new precompile contract verifyDoubleSignEvidence and secp256k1SignatureRecover
  • add new systemTx to parlia to update validatorSet everyday after the fusion fork
  • add upgrade setting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants