Skip to content

refactor(txe): replace AztecNodeService with TXE-local node#24758

Open
nchamo wants to merge 2 commits into
merge-train/fairies-v5from
nchamo/txe-drop-node-dep
Open

refactor(txe): replace AztecNodeService with TXE-local node#24758
nchamo wants to merge 2 commits into
merge-train/fairies-v5from
nchamo/txe-drop-node-dep

Conversation

@nchamo

@nchamo nchamo commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Motivation

TXE only used AztecNodeService as a read-only facade over its own archiver and world state, yet the dependency pulled the whole server stack (p2p, sequencer, validator, prover, slasher, epoch-cache, ethereum) into its graph, plus ~400 lines of fakes whose only purpose was satisfying the node constructor. Decoupling TXE from the node also removes a blocker for splitting the repo, where TXE lands on the client-tooling side.

The change

  • New TXENode serves the read-side queries the PXE services actually call (blocks, membership witnesses, logs by tags, tx receipts, contract data, public storage) directly over TXEArchiver and TXESynchronizer. It extends UnimplementedAztecNode, a full transcription of the AztecNode interface whose methods throw, so any surface the TXE does not cover fails loudly.
  • Deleted DummyP2P, MockEpochCache and the TXE global-variable/fee builders; dropped the @aztec/aztec-node and @aztec/bb-prover dependencies along with the esbuild stubs that existed only to neutralize the node import graph in the TXE bundle.
  • Preserved behaviors from the node-backed setup: unknown tx hashes resolve to pending receipts (tagging sync relies on this), archive membership witnesses are served from state at block N-1, and getContract accepts block-hash reference parameters.
  • TXE checkpoints are now marked proven and finalized as they are added, so store-backed tag resolution (proven/finalized) matches getL2Tips instead of resolving to genesis.

@nchamo nchamo self-assigned this Jul 16, 2026
@nchamo nchamo added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure labels Jul 16, 2026
@nchamo nchamo added the ci-full Run all master checks. label Jul 17, 2026
@nchamo
nchamo requested a review from nventuro July 17, 2026 11:42
@nchamo
nchamo marked this pull request as ready for review July 17, 2026 11:42
@nchamo nchamo removed the ci-full Run all master checks. label Jul 17, 2026
/**
* {@link AztecNode} implementation in which every method throws. TXENode extends it, overriding the read-side
* queries the TXE actually serves, so any surface the TXE doesn't cover fails loudly instead of silently
* misbehaving. Method order mirrors the interface declaration.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* misbehaving. Method order mirrors the interface declaration.
* misbehaving.

super();
}

public override async findLeavesIndexes(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are non-trivial untested impls. I'm not saying the previous approach was better, but it doesn't seem fantastic to copy-paste these here either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants