Skip to content

feat(executor): restore bounded guest output capture - #2924

Merged
fakedev9999 merged 8 commits into
mainfrom
fakedev9999/v6-output-consumer
Sep 1, 2026
Merged

fakedev9999 merged 8 commits into
mainfrom
fakedev9999/v6-output-consumer

Conversation

@fakedev9999

@fakedev9999 fakedev9999 commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

What

  • Add optional watch publishers to SP1Context for the latest 2 KiB guest stdout and stderr snapshots.
  • Forward portable output at the minimal VM write boundary and native output through the child stderr drain.
  • Restore SDK stdout and stderr capture methods and test both execution paths.

Why

V6 callers need a panic summary and location after execution when prover logs are unavailable.

Validation

  • cargo check --release --all-targets --all-features --tests
  • cargo check --release --workspace --all-targets --no-default-features
  • cargo clippy --release --all-features --all-targets -- --deny warnings --allow incomplete-features
  • Focused snapshot-bound, writer compatibility, runner panic, SDK panic, and SDK stdout tests
  • cargo fmt --all -- --check

Notes

  • The caller keeps the receiver alive and clones its final value after execution. The native runner joins its stderr drain before it returns.
  • A long-lived receiver borrow can briefly delay the publisher. The intended post-execution read does not hold a borrow during execution.
  • This adds a field to public SP1Context. Known Succinct callers use its builder or ..Default; unknown exhaustive external literals need an update.
  • This replaces feat(executor): capture bounded guest stderr tail in ExecutionReport #2859 without changing ExecutionReport, JIT state, or runner bincode.
  • sp1-cluster consumption remains a follow-up.

@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor
Test Old New Diff
secp256k1_program_test_recover_rand_lte_100 5527378 5528732 0.0245 %
k256_test_point_ops_edge_cases 32628 32628 0.0000 %
curve25519_dalek_test_decompressed_noncanonical 7851 7851 0.0000 %
k256_test_recover_rand_lte_100 4568789 4575033 0.1367 %
curve25519_dalek_ng_test_zero_msm 125094 125094 0.0000 %
secp256k1_program_test_verify_v0_30_0_rand_lte_100 17092578 17094126 0.0091 %
bn_test_bn_test_g1_add_100 998846 998825 -0.0021 %
curve25519_dalek_test_zero_msm 83313 83313 0.0000 %
curve25519_dalek_test_decompressed_expected_value 4561440 4561440 0.0000 %
bls12_381_tests_test_inverse_fp_100 1205483 1205483 0.0000 %
curve25519_dalek_test_add_then_multiply 2809102 2943631 4.7890 %
k256_test_recover_high_hash_high_recid 2113029 2307240 9.1911 %
k256_test_verify_rand_lte_100 11722515 11765823 0.3694 %
p256_test_recover_pubkey_infinity 97102 97102 0.0000 %
curve25519_dalek_test_ed25519_verify 13355529 13355368 -0.0012 %
bn_test_bn_test_g1_msm_edge 411941 411941 0.0000 %
bn_test_bn_test_g1_mul_zero 48333 48333 0.0000 %
bn_test_bn_test_fq_partial_ord 186343 186343 0.0000 %
bls12_381_tests_test_bls_add_100 10376534 10376534 0.0000 %
bls12_381_tests_test_sqrt_fp2_100 2001746 1915292 -4.3189 %
curve25519_dalek_test_zero_mul 71730 71730 0.0000 %
bls12_381_tests_test_sqrt_fp_100 864870 859348 -0.6385 %
sha_test_sha2_v0_10_6_expected_digest_lte_100_times 1356096 1358578 0.1830 %
sha_test_sha3_expected_digest_lte_100_times 1198982 1198887 -0.0079 %
bn_test_bn_test_fr_inverse_100 822631 822631 0.0000 %
secp256k1_program_test_verify_rand_lte_100 17077199 17068890 -0.0487 %
keccack_test_expected_digest_lte_100 1722106 1723843 0.1009 %
curve25519_dalek_ng_test_zero_mul 107709 107709 0.0000 %
k256_test_schnorr_verify 5718600 5715146 -0.0604 %
rustcrypto_bigint_test_bigint_mul_mod_special 1785802 1785802 0.0000 %
secp256k1_program_test_recover_v0_30_0_rand_lte_100 5478770 5478255 -0.0094 %
bn_test_bn_test_fq_sqrt_100 804031 804031 0.0000 %
sha_test_sha2_v0_9_9_expected_digest_lte_100_times 1269571 1265192 -0.3449 %
bls12_381_tests_test_bls_double_100 6310230 6310230 0.0000 %
bn_test_bn_test_g1_double_100 735539 735518 -0.0029 %
bn_test_bn_test_g1_add_neg 299549 299549 0.0000 %
k256_test_recover_pubkey_infinity 101996 101996 0.0000 %
rustcrypto_bigint_test_bigint_mul_add_residue 1747305 1747305 0.0000 %
sha_test_sha2_v0_10_9_expected_digest_lte_100_times 1353502 1358685 0.3829 %
curve25519_dalek_ng_test_add_then_multiply 4061958 4293952 5.7114 %
p256_test_recover_rand_lte_100 15773619 15816774 0.2736 %
sha_test_sha2_v0_10_8_expected_digest_lte_100_times 1354451 1360610 0.4547 %
bls12_381_tests_test_inverse_fp2_100 2230063 2230063 0.0000 %
bn_test_bn_test_fq_inverse_100 805631 805631 0.0000 %
curve25519_dalek_ng_test_decompressed_noncanonical 195347 195347 0.0000 %
rust_crypto_rsa_test_pkcs_verify_100 29251186 29043486 -0.7101 %
p256_test_recover_high_hash_high_recid 4318627 6548675 51.6379 %
p256_test_verify_rand_lte_100 11998111 11966139 -0.2665 %

@fakedev9999
fakedev9999 force-pushed the fakedev9999/v6-output-consumer branch from cc57368 to 76ffc6c Compare August 4, 2026 23:06
@fakedev9999 fakedev9999 changed the title feat(executor): restore guest output channels feat(executor): restore bounded guest output capture Aug 13, 2026
@fakedev9999
fakedev9999 merged commit 528ac76 into main Sep 1, 2026
12 checks passed
@fakedev9999
fakedev9999 deleted the fakedev9999/v6-output-consumer branch September 1, 2026 10:25
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.

3 participants