Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate sandbox, node, p2p-bootstrap etc into single binary #3552

Closed
charlielye opened this issue Dec 4, 2023 · 2 comments · Fixed by #3927
Closed

Consolidate sandbox, node, p2p-bootstrap etc into single binary #3552

charlielye opened this issue Dec 4, 2023 · 2 comments · Fixed by #3927
Assignees

Comments

@charlielye
Copy link
Contributor

It currently just runs and has a MODE env var. It's fine for certain things to be set in the environment as CLI arg alternatives, but this should be an application much like other network binaries. i.e. it accepts commands to define which subsystems are enabled.

e.g.

  • aztec --sandbox
  • aztec --sequencer
  • aztec --sequencer --prover
  • aztec --p2p-node
  • aztec --pxe
  • aztec --pxe --p2p-node

Obviously sandbox is mutually exclusive, but i think other subsystems are/should be optional?

TLDR: Use commander to make our aztec binary more intuitive.

@charlielye
Copy link
Contributor Author

I would add, don't just blindly implement the above. Might be worth having a discussion around what the best cli api is.
e.g.?
aztec start --sequencer [sequencer-options] --prover [prover-options] --pxe [pxe-options]
aztec cli subcommand [--options]
aztec sandbox

program
  .command('start')
  .description('Start various processes')
  .option('--sequencer [options]', 'Start the sequencer with options (e.g., "--sequencer option1=value1,option2=value2")')
  .option('--prover [options]', 'Start the prover with options')
  .option('--pxe [options]', 'Start PXE with options')
  .action((options) => {
    if (options.sequencer !== undefined) {
      const sequencerOptions = parseOptions(options.sequencer);
      // Start sequencer logic here with sequencerOptions
    }
    if (options.prover !== undefined) {
      const proverOptions = parseOptions(options.prover);
      // Start prover logic here with proverOptions
    }
    if (options.pxe !== undefined) {
      const pxeOptions = parseOptions(options.pxe);
      // Start PXE logic here with pxeOptions
    }
  });```

@PhilWindle
Copy link
Collaborator

Proposed cli commands:

aztec cli subcommand [options] // execute the cli app
aztec sandbox // spins up complete sandbox
aztec start --pxe [options] // run pxe, config points to seperate 'node'
aztec start --archiver [options] // just runs the archiver

aztec start --node [options] 
	// runs a 'node'
	// contains merkle trees + p2p enabled tx pool by default
	// must be configured with an archiver url
	// the above gives everything required by a pxe to be a 'public node'
	
aztec start --node [options] --archiver [options] // as above but with own archiver

aztec start --node [options] --sequencer [options] // node, sequencer, remote archiver
aztec start --node [options] --prover [options] // node, prover, remote archiver
aztec start --node [options] --sequencer [options] --prover [options] // node, sequencer, prover, remote archiver
aztec start --node [options] --archiver [options] --sequencer [options] --prover [options] // The full server-side stack

aztec start --pxe [options] --node [options] --archiver [options] // run a pxe alongside my own local node

aztec start --p2p-bootstrap [options]

@spypsy spypsy moved this from Todo to In Progress in A3 Dec 20, 2023
@PhilWindle PhilWindle changed the title aztec(-sandbox) should have a cli interface. Consolidate sandbox, node, p2p-bootstrap etc into single binary Jan 3, 2024
@spypsy spypsy mentioned this issue Jan 10, 2024
4 tasks
@spypsy spypsy moved this from In Progress to In Review in A3 Jan 23, 2024
spypsy added a commit that referenced this issue Jan 29, 2024
Closes #3552 
Closes #3811 

- New `aztec` package, replaces `aztec-sandbox`
- New `aztec start` CLI to run Aztec infra (node, sequencer,
archiver, p2p-bootstrap)
@github-project-automation github-project-automation bot moved this from In Review to Done in A3 Jan 29, 2024
michaelelliot pushed a commit to Swoir/noir_rs that referenced this issue Feb 28, 2024
Closes AztecProtocol#3552 
Closes AztecProtocol#3811 

- New `aztec` package, replaces `aztec-sandbox`
- New `aztec start` CLI to run Aztec infra (node, sequencer,
archiver, p2p-bootstrap)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants