Skip to content

--archiver flag silently ignored when combined with --node, archiver_* RPC methods never exposed #22210

@AlexVarin2001

Description

@AlexVarin2001

Summary

When starting a node with aztec start --node --archiver (as recommended in the documentation),
the --archiver flag is silently ignored due to an else if branch in aztec_start_action.ts.
As a result, archiver_* RPC methods are never registered, even though the archiver is running
embedded in the node process.

    if (options.node) {
      const { startNode } = await import('./cmds/start_node.js');
      const networkName = getActiveNetworkName(options.network);
      ({ config } = await startNode(options, signalHandlers, services, adminServices, userLog, networkName));
    } else if (options.bot) {
      const { startBot } = await import('./cmds/start_bot.js');
      await startBot(options, signalHandlers, services, userLog);
    } else if (options.archiver) {                                                                                   // ← never reached when --node is present
      const { startArchiver } = await import('./cmds/start_archiver.js');
      ({ config } = await startArchiver(options, signalHandlers, services));

Additionally, startNode() never registers services.archiver, only services.node and services.p2p.

Impact
The following methods return -32601 Method not found even with --node --archiver:

archiver_getContractClassIds
archiver_getL1Constants
(and all other archiver_* methods)

Additionally, AztecNodeService.createAndSync() always creates an embedded archiver
(see yarn-project/aztec-node/src/aztec-node/server.ts, createArchiver call),
but startNode() never registers it under services.archiver.

Environment
Version: aztecprotocol/aztec:4.1.2
Start command: aztec start --node --archiver --network mainnet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions