Remove EIP 2935#49
Merged
Merged
Conversation
km631
approved these changes
May 22, 2026
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.
Summary
Trim
contracts/utils/Blockhash.soldown to the nativeBLOCKHASHopcode only. Drop the EIP-2935 history-storage code path: the canonical history-storage contract is not deployed on TRON today, so the staticcall to0x0000F908...2935always returns zero and the conditional branching is dead code.Background
BLOCKHASHon TRON matches the EVM byte-for-byte — 256-block lookback, zero otherwise. Verified injava-tron'sProgram.java: the window checkindex < currentBlock && index >= max(256, currentBlock) - 256is identical to Ethereum's semantics.developinjava-tron#6686, but no released java-tron version ships it and no proposal has activated it. The currenttronbox/tre:devimage (and TRON mainnet) isv4.8.1, which does not include it.If/when TIP-2935 ships and activates on TRON, the canonical address and bytecode are byte-for-byte identical to EIP-2935 (verified in
HistoryBlockHashUtil.java), so the OZ library can be restored to its upstream form with no behavior change.Changes
contracts/utils/Blockhash.sol— removeHISTORY_STORAGE_ADDRESSconstant and_historyStorageCallprivate function;blockHashnow delegates directly to theblockhashbuiltin. Doc comment updated to describe the native opcode-only behavior.test/utils/Blockhash.test.js— drop thepredeploy.eip2935dependency and the supported/unsupported chain matrix; keep recent-block / old-block / future-block coverage.test/utils/Blockhash.t.sol— deleted; the Foundry test exercised the EIP-2935 history-storage path we removed.