Skip to content

feat(internal/ethapi): implement EIP-7910 - add XDPoS_getConfig#2326

Open
gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
gzliudan:eth_config
Open

feat(internal/ethapi): implement EIP-7910 - add XDPoS_getConfig#2326
gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
gzliudan:eth_config

Conversation

@gzliudan
Copy link
Copy Markdown
Collaborator

@gzliudan gzliudan commented Apr 22, 2026

Proposed changes

Build the XDPoS config response from shared helpers that expose activation blocks, fork IDs, active fork labels, named precompiles, and active system contracts.

Expose the RPC through the XDPoS namespace and web3 extension, and document the response shape for current, next, and last block-based fork boundaries.

Add fork metadata, fork ID, and config snapshot tests to cover the new RPC payload and supporting chain-config helpers.

Ref: ethereum#32230

Types of changes

What types of changes does your code introduce to XDC network?
Put an in the boxes that apply

  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Changes that don't change source code or tests
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • revert: Revert something
  • style: Changes that do not affect the meaning of the code
  • test: Adding missing tests or correcting existing tests

Impacted Components

Which parts of the codebase does this PR touch?
Put an in the boxes that apply

  • Consensus
  • Account
  • Network
  • Geth
  • Smart Contract
  • External components
  • Not sure (Please specify below)

Checklist

Put an in the boxes once you have confirmed below actions (or provide reasons on not doing so) that

  • This PR has sufficient test coverage (unit/integration test) OR I have provided reason in the PR description for not having test coverage
  • Tested on a private network from the genesis block and monitored the chain operating correctly for multiple epochs.
  • Provide an end-to-end test plan in the PR description on how to manually test it on the devnet/testnet.
  • Tested the backwards compatibility.
  • Tested with XDC nodes running this version co-exist with those running the previous version.
  • Relevant documentation has been updated as part of this PR
  • N/A

Copilot AI review requested due to automatic review settings April 22, 2026 01:51
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b0334d9d-96ac-41d4-b6a4-fa548bcd19ae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements the EIP-7910 eth_config RPC method to return current/next/last chain configuration metadata (fork IDs, precompile names, and active system contracts), along with supporting fork helpers and tests across params/ethapi/vm.

Changes:

  • Add eth_config RPC + Web3 extension entry and tests covering placeholder fork handling and fork ID generation.
  • Introduce params/forks fork identifiers and extend params.ChainConfig with fork/system-contract helpers and fork-height enumeration.
  • Add core/forkid (EIP-2124) implementation and expose precompile names via a new Name() method on vm.PrecompiledContract.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
params/forks/forks.go New fork identifier enum + string mapping used by config helpers.
params/config.go Adds fork/system-contract helpers and ForkBlockNumbers() enumeration used for fork IDs/config.
params/config_test.go Unit tests for fork block enumeration and latest fork stage mapping.
core/forkid/forkid.go New EIP-2124 fork ID calculator using ChainConfig.ForkBlockNumbers().
core/forkid/forkid_test.go Tests fork gathering behavior for fork ID inputs.
core/vm/contracts.go Extends precompile interface with Name() and implements it across precompiles.
core/vm/XDCx_price.go Adds Name() for XDCx price precompiles to satisfy new interface.
internal/ethapi/api.go Implements BlockChainAPI.Config (eth_config) assembling fork ID + precompile/system-contract metadata.
internal/ethapi/api_test.go Adds RPC-level test for placeholder “last” fork behavior + fork ID bytes.
internal/ethapi/override/override_test.go Updates test precompile mock to satisfy new Name() method.
internal/web3ext/web3ext.go Wires web3.eth.config() to call eth_config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread params/config.go Outdated
Comment thread params/config.go Outdated
Comment thread internal/ethapi/api.go Outdated
Comment thread internal/ethapi/api_test.go Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements the EIP-7910 eth_config RPC response to expose chain configuration metadata (current/next/last), including fork IDs, named precompiles, and active system contracts, backed by new fork/config helpers.

Changes:

  • Added eth_config to BlockChainAPI, plus web3 extension wiring and unit tests.
  • Introduced fork metadata helpers (ForkBlockNumbers, LatestFork, ActiveSystemContracts) and a new core/forkid package for EIP-2124 fork IDs.
  • Extended VM precompile interface with Name() and implemented names across precompiles.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
params/forks/forks.go Adds a fork identifier enum + string mapping used by config helpers.
params/config.go Adds fork/system-contract helpers and ForkBlockNumbers() aggregation logic.
params/config_test.go Tests fork block aggregation and fork->block mapping behavior.
core/forkid/forkid.go Adds EIP-2124 fork ID computation using gathered fork block numbers.
core/forkid/forkid_test.go Tests fork gathering behavior used by fork ID computation.
core/vm/contracts.go Adds Name() to PrecompiledContract and implements names for precompiles.
core/vm/XDCx_price.go Implements Name() for XDCx price precompiles.
internal/ethapi/api.go Implements eth_config response assembly, fork ID calculation, and precompile/system contract export.
internal/ethapi/api_test.go Adds tests for eth_config fork selection and fork ID behavior.
internal/web3ext/web3ext.go Exposes eth_config via the web3 extension (web3.eth.config).
internal/ethapi/override/override_test.go Updates test precompile stub to satisfy the new Name() interface method.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/ethapi/override/override_test.go Outdated
Comment thread params/config.go Outdated
Comment thread internal/ethapi/api.go Outdated
Comment thread internal/ethapi/api.go Outdated
Comment thread internal/ethapi/api.go Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements the EIP-7910 eth_config RPC method, exposing chain fork metadata (fork IDs, named precompiles, and active system contracts) for the current/next/last effective configurations.

Changes:

  • Add eth_config RPC (and web3 extension hook) returning fork-id + precompile/system-contract metadata per effective config window.
  • Introduce fork helpers on params.ChainConfig (latest modeled fork, system contracts, fork block number gathering).
  • Add core/forkid (EIP-2124) and extend precompile interface to expose stable names; add/extend unit tests.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
params/forks/forks.go Adds fork stage enum used by chain-config helpers.
params/config.go Adds fork stage helpers, system contract selection, and ForkBlockNumbers() aggregation.
params/config_test.go Adds tests for fork-height aggregation and fork stage → block mapping.
internal/ethapi/api.go Implements BlockChainAPI.Config (eth_config) using fork heights + forkid + named precompiles.
internal/ethapi/api_test.go Adds tests for eth_config behavior and fork-height tracking.
internal/web3ext/web3ext.go Exposes eth.config() via web3 extension.
core/forkid/forkid.go Adds EIP-2124 fork ID implementation (CRC32 over genesis + fork blocks).
core/forkid/forkid_test.go Adds unit tests for fork gathering behavior used by forkid.
core/vm/contracts.go Extends PrecompiledContract with Name() and implements names for existing precompiles.
core/vm/XDCx_price.go Implements Name() for XDCx price precompiles.
internal/ethapi/override/override_test.go Updates test precompile mock to satisfy the new Name() method.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/vm/contracts.go
Comment thread params/config.go Outdated
Comment thread core/forkid/forkid.go
Comment thread internal/ethapi/api.go Outdated
Comment thread core/vm/contracts.go
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements EIP-7910 eth_config RPC response to expose current/next/last chain configuration metadata (fork IDs, named precompiles, and active system contracts), backed by new fork modeling and fork-height helpers.

Changes:

  • Add eth_config RPC method plus web3 extension wiring and API tests.
  • Introduce fork modeling helpers in params (modeled fork stages, effective fork heights, system contracts) and a new params/forks enum.
  • Add EIP-2124 fork ID implementation (core/forkid) driven by ChainConfig.ForkBlockNumbers, and extend precompile interface with Name() for named export.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
params/forks/forks.go Adds a fork enum + string names used for modeled fork stages.
params/config.go Adds modeled fork helpers, active system contracts, and ForkBlockNumbers() to produce effective fork heights.
params/config_test.go Unit tests for ForkBlockNumbers() and fork modeling behavior.
core/forkid/forkid.go Implements EIP-2124 fork ID calculation using ChainConfig.ForkBlockNumbers().
core/forkid/forkid_test.go Tests fork gathering behavior for fork ID inputs.
core/vm/contracts.go Extends PrecompiledContract with Name() and implements names for precompiles.
core/vm/XDCx_price.go Adds Name() implementations for XDCx price precompiles.
internal/ethapi/api.go Adds BlockChainAPI.Config implementing eth_config.
internal/ethapi/api_test.go Adds tests covering eth_config fork-block selection + fork ID behavior.
internal/ethapi/override/override_test.go Updates test precompile stub to satisfy new Name() interface method.
internal/web3ext/web3ext.go Exposes web3.eth.config() calling eth_config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/ethapi/api_test.go
Comment thread core/vm/contracts.go Outdated
Comment thread core/vm/contracts.go Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements the XDPoS eth_config RPC endpoint (inspired by EIP-7910) to expose fork-boundary configuration metadata, including fork IDs, named precompiles, and active system contracts, and wires it into the Web3 extension with accompanying tests and docs.

Changes:

  • Add fork scheduling helpers to params.ChainConfig (modeled fork stages + effective fork block collection).
  • Add eth_config RPC implementation and Web3 extension wiring, plus tests for fork selection and payload content.
  • Extend VM precompile interface with Name() and implement names across built-in precompiles; introduce core/forkid for EIP-2124 fork ID calculation.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
params/forks/forks.go Introduces a fork enum + string names used by chain config helpers.
params/config.go Adds effective fork height gathering (ForkBlockNumbers), modeled fork helpers, and system contract selection.
params/config_test.go Adds unit tests for fork height selection/deduplication/sentinel handling.
internal/ethapi/api.go Implements BlockChainAPI.Config (eth_config) response assembly.
internal/ethapi/api_test.go Adds tests validating block selection and response payload contents.
internal/web3ext/web3ext.go Exposes web3.eth.config() mapped to eth_config.
core/vm/contracts.go Extends PrecompiledContract with Name() and provides names for built-ins.
core/vm/XDCx_price.go Adds Name() for XDCx precompiles.
internal/ethapi/override/override_test.go Updates test precompile stub to satisfy new Name() interface requirement.
core/forkid/forkid.go Adds fork ID computation (EIP-2124) backed by ChainConfig.ForkBlockNumbers.
core/forkid/forkid_test.go Adds fork ID test coverage for fork gathering/deduplication and ID calculation.
docs/xdc/eth/eth.md Documents the new eth_config RPC method and response shape.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/ethapi/api.go Outdated
Comment thread internal/ethapi/api.go Outdated
@gzliudan gzliudan force-pushed the eth_config branch 3 times, most recently from d2f1f52 to fa223a7 Compare April 22, 2026 11:36
@gzliudan gzliudan requested a review from Copilot April 22, 2026 11:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements the XDPoS eth_config RPC method (inspired by EIP-7910) to expose fork-boundary configuration snapshots, including fork IDs, named precompiles, and active system contracts, backed by new fork-metadata helpers and tests.

Changes:

  • Add eth_config RPC endpoint and Web3 extension wiring, plus documentation of the response format.
  • Introduce fork modeling helpers on params.ChainConfig (ForkBlockNumbers, LatestFork, BlockNumber, ActiveSystemContracts) and a params/forks enum.
  • Add a core/forkid package (EIP-2124) and extend precompile contracts with Name() for named precompile reporting.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
params/forks/forks.go Introduces a fork enum and string mapping for modeled fork stages.
params/config.go Adds fork schedule helpers, modeled fork definitions, system contracts lookup, and fork-block aggregation.
params/config_test.go Adds unit tests for fork schedule aggregation, modeled fork selection, and system contracts activation.
core/forkid/forkid.go Adds fork ID computation based on genesis hash and fork block list (EIP-2124).
core/forkid/forkid_test.go Adds tests validating fork gathering and fork ID checksum evolution.
core/vm/contracts.go Extends PrecompiledContract with Name() and implements names for built-in precompiles.
core/vm/XDCx_price.go Adds Name() for XDCx price precompiles.
internal/ethapi/api.go Implements BlockChainAPI.Config (eth_config) assembling fork snapshots with fork IDs/precompiles/system contracts.
internal/ethapi/api_test.go Adds tests for eth_config block selection and payload contents/error handling.
internal/ethapi/override/override_test.go Updates test precompile mock to satisfy the new Name() interface requirement.
internal/web3ext/web3ext.go Adds web3.eth.config() wrapper calling eth_config.
docs/xdc/eth/eth.md Documents eth_config behavior, compatibility notes, and an example response.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread params/config.go
Comment thread params/config.go
Comment thread docs/xdc/eth/eth.md Outdated
@gzliudan gzliudan force-pushed the eth_config branch 2 times, most recently from 9665f58 to fd9b633 Compare April 22, 2026 15:02
@gzliudan gzliudan requested a review from Copilot April 22, 2026 15:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements the XDPoS-specific eth_config RPC (EIP-7910-inspired) to expose fork-boundary config snapshots, fork IDs, named precompiles, and active system contracts, backed by new fork/activation helpers on params.ChainConfig.

Changes:

  • Add modeled fork metadata (params/forks) and extend params.ChainConfig with fork helpers (ForkBlockNumbers, LatestFork, BlockNumber, ActiveSystemContracts).
  • Introduce core/forkid (EIP-2124) and wire fork-id + config snapshot assembly into internal/ethapi via eth_config.
  • Add precompile naming (PrecompiledContract.Name) and update docs, web3 extension, and tests.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
params/forks/forks.go Adds a modeled fork enum + string mapping used by chain-config helpers/tests.
params/config.go Adds fork activation helpers and fork height aggregation used for fork-id/config snapshots.
params/config_test.go Adds unit tests covering fork height merging/deduplication and modeled fork lookups.
core/forkid/forkid.go Adds EIP-2124 fork-id calculation based on ChainConfig.ForkBlockNumbers().
core/forkid/forkid_test.go Tests fork gathering and fork-id checksum behavior.
internal/ethapi/api.go Implements eth_config response selection and payload assembly.
internal/ethapi/api_test.go Adds coverage for eth_config block selection and payload fields.
internal/web3ext/web3ext.go Exposes eth.config() JS binding for eth_config.
docs/xdc/eth/eth.md Documents eth_config request/response and compatibility notes.
core/vm/contracts.go Extends precompile interface with Name() and provides names for built-in precompiles.
core/vm/XDCx_price.go Adds Name() to XDCx price precompiles.
internal/ethapi/override/override_test.go Updates test precompile stub to satisfy new Name() interface requirement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread params/forks/forks.go
Comment thread params/config.go
Comment thread core/vm/contracts.go Outdated
Comment thread internal/ethapi/api_test.go Outdated
@gzliudan gzliudan force-pushed the eth_config branch 6 times, most recently from 9abd2be to 2006f52 Compare April 23, 2026 11:34
@gzliudan gzliudan requested a review from Copilot April 23, 2026 11:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an XDPoS-flavored chain config RPC (inspired by EIP-7910 eth_config) by introducing shared fork modeling helpers in params, exposing named precompiles/system contracts, and wiring the endpoint through the XDPoS RPC namespace + web3 extension, with accompanying tests and docs.

Changes:

  • Introduce modeled fork identifiers (params/forks) and new ChainConfig helpers for fork activation, boundaries, and active system contracts.
  • Add internal/configapi builder used by XDPoS_getConfig, including fork-id, active forks, named precompiles, system contracts, and feature flags.
  • Extend precompile interface with Name() and update implementations/tests; add docs + test coverage for config/forkid snapshots.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
params/forks/forks.go Adds a modeled fork enum + string labels used for config reporting.
params/config.go Adds fork modeling helpers (LatestFork, ActiveForks, BlockNumber, ForkBlockNumbers, etc.) and TIPTRC21Fee checker.
params/config_test.go Adds tests covering new fork modeling helpers and boundary selection behavior.
core/forkid/forkid.go Implements fork-id calculation using ChainConfig.ForkBlockNumbers().
core/forkid/forkid_test.go Adds tests validating fork gathering/deduping and fork-id derivation.
internal/configapi/configapi.go Builds the current/next/last config snapshot payload (fork-id, active forks, precompiles, system contracts, features).
internal/configapi/configapi_test.go Tests config snapshot selection scenarios and payload contents.
consensus/XDPoS/api.go Exposes GetConfig RPC via XDPoS API using internal/configapi.
consensus/XDPoS/api_test.go Adds API test ensuring GetConfig returns expected boundary + fork-id + flags.
internal/web3ext/web3ext.go Adds web3 extension method XDPoS.getConfig -> XDPoS_getConfig.
core/vm/contracts.go Extends PrecompiledContract with Name() and provides names for built-in precompiles.
core/vm/XDCx_price.go Adds Name() for XDCx price precompiles.
internal/ethapi/override/override_test.go Updates test precompile stub to satisfy new Name() requirement.
docs/xdc/XDPoS/XDPoS.md Documents XDPoS_getConfig response shape and provides an example payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread params/config_test.go
Comment thread core/forkid/forkid_test.go
Comment thread docs/xdc/XDPoS/XDPoS.md Outdated
Comment thread docs/xdc/XDPoS/XDPoS.md
Comment thread docs/xdc/XDPoS/XDPoS.md
Build the XDPoS config response from shared helpers that expose activation blocks, fork IDs, active fork labels, named precompiles, and active system contracts.

Expose the RPC through the XDPoS namespace and web3 extension, and document the response shape for current, next, and last block-based fork boundaries.

Add fork metadata, fork ID, and config snapshot tests to cover the new RPC payload and supporting chain-config helpers.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements an XDPoS-specific XDPoS_getConfig RPC (inspired by EIP-7910 / eth_config) that reports chain configuration snapshots at the current/next/last fork boundaries, including fork IDs, active fork labels, named precompiles, and active system contracts.

Changes:

  • Add modeled fork helpers to params.ChainConfig (fork activation lookup, active fork labels, fork block boundary selection, system contracts).
  • Add config RPC builder (internal/configapi) + expose via XDPoS RPC API and web3 extension; document response shape.
  • Extend precompile contract interface with Name() and add/extend tests for fork metadata, fork ID, and config snapshots.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
params/forks/forks.go Introduces a modeled fork enum + string labels used by RPC payloads.
params/config.go Adds fork modeling helpers (ForkBlockNumbers, LatestFork, ActiveForks, BlockNumber, etc.) and fork boundary logic.
params/config_test.go Adds extensive unit tests covering fork block selection/modeling behavior.
core/forkid/forkid.go Adds forkid implementation (EIP-2124) using ChainConfig.ForkBlockNumbers().
core/forkid/forkid_test.go Adds tests for fork gathering and fork ID calculation.
internal/configapi/configapi.go Implements shared config response assembly (fork ID, active forks, precompiles, system contracts, feature flags).
internal/configapi/configapi_test.go Adds tests covering boundary selection scenarios and payload details.
consensus/XDPoS/api.go Exposes GetConfig via XDPoS RPC namespace using internal/configapi.
consensus/XDPoS/api_test.go Adds RPC-level test verifying GetConfig response.
internal/web3ext/web3ext.go Adds XDPoS.getConfig() web3 extension method.
docs/xdc/XDPoS/XDPoS.md Documents XDPoS_getConfig response schema and example.
core/vm/contracts.go Extends precompile interface with Name() and implements names for built-in precompiles.
core/vm/XDCx_price.go Adds Name() for XDCx price precompiles.
internal/ethapi/override/override_test.go Updates test precompile mock to satisfy new Name() interface requirement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread params/config_test.go
Comment on lines +522 to +549
func snapshotCommonForkValues() commonForkValuesSnapshot {
return commonForkValuesSnapshot{
denylistHFNumber: common.DenylistHFNumber,
tip2019Block: common.TIP2019Block,
tipSigning: common.TIPSigning,
tipRandomize: common.TIPRandomize,
tipNoHalvingMNReward: common.TIPNoHalvingMNReward,
tipXDCX: common.TIPXDCX,
tipXDCXLending: common.TIPXDCXLending,
tipXDCXCancellation: common.TIPXDCXCancellationFee,
tipTRC21Fee: common.TIPTRC21Fee,
tipIncreaseMN: common.TIPIncreaseMasternodes,
berlinBlock: common.BerlinBlock,
londonBlock: common.LondonBlock,
mergeBlock: common.MergeBlock,
shanghaiBlock: common.ShanghaiBlock,
blockNumberGas50x: common.BlockNumberGas50x,
tipXDCXMinerDisable: common.TIPXDCXMinerDisable,
tipXDCXReceiverDis: common.TIPXDCXReceiverDisable,
eip1559Block: common.Eip1559Block,
cancunBlock: common.CancunBlock,
pragueBlock: common.PragueBlock,
osakaBlock: common.OsakaBlock,
dynamicGasLimitBlock: common.DynamicGasLimitBlock,
tipUpgradeReward: common.TIPUpgradeReward,
tipUpgradePenalty: common.TipUpgradePenalty,
tipEpochHalving: common.TIPEpochHalving,
}
Comment thread params/config_test.go
Comment on lines +580 to +606
func resetCommonForkValues() {
common.DenylistHFNumber = 0
common.TIP2019Block = nil
common.TIPSigning = nil
common.TIPRandomize = nil
common.TIPNoHalvingMNReward = nil
common.TIPXDCX = nil
common.TIPXDCXLending = nil
common.TIPXDCXCancellationFee = nil
common.TIPTRC21Fee = nil
common.TIPIncreaseMasternodes = nil
common.BerlinBlock = nil
common.LondonBlock = nil
common.MergeBlock = nil
common.ShanghaiBlock = nil
common.BlockNumberGas50x = nil
common.TIPXDCXMinerDisable = nil
common.TIPXDCXReceiverDisable = nil
common.Eip1559Block = nil
common.CancunBlock = nil
common.PragueBlock = nil
common.OsakaBlock = nil
common.DynamicGasLimitBlock = nil
common.TIPUpgradeReward = nil
common.TipUpgradePenalty = nil
common.TIPEpochHalving = nil
}
Comment on lines +30 to +56
type commonForkSnapshot struct {
denylistHFNumber uint64
tip2019Block *big.Int
tipSigning *big.Int
tipRandomize *big.Int
tipNoHalvingMNReward *big.Int
tipXDCX *big.Int
tipXDCXLending *big.Int
tipXDCXCancellation *big.Int
tipTRC21Fee *big.Int
tipIncreaseMN *big.Int
berlinBlock *big.Int
londonBlock *big.Int
mergeBlock *big.Int
shanghaiBlock *big.Int
blockNumberGas50x *big.Int
tipXDCXMinerDisable *big.Int
tipXDCXReceiverDis *big.Int
eip1559Block *big.Int
cancunBlock *big.Int
pragueBlock *big.Int
osakaBlock *big.Int
dynamicGasLimitBlock *big.Int
tipUpgradeReward *big.Int
tipUpgradePenalty *big.Int
tipEpochHalving *big.Int
}
Comment on lines +233 to +257
common.DenylistHFNumber = 0
common.TIP2019Block = nil
common.TIPSigning = nil
common.TIPRandomize = nil
common.TIPNoHalvingMNReward = nil
common.TIPXDCX = nil
common.TIPXDCXLending = nil
common.TIPXDCXCancellationFee = nil
common.TIPTRC21Fee = nil
common.TIPIncreaseMasternodes = nil
common.BerlinBlock = nil
common.LondonBlock = nil
common.MergeBlock = nil
common.ShanghaiBlock = nil
common.BlockNumberGas50x = nil
common.TIPXDCXMinerDisable = nil
common.TIPXDCXReceiverDisable = nil
common.Eip1559Block = nil
common.CancunBlock = nil
common.PragueBlock = nil
common.OsakaBlock = nil
common.DynamicGasLimitBlock = nil
common.TIPUpgradeReward = nil
common.TipUpgradePenalty = nil
common.TIPEpochHalving = nil
@gzliudan gzliudan changed the title feat(internal/ethapi): implement EIP-7910 - add eth_config #32230 feat(internal/ethapi): implement EIP-7910 - add XDPoS_getConfig Apr 24, 2026
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.

2 participants