feat(internal/ethapi): implement EIP-7910 - add XDPoS_getConfig#2326
feat(internal/ethapi): implement EIP-7910 - add XDPoS_getConfig#2326gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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_configRPC + Web3 extension entry and tests covering placeholder fork handling and fork ID generation. - Introduce
params/forksfork identifiers and extendparams.ChainConfigwith fork/system-contract helpers and fork-height enumeration. - Add
core/forkid(EIP-2124) implementation and expose precompile names via a newName()method onvm.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.
There was a problem hiding this comment.
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_configtoBlockChainAPI, plus web3 extension wiring and unit tests. - Introduced fork metadata helpers (
ForkBlockNumbers,LatestFork,ActiveSystemContracts) and a newcore/forkidpackage 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.
There was a problem hiding this comment.
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_configRPC (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.
There was a problem hiding this comment.
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_configRPC method plus web3 extension wiring and API tests. - Introduce fork modeling helpers in
params(modeled fork stages, effective fork heights, system contracts) and a newparams/forksenum. - Add EIP-2124 fork ID implementation (
core/forkid) driven byChainConfig.ForkBlockNumbers, and extend precompile interface withName()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.
There was a problem hiding this comment.
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_configRPC 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; introducecore/forkidfor 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.
d2f1f52 to
fa223a7
Compare
There was a problem hiding this comment.
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_configRPC endpoint and Web3 extension wiring, plus documentation of the response format. - Introduce fork modeling helpers on
params.ChainConfig(ForkBlockNumbers,LatestFork,BlockNumber,ActiveSystemContracts) and aparams/forksenum. - Add a
core/forkidpackage (EIP-2124) and extend precompile contracts withName()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.
9665f58 to
fd9b633
Compare
There was a problem hiding this comment.
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 extendparams.ChainConfigwith fork helpers (ForkBlockNumbers,LatestFork,BlockNumber,ActiveSystemContracts). - Introduce
core/forkid(EIP-2124) and wire fork-id + config snapshot assembly intointernal/ethapiviaeth_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.
9abd2be to
2006f52
Compare
There was a problem hiding this comment.
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 newChainConfighelpers for fork activation, boundaries, and active system contracts. - Add
internal/configapibuilder used byXDPoS_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.
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.
There was a problem hiding this comment.
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.
| 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, | ||
| } |
| 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 | ||
| } |
| 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 | ||
| } |
| 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 |
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 applyImpacted Components
Which parts of the codebase does this PR touch?
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that