Skip to content

Sync SP1 README with new Makefile workflow; add run target#4672

Open
bragaigor wants to merge 2 commits intozk-prove-any/sp1-runnerfrom
braga/sync-readme-sp1-build
Open

Sync SP1 README with new Makefile workflow; add run target#4672
bragaigor wants to merge 2 commits intozk-prove-any/sp1-runnerfrom
braga/sync-readme-sp1-build

Conversation

@bragaigor
Copy link
Copy Markdown
Contributor

Follow-up to #4667, which moved SP1's build pipeline from build.sh to a per-target Makefile but left crates/sp1/README.md describing the old flow. This PR:

  • crates/sp1/README.md: replaces the deleted build.sh instructions with the Makefile-driven workflow: install-sp1, brotli, nitro-deps, build, record-blocks, run, clean. Documents the new target/sp1/block-inputs/ layout (transfer.json, solidity.json, stylus.json, stylus_heavy.json, mixed.json) produced by record-blocks, updates every example invocation
    to use the new paths, and points users at system_tests/block_recording_test.go for adding new blocks.
  • crates/sp1/Makefile: two small quality-of-life fixes plus a new target:
    • brotli: adds a "Building brotli for RISC-V (SP1)…" progress line, and backs up brotli/CMakeLists.txt before patching it so that a trap ... EXIT INT TERM restores the original on any exit path (success, failure, Ctrl-C). Previously the submodule was left dirty after every run.
    • New run target that wraps the sp1-runner invocation. Takes BLOCK= (defaults to stylus), resolving to target/sp1/block-inputs/$(BLOCK).json. The recipe is intentionally unsilenced so make echoes the fully-expanded command for debugging.
  • .github/workflows/zk-proving.yml: replaces the inline sp1-runner invocation with make -C crates/sp1 run BLOCK=stylus, so CI and the README now go through the same code path.

part of NIT-4820

Signed-off-by: Igor Braga <5835477+bragaigor@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.82%. Comparing base (e5a9661) to head (2012519).

❗ There is a different number of reports uploaded between BASE (e5a9661) and HEAD (2012519). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (e5a9661) HEAD (2012519)
7 6
Additional details and impacted files
@@                     Coverage Diff                      @@
##           zk-prove-any/sp1-runner    #4672       +/-   ##
============================================================
- Coverage                    52.67%   33.82%   -18.85%     
============================================================
  Files                          506      501        -5     
  Lines                        60415    60225      -190     
============================================================
- Hits                         31821    20371    -11450     
- Misses                       23493    36296    +12803     
+ Partials                      5101     3558     -1543     

When you invoke $(MAKE) in a recipe, make automatically:
1. Sets MAKEFLAGS (the make variable).
2. Exports MAKEFLAGS as an environment variable.
3. The sub-make reads MAKEFLAGS from the environment at startup and applies
those flags.

Passing $(MAKEFLAGS) as positional arguments (make $(MAKEFLAGS)) is redundant,
 not additive — it's the same info via a second channel. And it's actively
harmful because of the argv quoting rules: MAKEFLAGS stores short flags
concatenated without a leading dash (e.g. w, sw, j4), so when interpolated
onto a command line, w becomes a target, sw becomes a target, etc. The
env-based path has no such ambiguity because make parses it itself.

Signed-off-by: Igor Braga <5835477+bragaigor@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

❌ 11 Tests Failed:

Tests completed Failed Passed Skipped
5016 11 5005 0
View the top 3 failed tests by shortest run time
TestRedisProduceComplex/one_producer,_all_consumers_are_active
Stack Traces | 1.250s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[36mDEBUG�[0m[04-24|21:17:15.501] consumer: setting result                 �[36mcid�[0m=6d75e530-0dba-4238-9e70-19e6c9e21538 �[36mmsgIdInStream�[0m=1777065434389-10 �[36mresultKeyInRedis�[0m=result-key:stream:4cce1e6b-236e-4265-a1cb-d127230a9454.1777065434389-10
�[36mDEBUG�[0m[04-24|21:17:15.501] consumer: xdel                           �[36mcid�[0m=a6e7eae9-aa15-44ca-a1f4-74fd8a44f6f0 �[36mmessageId�[0m=1777065434389-9
�[36mDEBUG�[0m[04-24|21:17:15.501] consumer: xack                           �[36mcid�[0m=6d75e530-0dba-4238-9e70-19e6c9e21538 �[36mmessageId�[0m=1777065434389-10
�[36mDEBUG�[0m[04-24|21:17:15.501] consumer: xack                           �[36mcid�[0m=e3ee532f-767a-40f1-801c-e98cfa706cc0 �[36mmessageId�[0m=1777065434389-8
�[36mDEBUG�[0m[04-24|21:17:15.501] consumer: xdel                           �[36mcid�[0m=6d75e530-0dba-4238-9e70-19e6c9e21538 �[36mmessageId�[0m=1777065434389-10
�[36mDEBUG�[0m[04-24|21:17:15.502] consumer: xdel                           �[36mcid�[0m=e3ee532f-767a-40f1-801c-e98cfa706cc0 �[36mmessageId�[0m=1777065434389-8
�[36mDEBUG�[0m[04-24|21:17:15.505] consumer: xack                           �[36mcid�[0m=d50dc4c2-b81f-4bb8-b818-c0c3ee71e593 �[36mmessageId�[0m=1777065434389-7
�[36mDEBUG�[0m[04-24|21:17:15.506] Redis stream consuming                   �[36mconsumer_id�[0m=ba273618-3a8e-4c35-8eba-50f91b74032f �[36mmessage_id�[0m=1777065434389-11
�[36mDEBUG�[0m[04-24|21:17:15.506] consumer: setting result                 �[36mcid�[0m=ba273618-3a8e-4c35-8eba-50f91b74032f �[36mmsgIdInStream�[0m=1777065434389-11 �[36mresultKeyInRedis�[0m=result-key:stream:4cce1e6b-236e-4265-a1cb-d127230a9454.1777065434389-11
�[36mDEBUG�[0m[04-24|21:17:15.506] consumer: xdel                           �[36mcid�[0m=d50dc4c2-b81f-4bb8-b818-c0c3ee71e593 �[36mmessageId�[0m=1777065434389-7
�[33mWARN �[0m[04-24|21:17:15.506] XClaimJustID returned empty response when indicating heartbeat �[33mmsgID�[0m=1777065434389-8
�[36mDEBUG�[0m[04-24|21:17:15.506] consumer: xack                           �[36mcid�[0m=ba273618-3a8e-4c35-8eba-50f91b74032f �[36mmessageId�[0m=1777065434389-11
�[33mWARN �[0m[04-24|21:17:15.506] XClaimJustID returned empty response when indicating heartbeat �[33mmsgID�[0m=1777065434389-10
�[33mWARN �[0m[04-24|21:17:15.506] XClaimJustID returned empty response when indicating heartbeat �[33mmsgID�[0m=1777065434389-9
�[36mDEBUG�[0m[04-24|21:17:15.506] consumer: xdel                           �[36mcid�[0m=ba273618-3a8e-4c35-8eba-50f91b74032f �[36mmessageId�[0m=1777065434389-11
�[36mDEBUG�[0m[04-24|21:17:15.565] checkResponses                           �[36mresponded�[0m=86 �[36merrored�[0m=0 �[36mchecked�[0m=97
�[36mDEBUG�[0m[04-24|21:17:15.571] redis producer: check responses starting
�[36mDEBUG�[0m[04-24|21:17:15.579] checkResponses                           �[36mresponded�[0m=11 �[36merrored�[0m=0 �[36mchecked�[0m=11
�[36mDEBUG�[0m[04-24|21:17:15.622] Error destroying a stream group          �[36merror�[0m="dial tcp 127.0.0.1:37961: connect: connection refused"
--- FAIL: TestRedisProduceComplex/one_producer,_all_consumers_are_active (1.25s)
TestRedisProduceComplex/one_producer,_all_consumers_are_active
Stack Traces | 1.340s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xack                           �[36mcid�[0m=7e415b28-1417-4555-8265-03d1692794c7 �[36mmessageId�[0m=1777050930967-1
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xdel                           �[36mcid�[0m=e48aee9e-d6f6-447d-bca2-d115b7255657 �[36mmessageId�[0m=1777050930966-14
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xdel                           �[36mcid�[0m=f90189e8-c01f-4bec-a088-3047748b4716 �[36mmessageId�[0m=1777050930966-15
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xack                           �[36mcid�[0m=4a996d34-0f51-471d-8c4f-f1e14a21fec6 �[36mmessageId�[0m=1777050930967-0
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xack                           �[36mcid�[0m=c14c43c5-8b6f-400c-bb89-dc49bd448918 �[36mmessageId�[0m=1777050930983-0
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xdel                           �[36mcid�[0m=7e415b28-1417-4555-8265-03d1692794c7 �[36mmessageId�[0m=1777050930967-1
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xdel                           �[36mcid�[0m=4a996d34-0f51-471d-8c4f-f1e14a21fec6 �[36mmessageId�[0m=1777050930967-0
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xack                           �[36mcid�[0m=fa2d41c4-4d44-4ba9-8121-00ce1a0ae177 �[36mmessageId�[0m=1777050930966-1
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xdel                           �[36mcid�[0m=c14c43c5-8b6f-400c-bb89-dc49bd448918 �[36mmessageId�[0m=1777050930983-0
�[36mDEBUG�[0m[04-24|17:15:32.094] consumer: xdel                           �[36mcid�[0m=fa2d41c4-4d44-4ba9-8121-00ce1a0ae177 �[36mmessageId�[0m=1777050930966-1
�[36mDEBUG�[0m[04-24|17:15:32.092] consumer: xack                           �[36mcid�[0m=e8abcbf2-e7cc-4faa-b96c-aff3bbadd38c �[36mmessageId�[0m=1777050930965-10
�[36mDEBUG�[0m[04-24|17:15:32.095] consumer: xdel                           �[36mcid�[0m=c91f2822-0bd6-4f3c-a8f0-8a1a3d96a9cd �[36mmessageId�[0m=1777050930965-8
�[36mDEBUG�[0m[04-24|17:15:32.095] consumer: xdel                           �[36mcid�[0m=e8abcbf2-e7cc-4faa-b96c-aff3bbadd38c �[36mmessageId�[0m=1777050930965-10
�[36mDEBUG�[0m[04-24|17:15:32.097] consumer: xack                           �[36mcid�[0m=265b5d8c-774d-4432-9047-3e079d9c9276 �[36mmessageId�[0m=1777050930966-3
�[36mDEBUG�[0m[04-24|17:15:32.101] consumer: xdel                           �[36mcid�[0m=265b5d8c-774d-4432-9047-3e079d9c9276 �[36mmessageId�[0m=1777050930966-3
�[36mDEBUG�[0m[04-24|17:15:32.193] checkResponses                           �[36mresponded�[0m=91 �[36merrored�[0m=0 �[36mchecked�[0m=97
�[36mDEBUG�[0m[04-24|17:15:32.204] redis producer: check responses starting
�[36mDEBUG�[0m[04-24|17:15:32.214] checkResponses                           �[36mresponded�[0m=6  �[36merrored�[0m=0 �[36mchecked�[0m=6
�[36mDEBUG�[0m[04-24|17:15:32.281] Error destroying a stream group          �[36merror�[0m="dial tcp 127.0.0.1:43795: connect: connection refused"
--- FAIL: TestRedisProduceComplex/one_producer,_all_consumers_are_active (1.34s)
TestDelayedManualRedeemGroupRevert
Stack Traces | 5.220s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
DEBUG[04-24|19:34:00.960] Served eth_call                          reqid=2222 duration=1.320604ms
TRACE[04-24|19:34:00.959] Removing old queued transactions         count=0
DEBUG[04-24|19:34:00.960] Served eth_call                          reqid=793  duration=9.360329ms
TRACE[04-24|19:34:00.960] Removing unpayable queued transactions   count=0
DEBUG[04-24|19:34:00.960] Pushed sync data from consensus to execution synced=true  maxMessageCount=6  updatedAt=2026-04-24T19:34:00+0000 hasProgressMap=false
DEBUG[04-24|19:34:00.960] Executing EVM call finished              runtime=4.420266ms
DEBUG[04-24|19:34:00.960] Served eth_call                          reqid=931  duration=4.607369ms
TRACE[04-24|19:34:00.960] Promoting queued transactions            count=1
TRACE[04-24|19:34:00.960] Handled RPC response                     reqid=929  duration="1.523µs"
--- FAIL: TestDelayedManualRedeemGroupRevert (5.22s)
DEBUG[04-24|19:34:00.960] Served eth_getBalance                    reqid=759  duration="49.493µs"
TRACE[04-24|19:34:00.960] Handled RPC response                     reqid=759  duration="1.853µs"
DEBUG[04-24|19:34:00.960] Served eth_getCode                       reqid=760  duration="44.253µs"
TRACE[04-24|19:34:00.958] Handled RPC response                     reqid=862  duration=732ns
TRACE[04-24|19:34:00.958] Handled RPC response                     reqid=278  duration=942ns
DEBUG[04-24|19:34:00.960] Served eth_getBlockByNumber              reqid=758  duration="63.69µs"
TRACE[04-24|19:34:00.960] Handled RPC response                     reqid=758  duration="1.643µs"
TRACE[04-24|19:34:00.960] Handled RPC response                     reqid=930  duration="1.242µs"
DEBUG[04-24|19:34:00.960] Distributed transactions                 plaintxs=1 blobtxs=0 largetxs=0 bcastpeers=0 bcastcount=0 annpeers=0 anncount=0
DEBUG[04-24|19:34:00.960] Reinjecting stale transactions           count=0

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@bragaigor bragaigor marked this pull request as ready for review April 24, 2026 21:08
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