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

feat: Many small features and chores #347

Merged
merged 10 commits into from
Mar 6, 2024
Merged

feat: Many small features and chores #347

merged 10 commits into from
Mar 6, 2024

Conversation

puma314
Copy link
Contributor

@puma314 puma314 commented Mar 3, 2024

  • [docs] update tiny-keccak in docs to not be succinctlabs in patches section
  • [docs] add cycle tracker documentation + cycle tracking example
  • [docs] in patching, tell people how to know whether patch is being applied by looking at the events
  • [cli] in default assets, add [build.rs](http://build.rs) + .vscode/settings.json
    • test new cli/assets
  • [runtime]: make sure to buffer stdout and wait for println before flush
    • test
  • [runtime]: halt has exit code
    • test

Now during program execution, if there is a panic, then the logger will show this

$ cargo run --release
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
warning: [email protected]: fibonacci-program built at 2024-03-02 22:18:45
   Compiling sp1-core v0.1.0 (/Users/umaroy/Documents/sp1/core)
   Compiling fibonacci-script v0.1.0 (/Users/umaroy/Documents/sp1/examples/fibonacci/script)
    Finished release [optimized] target(s) in 9.91s
     Running `target/release/fibonacci-script`
thread 'main' panicked at /Users/umaroy/Documents/sp1/core/src/syscall/halt.rs:15:13:
RISC-V runtime halted during program execution with non-zero exit code 1. This likely means your program panicked during execution.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I also changed it so that during runtime execution, it directly prints to stderr/stdout instead of logger, but I'm open to changing this back:

umaroy@Umas-MacBook-Pro script % cargo run --release
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
warning: [email protected]: fibonacci-program built at 2024-03-02 22:39:01
   Compiling sp1-core v0.1.0 (/Users/umaroy/Documents/sp1/core)
   Compiling fibonacci-script v0.1.0 (/Users/umaroy/Documents/sp1/examples/fibonacci/script)
    Finished release [optimized] target(s) in 9.58s
     Running `target/release/fibonacci-script`
stdout: result: 7442
stdout: result2: 7444
stdout: resuilt3: 7445
stdout:  results4 7446
stderr: thread '<unnamed>' panicked at src/main.rs:21:5:
stderr: assertion `left == right` failed
stderr:   left: 7442
stderr:  right: 0
stderr: stack backtrace:
stderr: note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at /Users/umaroy/Documents/sp1/core/src/syscall/halt.rs:15:13:
RISC-V runtime halted during program execution with non-zero exit code 1. This likely means your program panicked during execution.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

…and stderr, added .vscode folder and build.rs to default project
@puma314 puma314 changed the title feat: Many small features and cores feat: Many small features and chores Mar 3, 2024
book/writing-programs/cycle-tracking.md Outdated Show resolved Hide resolved
core/src/runtime/mod.rs Outdated Show resolved Hide resolved
core/src/syscall/write.rs Outdated Show resolved Hide resolved
core/src/syscall/write.rs Outdated Show resolved Hide resolved
@ctian1 ctian1 merged commit e54dd40 into main Mar 6, 2024
5 checks passed
@ctian1 ctian1 deleted the uma/docs-cycle-tracking branch March 6, 2024 19:40
jtguibas pushed a commit that referenced this pull request Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants