Repository navigation
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
|
wanwiset25
approved these changes
Oct 26, 2026
gzliudan
force-pushed
the
remove-privacy-package
branch
2 times, most recently
from
October 26, 2026 05:33
7f68d9d to
6cd5452
Compare
gzliudan
requested review from
AnilChinchawale,
anunay-xin,
benjamin202410 and
liam-lai
October 26, 2026 05:40
anunay-xin
approved these changes
Oct 26, 2026
benjamin202410
approved these changes
Oct 26, 2026
gzliudan
force-pushed
the
remove-privacy-package
branch
2 times, most recently
from
October 28, 2026 02:11
e68f5ce to
7045a53
Compare
gzliudan
force-pushed
the
remove-privacy-package
branch
4 times, most recently
from
October 30, 2026 10:29
39ff49f to
603c337
Compare
benjamin202410
approved these changes
Nov 2, 2026
gzliudan
force-pushed
the
remove-privacy-package
branch
from
November 2, 2026 23:16
603c337 to
d05b95d
Compare
…package, close XinFinOrg#2895 The Monero-style RingCT ring signature and Bulletproof range proof package arrived with the TomoChain lineage and was restored on 2024-03-07 (PR XinFinOrg#477) to support a devnet privacy experiment. It was reachable only through two precompiled contracts, RING_SIG_VERIFY at 0x1e and BULLET_PROOF_VERIFY at 0x28, registered solely in the Byzantium and Istanbul precompile tables. Neither precompile has ever been called on a live network: both become unreachable once a chain passes its EIP1559 fork, mainnet (~108.7M) and Apothem (~84.5M) are well past theirs, and six independent explorers (two indexer stacks) report zero transactions, zero internal transactions and zero balance for both addresses across all history. Evidence is archived in issue XinFinOrg#2895. Remove the package, the two table registrations and the verifier types, drop the matching test-table entries, and pin the byzantium/istanbul XDCx bucket expectation at the two price precompiles that remain. The package was the last consumer of btcsuite/btcd/btcec/v2, so the module drops out of go.mod/go.sum with it. Historical replay still exercises the Byzantium and Istanbul windows, so consensus neutrality rests on the zero-call evidence above; the full replay validation tracked in XinFinOrg#2895 is the gate before this reaches mainnet. Close XinFinOrg#2895
gzliudan
force-pushed
the
remove-privacy-package
branch
from
November 4, 2026 17:20
d05b95d to
f8d0fdb
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #2895
Proposed changes
core/vm/privacy(Monero-style RingCT ring signatures + Bulletproofs range proofs, TomoChain lineage) was reachable only through two precompiled contracts —RING_SIG_VERIFYat0x…001eandBULLET_PROOF_VERIFYat0x…0028— restored on 2024-03-07 in #477 for a devnet privacy experiment. Nothing else imports the package. This PR deletes the package, both verifier types and both table registrations.10 files, +2 −2845.
core/vm/privacywas the last consumer ofbtcec/v2, so the module drops out of the dependency graph with it.Where the two precompiles were reachable
Both are registered only in the Byzantium and Istanbul tables.
activePrecompiledContracts(core/vm/contracts.go:223) evaluates Osaka → Prague → EIP1559 →IsXDCxDisable→ Istanbul → Byzantium, so the switch to the XDCv2 table — not the EIP1559 fork — is what makes them unreachable:TIPXDCXMinerDisableBlock(table → XDCv2)Devnet (551) and localnet (5151) set
TIPXDCXMinerDisableBlock = 0, so the XDCv2 table — which has never contained these addresses — is active from genesis there.Historical replay still selects the Byzantium/Istanbul tables below that block, so consensus neutrality has to hold across the entire window, not just the tail after EIP1559.
Why replay is the decisive test
Both contracts are pure verifiers: no state write, no log, no event. The only on-chain footprint of a hit is the fixed 100,000 gas charge (
RequiredGasreturns a constant). A binary without them treats0x1e/0x28as ordinary empty accounts (~700 gas, 2,600 if cold), so any call produces a ~97k gasUsed delta → different sender balance and coinbase credit → different state root. Explorer history is therefore supporting evidence only; a genesis full-sync replay with the removal build plus per-blockValidateStateis the authoritative check.Evidence
Existing explorers. Five reachable explorers across two independent indexer stacks (Etherscan-built and OpenScan-built) report zero transactions, zero internal transactions and zero balance for both addresses across all history of mainnet and Apothem — xdcscan.com, xdcscan.io, testnet.xdcscan.com, apothem.xdcscan.io, explorer.apothem.network (checked 2026-10-25;
apothem.blocksscan.iowas offline that day). Full table in #2895.Apothem replay — done. A fresh Apothem archive node was synced from genesis with a binary built from the removal commit itself (
440466ea; running image md5d29dc78a…, andstringson the live process contains none ofRING_SIG_VERIFY,BULLET_PROOF_VERIFY,ring signature,bulletproof,RingCT):--syncmode full --gcmode archive, no restart sincenumber=15 blocks=15; head 72,278,038 on 2026-11-01 19:45 CST, i.e. well pastTIPXDCXMinerDisableBlock(61,290,000)ValidateState; 0 ERROR / CRIT / PANIC across ~2.9M log lines, and the onlymismatchmatch is the unrelated startup checkResolved chain config mismatch policyThat run replayed [1, 61,289,999] with the precompiles compiled out and never diverged, so the removal is empirically consensus-neutral on Apothem.
Mainnet replay — pending. The mainnet archive node is at 51,349,606, still short of 80,370,000. Per the proposal in #2895 this replay has to pass before the removal reaches mainnet, so this PR is gated on it rather than on the Apothem result alone.
Build and CI.
make allclean;go test ./core/vm/...passes (TestPrecompileSetsByForknow pins the byzantium/istanbul XDCx bucket at the two price precompiles that remain);golangci-lint run --new-from-rev=68b1ea2cab0 new issues (2 revive findings in XDCx_price.go pre-exist on dev-upgrade);make tidyleaves no untidy module files. CI: 9 test shards, 4 race shards + race rpc, and lint all green.Merge Danger
Door: two-way at the code level (clean revert), one-way once a node runs it over history
If the zero-call evidence were wrong, a full-sync node would diverge at the first historical block that calls either address. The failure is loud (
ValidateStaterejection, not silent corruption), but it is a consensus event on a live chain and would only surface on nodes replaying the affected window.Blast Radius: consensus (historical replay below
TIPXDCXMinerDisableBlock)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