Skip to content

Commit 129a539

Browse files
fix(examples): l2 missing public inputs when submitting proof to Aligned (#2154)
Co-authored-by: JuArce <[email protected]>
1 parent fa389e1 commit 129a539

File tree

6 files changed

+472
-470
lines changed

6 files changed

+472
-470
lines changed

examples/l2/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gen_devnet_owner_wallet:
77
rm -f ./contract-owner.keystore.json
88
cast wallet import -k . contract-owner.keystore.json --private-key 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a --unsafe-password "<!w5Y%In94Vw"
99
@echo "Funding on Aligned"
10-
cd ../../batcher/aligned/ && \
10+
cd ../../crates/cli/ && \
1111
cargo run --release -- deposit-to-batcher \
1212
--amount 0.01ether \
1313
--private_key 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a \

examples/l2/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ make prove_state_transition
191191

192192
- Wait 24 hs for the proof to be aggregated, or if running locally, run the aggregator with either:
193193

194-
```make start_proof_aggregator_ethereum_package AGGREGATOR=sp1```
194+
```make proof_aggregator_start_ethereum_package AGGREGATOR=sp1```
195195
or with cuda:
196-
```make start_proof_aggregator_gpu_ethereum_package AGGREGATOR=sp1```
196+
```make proof_aggregator_start_gpu_ethereum_package AGGREGATOR=sp1```
197197

198198
- Update state transition on chain:
199199

examples/l2/cmd/utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ pub fn load_config() -> Config {
1111
"holesky" => Network::Holesky,
1212
"holesky-stage" => Network::HoleskyStage,
1313
"devnet" => Network::Devnet,
14-
_ => panic!("Invalid network, possible values are: holesky, holesky-stage, devnet"),
14+
"hoodi" => Network::Hoodi,
15+
_ => panic!("Invalid network, possible values are: holesky, holesky-stage, hoodi, devnet"),
1516
};
1617

1718
let config = Config {

examples/l2/contracts/.env.devnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ OWNER_ADDRESS=0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65
88
# A prefunded rich account
99
PRIVATE_KEY=0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a
1010
# This is the aligned proof aggregator address in devnet
11-
ALIGNED_PROOF_AGGREGATOR_ADDRESS=0xFD471836031dc5108809D173A067e8486B9047A3
11+
ALIGNED_PROOF_AGGREGATOR_ADDRESS=0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc
1212
ETHERSCAN_API_KEY="0x0"

examples/l2/crates/l2/src/aligned.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pub async fn send_proof_to_be_verified_on_aligned(
1212
proof: &sp1_sdk::SP1ProofWithPublicValues,
1313
vm_program_code: Vec<u8>,
1414
) -> AlignedVerificationData {
15+
let pub_input = proof.public_values.to_vec();
1516
let proof = bincode::serialize(proof).expect("Serialize sp1 proof to binary");
1617
let chain_id = get_chain_id(&config.eth_rpc_url)
1718
.await
@@ -28,7 +29,7 @@ pub async fn send_proof_to_be_verified_on_aligned(
2829
proving_system: aligned_sdk::common::types::ProvingSystemId::SP1,
2930
proof,
3031
vm_program_code: Some(vm_program_code),
31-
pub_input: None,
32+
pub_input: Some(pub_input),
3233
verification_key: None,
3334
};
3435

network_params.yaml

Lines changed: 464 additions & 464 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)