feat(archive): add historical state archive support - #136
Conversation
…uthority/decisions
…ensus foundation)
…tay in chainbase Java 8)
…sensus, no Manager hooks)
…raps, enable-test requirement)
…(txNum across canonical apply)
…ocessBlock writes outside FINALIZE)
… 17 root domains, checksum)
…sets + deterministic map serialization)
…ministic-proto for map-bearing domains, contract abi-strip)
…ception-isolated holder)
…ct store-specific + service wiring + enabled integration test)
… fan-out from account write)
…it, canonical address||slot||version key)
…ced import emits redundant value-correct record)
…ry impl; commit drains capture buffer)
…ekForPrev getAsOf, persistent)
…ath + close lifecycle, default-off safe)
…rted blocks on eraseBlock)
…tomic single-batch unwind, getFirstTxNum)
…t/getCode/getStorage, three-state, no latest fallback, inclusive-after)
…eaderFactory; getStorage uses the codec)
… cursor; survives restart, mirrors temporal store)
…ly block fail-fast)
…ervice (temporal/ + index/ subdirs, close both)
…geAt/getCode via archive (resolver + adapter, latest/disabled preserved)
Harden unified journal integrity, lifecycle shutdown, resource admission, query isolation, and archive-off execution boundaries. Add fault-oriented regression coverage and record the round 10-24 adversarial review evidence.
|
Skipping CodeAnt AI review — this PR changes more than 100 files, which usually means a migration, codemod, or vendored drop. Line-level review on diffs this large produces duplicate findings on the same rewrite pattern and drowns out anything that actually matters. If you still want a review, comment |
❌ Math Usage Detection ResultsFound forbidden usage of Please review if this usage is intended. Caution Note: You should use |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4655abb5ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (isNotification(rootNode)) { | ||
| output.discard(); | ||
| writeEmptyResponse(resp); |
There was a problem hiding this comment.
Return errors for malformed id-less requests
Do not classify every object without an id as a notification. For malformed requests such as {} or {"jsonrpc":"2.0","method":1}, rpcServer.handleRequest can serialize an Invalid Request response with a null ID, but this branch discards it solely because the original object lacks id. This regresses both single requests and batch elements from returning the required error to returning no response; only structurally valid notification requests should suppress output.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b18587edc1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (project.hasProperty('testJavaVersion')) { | ||
| tasks.withType(Test).configureEach { | ||
| javaLauncher.set(javaToolchains.launcherFor { | ||
| languageVersion = JavaLanguageVersion.of( | ||
| Integer.parseInt(project.property('testJavaVersion').toString())) | ||
| }) | ||
| } |
There was a problem hiding this comment.
Keep Error Prone tests on the build JVM
Exclude the errorprone project from this JDK 8 launcher override. In the checked docker-build-rockylinux and docker-build-debian11 jobs, clean build passes -PtestJavaVersion=8, so this block also launches :errorprone:test on JDK 8; however, errorprone/build.gradle enables those tests because Gradle itself runs on JDK 17 and supplies Java 9+ --add-exports/--add-opens options. JDK 8 cannot start that test JVM, causing both required x86 builds to fail before validating the application tests.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
When allowStrictMath and the hardened exchange calculation are disabled, ExchangeTransactionActuator deliberately routes consensus exchange pricing through Maths.pow(..., false), but moving the ARM wrapper into the common source set makes that path call StrictMath.pow on x86 instead of the previous Math.pow. These functions can differ by one ULP and change the integer payout—for example, balances 206236204630717/954057449968570 and quantity 120133495269460 produce 351179218498520 with Math but 351179218498519 with StrictMath—so upgraded and older x86 nodes can compute different state on chains where the proposal remains inactive. Keep the x86 implementation until the existing consensus flag selects strict math.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f250f9e to
9cc2faf
Compare
Route archive math through StrictMathWrapper, keep tests compatible with JDK 8 and both bundled RocksDB versions, document every archive reference setting, and restore protobuf plugin verification metadata.
9cc2faf to
945035e
Compare
945035e to
c03b17b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c03b17bac1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| private boolean isHistoricalArchiveCall() { | ||
| Repository repository = getDeposit(); | ||
| return isConstantCall() && repository != null && repository.isHistoricalArchive(); |
There was a problem hiding this comment.
Route non-constant historical replays through bounded proof execution
When debug_traceTransaction replays a transaction that invokes VerifyTransferProof, HistoricalDebugTraceExecutor passes constantCall=false even though the repository is historical. This predicate therefore returns false, selecting the canonical workersInNonConstantCall pool and awaitLegacyProofTasks; after its timed latch wait, that path performs unbounded Future.get() calls and does not cancel unfinished work. Such traces can exceed the archive query deadline, occupy the dedicated trace worker, and contend with canonical proof execution. Classify any historical archive repository as historical here, independently of the constant-call flag.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a0616c8879
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (configuredArchivePath.isAbsolute()) { | ||
| protectedPaths.add(canonicalDbRoot); |
There was a problem hiding this comment.
Reject relative archive paths that overlap canonical stores
Protect the canonical database layout for relative paths as well. With archive enabled, values such as storage.archive.db.directory = "." or "account" resolve to the canonical DB root or an existing default store directory, but this conditional omits canonicalDbRoot from conflict validation solely because the value is relative. The archive can therefore open its unified RocksDB over canonical node storage, causing incompatible data to share a directory and risking database corruption; allow the default archive child explicitly while rejecting the root and known store children.
Useful? React with 👍 / 👎.
Summary
Supported Historical APIs
eth_getBalanceeth_getCodeeth_getStorageAteth_callValidation
Archive/Historical regression suites, private-chain E2E, restart/offline database checks, and SIGKILL recovery passed. The feature remains disabled by default pending mainnet scale and soak validation.