Skip to content

Byte-exact energy + fee parity with java-tron - #2

Merged
Gingerbreadfork merged 1 commit into
masterfrom
energy-fee-parity
Jun 13, 2026
Merged

Byte-exact energy + fee parity with java-tron#2
Gingerbreadfork merged 1 commit into
masterfrom
energy-fee-parity

Conversation

@Gingerbreadfork

Copy link
Copy Markdown
Owner

No description provided.

@Gingerbreadfork
Gingerbreadfork merged commit d8cb03a into master Jun 13, 2026
@Gingerbreadfork
Gingerbreadfork deleted the energy-fee-parity branch June 13, 2026 03:01
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.
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.

1 participant