Conversation
Capture canonical block metadata and materialize reverse diffs from completed block snapshots. Classify archive state stores explicitly and project account-asset companion mutations before root merge.
Add deterministic history body and index records, ordered durable commit markers, and bounded asynchronous persistence. Gate checkpoint advancement on committed archive history and cover crash, corruption, backpressure, and reorg behavior.
Persist reverse state history with bounded append-only body, index, and commit structures. Wire an opt-in archive writer into snapshot flush and add restart-safe account change indexing. Expose an experimental historical account balance endpoint for trace comparison.
Persist bounded restart checkpoints, truncation recovery, H/C/D/R progress authorities, and immutable serving generations. Pin committed history resources and fail closed on identity or durability drift.
Add durable engine identities and native LevelDB/RocksDB snapshot leases. Assemble exact Store generations under the SnapshotManager barrier and release partial acquisitions on authority drift.
Apply business mutations with participant progress in native sync batches. Freshly validate H/C/D authorities under the archive barrier and advance reader visibility only after exact convergence.
Unify LevelDB and RocksDB participants behind one recovery contract. Persist canonical mutation plans and bind checkpoint, participant, and reader progress to the same digest.
Collect exact ordinary and AccountAsset post-state without Store scans. Enforce target identity, bounded ownership, one-shot sealing, abort, and terminal payload release.
Drive an exact-27 capture batch through mixed native participants, inject a partial apply failure, and verify durable-plan replay, digest propagation, ownership, and restart convergence.
Apply two capture-produced targets through exact-27 participants. Verify per-target plan digests, overwrite and delete semantics, partial replay boundaries, reader publication, and restart convergence.
Prepare one target-bound Account and AccountAsset projection before snapshot merge, retain its forward payload through the revoking lifecycle, and seal it only against durable history markers. Keep the integration default-off and preserve the existing proposal 66 physical layout.
Classify ABI as mutable auxiliary metadata outside the versioned state participant set while retaining an explicit tombstone classification.
Exercise proposal-bound projection, layer-to-flush ownership, durable marker sealing, retry and reorg boundaries, exact participant coverage, and ABI exclusion.
Expose durable marker receipt creation through direct and asynchronous history sinks, then gate forward payload sealing on the exact committed flush range. Retain submitted frozen ranges across durability or receipt failures so retries do not resubmit history.
Verify direct and asynchronous receipt authority, disabled behavior, and retry ordering across durable wait and receipt failures without duplicate history submission.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 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. Comment |
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
# Conflicts: # actuator/src/main/java/org/tron/core/vm/repository/RepositoryImpl.java
❌ Math Usage Detection ResultsFound forbidden usage of Please review if this usage is intended. Caution Note: You should use |
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
Direct SnapshotRoot writes only occur while no revoking session exists, so the legacy eager Account-to-AccountAsset migration still applies to them; session-bound writes remain folded by the P66 materializer inside the block layer.
SEGMENT_TARGET_BYTES is bound into the v3 composite format identity and persisted CURRENT records; the v4 commit raised it to 2 GiB and broke frozen pre-change catalog compatibility. Keep v3 frozen at 2_000_000_000; v4/v5 carry their own constants.
A re-created Manager bean re-runs init within the same context lifecycle while the AccountAsset lane stays attached; skip the attach when the lane is already installed instead of failing the second initialization.
Exempt the deliberately cache-less account-asset snapshot participant from the second-cache check and attach the lane in the exact-27 startup scenario the way Manager.init does.
The format-v2 expectation was pinned before the commitment codec was deliberately reverted to format v1 for compatibility; restore the v1 root the code has always produced.
The v3 serving-index builder held the coordinator monitor across plan and RocksDB append I/O every 10-block batch, so query threads blocked for seconds in pinIndexed and 9.1% of historical-query requests spiked to 2.3-4.0s. Apply the P04 read-side pattern to the build side: the monitor only swaps the pending range into an in-flight capture and publishes the immutable generation, while plan/append I/O runs lock-free; MutableIndex pin captures its lease on volatile state and a request-owned snapshot. A concurrent close fails an in-flight flush closed instead of blocking.
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
What does this PR do?
Introduces the state archive feature: append-file state archive with catalog serving, geth-style archive index, checkpoint-bound recovery, path-state snapshot pipeline, historical query RPC/VM context wiring, and related performance and metrics attribution work. Rebuilt as a fully GPG-signed (Verified) history from feature/archive_block2; content is tree-identical to that branch.
Why are these changes required?
Provides bounded historical state storage and point-query serving for archive data, with recovery semantics aligned to checkpoints.
This PR has been tested by:
Follow up
Extra details
174 commits, all GPG signed. Branch is based on an older develop point and shows divergence from current develop; reconcile (merge/rebase) before merge if required.
Summary by cubic
Adds an opt-in state archive that persists bounded historical state and serves exact point-in-time and range queries, enabling historical RPC and VM execution without changing current chain processing.
HistoricalExecutionGuard.Review notes
developpoint and needs a rebase before merge.Written for commit b76ddef. Summary will update on new commits.