-
Notifications
You must be signed in to change notification settings - Fork 38
feat(nano): Add HTTP API and CLI to re-run blocks and nano transactions #1575
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: refactor/nano-block-executor-dryrun-2
Are you sure you want to change the base?
Conversation
| self, | ||
| block: Block, | ||
| *, | ||
| dry_run: bool = False, |
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.
Remove dry_run.
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.
Block executor is still checking if a transaction should be skipped or not based on tx.meta.voided_by. It works fine for the actual execution but not for the dry run.
|
| Branch | feat/nano-dry-run |
| Testbed | ubuntu-22.04 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result minutes (m) (Result Δ%) | Lower Boundary minutes (m) (Limit %) | Upper Boundary minutes (m) (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold | 1.68 m(-2.23%)Baseline: 1.72 m | 1.55 m (92.05%) | 2.06 m (81.48%) |
2a64558 to
1fe053a
Compare
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.
Still not running and saving the output.
1fe053a to
50c5dbe
Compare
50c5dbe to
13f57fa
Compare
Motivation
Add HTTP API and CLI support for dry-running nano contract block execution without modifying state. This allows developers to inspect what would happen during NC execution for debugging and verification purposes.
Acceptance Criteria
/nano_contract/dry_runHTTP endpoint that accepts eitherblock_hashortx_hashand returns detailed execution resultsx-nc-dry-runCLI command with--block-hashor--tx-hashoptions, supporting JSON and text output formatsNCDryRunBlockExecutorthat wrapsNCBlockExecutorfor read-only execution with in-memory voided state trackingNCBlockExecutor.execute_block()to accept a should_skip predicateChecklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged