Byte-exact energy + fee parity with java-tron - #2
Merged
Conversation
Gingerbreadfork
added a commit
that referenced
this pull request
Jun 21, 2026
Round-2 audit (storage + state serialization) follow-up. TRON commits no state root over persisted bytes, so #2-#4 are snapshot-diff (RocksDB) parity; #1 is a genuine future-tx consensus divergence. Workspace builds + suites green. - CALLTOKEN to a fresh address now gives the recipient java's default owner(id=0)+active(id=2) permission when ALLOW_MULTI_SIGN is on (java Program.callToAddress endowment>0 -> createAccountIfNotExist -> createNormalAccount withDefaultPermission). The value-CALL and SELFDESTRUCT- inheritor paths already did this; the CALLTOKEN path missed it, leaving the account without the permission java persists -- a later multisig tx from that account would validate on java and reject on us. - SSTORE to zero deletes the storage row instead of persisting a 32-byte-zero row (java Storage.commit: isZero -> delete). Adds StorageRowStore::delete. No VM-read/refund consequence (both read back zero); persisted-byte parity. - Deployed contract rows carry code_hash = keccak256(runtime_code) eagerly, on both the top-level and nested-CREATE deploy paths (java RepositoryImpl.saveCode under allowTvmConstantinople). No VM impact; row + getcontract RPC parity. - AssetIssue writes the V2 asset-issue store only when ALLOW_SAME_TOKEN_NAME is on (mainnet), matching AssetIssueActuator.execute; the legacy V1+V2 path is preserved for the flag-off case. Deferred (separate, larger): re-splitting inline TRC-10 balances back to the account-asset store with asset_optimized=true on flush (java SnapshotRoot.put) — the dominant remaining snapshot-diff source; functionally correct as-is.
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.
No description provided.