Skip to content

fix(params): update testnet chain config#2423

Open
gzliudan wants to merge 3 commits into
XinFinOrg:dev-upgradefrom
gzliudan:fix-testnet-v2-config
Open

fix(params): update testnet chain config#2423
gzliudan wants to merge 3 commits into
XinFinOrg:dev-upgradefrom
gzliudan:fix-testnet-v2-config

Conversation

@gzliudan

@gzliudan gzliudan commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Proposed changes

fix sync error:

ERROR[06-29|15:54:40.032]
########## BAD BLOCK #########
Version: 2.7.0-devnet
Commit: ed055c62fa1322852deb0382392ad42803af7c8f
Number: 83577112
Hash: 0x1806f6d445afdc322b699aee2cfcab1331ea099601e8e822435bee267fba0d86
Round: 27360000
Error: validators does not match what's stored in snapshot minus its penalty
Chain configuration:
  - ChainID:                     51
  - Homestead:                   1
  - DAO Fork:                    <nil>
  - DAO Support:                 false
  - TIP2019:                     1
  - Tangerine Whistle (EIP 150): 2
  - Spurious Dragon (EIP 155):   3
  - Byzantium:                   4
  - Constantinople:              <nil>
  - Petersburg:                  <nil>
  - Istanbul:                    <nil>
  - TIPSigning:                  3000000
  - TIPRandomize:                3464000
  - TIPIncreaseMasternodes:      5000000
  - Denylist:                    23779191
  - TIPNoHalvingMNReward:        23779191
  - TIPXDCX:                     23779191
  - TIPXDCXLending:              23779191
  - TIPXDCXCancellationFee:      23779191
  - TIPTRC21Fee:                 23779191
  - Berlin:                      61290000
  - London:                      61290000
  - Merge:                       61290000
  - Shanghai:                    61290000
  - Gas50x:                      56828700
  - TIPXDCXMinerDisable:         61290000
  - TIPXDCXReceiverDisable:      66825000
  - EIP1559:                     71550000
  - Cancun:                      71551800
  - Prague:                      <nil>
  - Osaka:                       <nil>
  - DynamicGasLimit:             <nil>
  - TIPUpgradeReward:            <nil>
  - TIPUpgradePenalty:           <nil>
  - TIPEpochHalving:             <nil>
  - TRC21IssuerSMC:              0x0E2C88753131CE01c7551B726b28BFD04e44003F
  - XDCXListingSMC:              0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0
  - RelayerRegistrationSMC:      0xA1996F69f47ba14Cb7f661010A7C31974277958c
  - LendingRegistrationSMC:      0x28d7fC2Cf5c18203aaCD7459EFC6Af0643C97bE8
  - Engine:                      XDPoS
    - Period: 2
    - Epoch: 900
    - Reward: 5000
    - RewardCheckpoint: 900
    - Gap: 450
    - MaxMasternodesV2: 15
    - FoundationWalletAddr: xdc746249C61f5832C5eEd53172776b460491bDcd5C
    - SkipV1Validation: false
    - V2:
      - SwitchEpoch: 63143
      - SwitchBlock: 56828700
      - CurrentConfig:
        - MaxMasternodes: 108
        - SwitchRound: 15000000
        - MinePeriod: 2
        - TimeoutSyncThreshold: 3
        - TimeoutPeriod: 10
        - CertThreshold: 0.667
        - MasternodeReward: 0
        - ProtectorReward: 0
        - ObserverReward: 0
        - MinimumMinerBlockPerEpoch: 0
        - LimitPenaltyEpoch: 0
        - MinimumSigningTx: 0
        - ExpTimeoutBase: 1
        - ExpTimeoutMaxExponent: 0
Receipts:
##############################

WARN [06-29|15:54:40.032] Synchronisation failed, dropping peer    peer=12496e978c3c54bf err="retrieved hash chain is invalid: validators does not match what's stored in snapshot minus its penalty"

Also fix:

########## BAD BLOCK #########
Version: 2.7.0-devnet
Commit: 32a18bef269552ad67160401608585433cc8dc36
Number: 83600000
Hash: 0x20b0f3c9dcd313e8bf59496967f4814fd5de0235f04ad4bb0ed5fcbf3304c797
Round: 27383525
Error: invalid merkle root (remote: 35da82d9a91b0f068e8f87b9e7563e850248126bf44d1742a7d090a96af2e447 local: e0c61ed676f5e767490c50e8db6727c9533a71602222a22af4b2d8b6ad082941) dberr: %!w(<nil>)
Chain configuration:
  - ChainID:                     51      
  - Homestead:                   1       
  - DAO Fork:                    <nil>
  - DAO Support:                 false   
  - TIP2019:                     1       
  - Tangerine Whistle (EIP 150): 2       
  - Spurious Dragon (EIP 155):   3       
  - Byzantium:                   4       
  - Constantinople:              <nil>
  - Petersburg:                  <nil>
  - Istanbul:                    <nil>
  - TIPSigning:                  3000000 
  - TIPRandomize:                3464000 
  - TIPIncreaseMasternodes:      5000000 
  - Denylist:                    23779191
  - TIPNoHalvingMNReward:        23779191
  - TIPXDCX:                     23779191
  - TIPXDCXLending:              23779191
  - TIPXDCXCancellationFee:      23779191
  - TIPTRC21Fee:                 23779191
  - Berlin:                      61290000
  - London:                      61290000
  - Merge:                       61290000
  - Shanghai:                    61290000
  - Gas50x:                      56828700
  - TIPXDCXMinerDisable:         61290000
  - TIPXDCXReceiverDisable:      66825000
  - EIP1559:                     71550000
  - Cancun:                      71551800
  - Prague:                      <nil>
  - Osaka:                       <nil>
  - DynamicGasLimit:             <nil>
  - TIPUpgradeReward:            <nil>
  - TIPUpgradePenalty:           <nil>
  - TIPEpochHalving:             <nil>
  - TRC21IssuerSMC:              0x0E2C88753131CE01c7551B726b28BFD04e44003F
  - XDCXListingSMC:              0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0
  - RelayerRegistrationSMC:      0xA1996F69f47ba14Cb7f661010A7C31974277958c
  - LendingRegistrationSMC:      0x28d7fC2Cf5c18203aaCD7459EFC6Af0643C97bE8
  - Engine:                      XDPoS
    - Period: 2
    - Epoch: 900
    - Reward: 5000
    - RewardCheckpoint: 900
    - Gap: 450
    - MaxMasternodesV2: 15
    - FoundationWalletAddr: xdc746249C61f5832C5eEd53172776b460491bDcd5C
    - SkipV1Validation: false
    - V2:
      - SwitchEpoch: 63143
      - SwitchBlock: 56828700
      - CurrentConfig:
        - MaxMasternodes: 25
        - SwitchRound: 27360000
        - MinePeriod: 2
        - TimeoutSyncThreshold: 3
        - TimeoutPeriod: 10
        - CertThreshold: 0.667
        - MasternodeReward: 63.42
        - ProtectorReward: 50.27
        - ObserverReward: 25.13
        - MinimumMinerBlockPerEpoch: 5
        - LimitPenaltyEpoch: 5
        - MinimumSigningTx: 30
        - ExpTimeoutBase: 1
        - ExpTimeoutMaxExponent: 0
Receipts: 
##############################

WARN [07-07|17:33:23.092] Synchronisation failed, dropping peer    peer=b251399abd0ebef8 err="retrieved hash chain is invalid: invalid merkle root (remote: 35da82d9a91b0f068e8f87b9e7563e850248126bf44d1742a7d090a96af2e447 local: e0c61ed676f5e767490c50e8db6727c9533a71602222a22af4b2d8b6ad082941) dberr: %!w(<nil>)"

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

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

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: 68dff898-b0af-403e-b726-92a853ab9f62

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.

@gzliudan gzliudan changed the title update testnet v2 config chore(params): update TestnetV2Configs Jun 29, 2026
@gzliudan gzliudan force-pushed the fix-testnet-v2-config branch from 9bde1f6 to 3f72220 Compare June 29, 2026 09:31
Comment thread params/config_networks.go Outdated
@gzliudan gzliudan force-pushed the fix-testnet-v2-config branch 2 times, most recently from 37ce422 to bfe7592 Compare July 1, 2026 08:40
@gzliudan gzliudan force-pushed the fix-testnet-v2-config branch from bfe7592 to 4fa17be Compare July 6, 2026 11:06
Set PragueBlock, DynamicGasLimitBlock, TIPUpgradeRewardBlock, and TIPUpgradePenaltyBlock to 83600000 in TestnetChainConfig to match live testnet consensus and avoid invalid merkle root during sync.\n\nUpdate params tests to assert the same fork heights for testnet.
@gzliudan gzliudan changed the title chore(params): update TestnetV2Configs chore(params): update testnet chain config Jul 7, 2026
@gzliudan gzliudan changed the title chore(params): update testnet chain config fix(params): update testnet chain config Jul 7, 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