-
Notifications
You must be signed in to change notification settings - Fork 701
[Feature] Leo Devnode CLI command #29012
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
base: master
Are you sure you want to change the base?
Conversation
| tag = "v4.4.0" | ||
| features = [ "test_consensus_heights" ] | ||
| rev = "7787e6e" | ||
| features = ["dev_skip_checks", "test_consensus_heights", "test_targets"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that this will always disable checks in the devnode.
Can we enable dev_skip_checks only if the Leo build feature flag devnode_skip_checks is enabled, so developers can also use the devnode with checks enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe you can also write some comments giving context to future developers:
// We set test_consensus_heights to give developers freedom to set custom consensus version upgrade heights.
// We set test_targets because the devnode's genesis block was created with the same feature flag
| // Prepare the new block. | ||
| let new_block = rest | ||
| .ledger | ||
| .prepare_advance_to_next_beacon_block(&private_key, vec![], vec![], txs, &mut rand::thread_rng()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit funky that all transactions will be pushed into the first block. But I don't think we should necessarily change it. Maybe add a comment for clarity.
vicsn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM besides a few nits!
Motivation
leo devnode is a new tool that creates a local development network to enable developers to rapidly test and iterate through Aleo program design.
leo devnode has two commands: leo devnode start which deploys a local network at localhost:3030 and leo devnode advance which creates a block and adds it to the ledger. leo devnode advance takes an optional value n which advances the ledger by n blocks. Default value is 1.
Furthermore, this PR adds a --skip-execution-proof flag for leo execute commands. This flag will generate transactions without proofs.
A --manual-block-create flag will enable developers to broadcast multiple transactions to a queue without creating a block. In order to advance the ledger, users will need to use the leo devnode advance command.
JS SDK tests
Reviewers are welcome to use the JS SDK Devnode support methods in this script: https://github.com/ProvableHQ/sdk/tree/mainnet/create-leo-app/template-devnode-js