Skip to content

Commit d237e72

Browse files
authored
Merge branch 'testnet' into feat/bump-sp1-version
2 parents 5e0b3a3 + 7671453 commit d237e72

File tree

9 files changed

+39
-15
lines changed

9 files changed

+39
-15
lines changed

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,10 @@ lint_contracts:
139139
@cd contracts && npm run lint:sol
140140

141141
anvil_start:
142-
@echo "Starting Anvil..."
143-
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
144-
145-
anvil_start_with_block_time:
146142
@echo "Starting Anvil..."
147143
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7
148144

149-
anvil_start_with_block_time_with_more_prefunded_accounts:
145+
anvil_start_with_more_prefunded_accounts:
150146
@echo "Starting Anvil..."
151147
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000
152148

@@ -1154,7 +1150,7 @@ setup_local_aligned_all:
11541150
tmux new-session -d -s aligned_layer
11551151

11561152
tmux new-window -t aligned_layer -n anvil
1157-
tmux send-keys -t aligned_layer 'make anvil_start_with_block_time' C-m
1153+
tmux send-keys -t aligned_layer 'make anvil_start' C-m
11581154

11591155
tmux new-window -t aligned_layer -n aggregator
11601156
tmux send-keys -t aligned_layer:aggregator 'make aggregator_start' C-m

alerts/sender_with_alert.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ do
111111
--proof "./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_${x}_groth16.proof" \
112112
--public_input "./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_${x}_groth16.pub" \
113113
--vk "./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_${x}_groth16.vk" \
114-
--proof_generator_addr $SENDER_ADDRESS \
115114
--private_key $PRIVATE_KEY \
116115
--rpc_url $RPC_URL \
117116
--network $NETWORK \
118117
--max_fee 0.004ether \
118+
--random_address \
119119
2>&1)
120120

121121
echo "$submit"

batcher/aligned-task-sender/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ NUM_WALLETS=<N> make task_sender_generate_and_fund_wallets_holesky_stage
4242
### In Devnet:
4343
Run anvil with more prefunded accounts, using the following make target:
4444
```bash
45-
make anvil_start_with_block_time_with_more_prefunded
45+
make anvil_start_with_more_prefunded_accounts
4646
```
4747

4848
Then run the following make target, with `NUM_WALLETS` being the amount of wallets you want to deposit funds to aligned payment service, up to 1000.

batcher/aligned/src/main.rs

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,42 +88,61 @@ pub struct SubmitArgs {
8888
default_value = "http://localhost:8545"
8989
)]
9090
eth_rpc_url: String,
91+
9192
#[arg(name = "Proving system", long = "proving_system")]
9293
proving_system_flag: ProvingSystemArg,
94+
9395
#[arg(name = "Proof file path", long = "proof")]
9496
proof_file_name: PathBuf,
97+
9598
#[arg(name = "Public input file name", long = "public_input")]
9699
pub_input_file_name: Option<PathBuf>,
100+
97101
#[arg(name = "Verification key file name", long = "vk")]
98102
verification_key_file_name: Option<PathBuf>,
103+
99104
#[arg(name = "VM prgram code file name", long = "vm_program")]
100105
vm_program_code_file_name: Option<PathBuf>,
106+
101107
#[arg(
102108
name = "Number of repetitions",
103109
long = "repetitions",
104110
default_value = "1"
105111
)]
106112
repetitions: usize,
113+
107114
#[arg(
108115
name = "Proof generator address",
109116
long = "proof_generator_addr",
110117
default_value = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
111118
)] // defaults to anvil address 1
112119
proof_generator_addr: String,
120+
113121
#[arg(
114122
name = "Aligned verification data directory Path",
115123
long = "aligned_verification_data_path",
116124
default_value = "./aligned_verification_data/"
117125
)]
118126
batch_inclusion_data_directory_path: String,
127+
119128
#[command(flatten)]
120129
private_key_type: PrivateKeyType,
130+
121131
#[arg(name = "Nonce", long = "nonce")]
122132
nonce: Option<String>, // String because U256 expects hex
133+
123134
#[clap(flatten)]
124135
network: NetworkArg,
136+
125137
#[command(flatten)]
126138
fee_type: FeeType,
139+
140+
#[arg(
141+
name = "Random Address",
142+
long = "random_address",
143+
default_value = "false"
144+
)]
145+
random_address: bool,
127146
}
128147

129148
impl SubmitArgs {
@@ -516,7 +535,15 @@ async fn main() -> Result<(), AlignedError> {
516535

517536
let verification_data = verification_data_from_args(&submit_args)?;
518537

519-
let verification_data_arr = vec![verification_data; repetitions];
538+
let mut verification_data_arr = vec![verification_data; repetitions];
539+
540+
// If random_address flag is enabled, change every address with a random value
541+
if submit_args.random_address {
542+
info!("Randomizing proof generator address for each proof...");
543+
for verification_data in verification_data_arr.iter_mut() {
544+
verification_data.proof_generator_addr = Address::random();
545+
}
546+
}
520547

521548
info!("Submitting proofs to the Aligned batcher...");
522549

docs/3_guides/6_setup_aligned.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This will:
3333
To start anvil, a local Ethereum devnet with all necessary contracts already deployed and ready to be interacted with, run:
3434

3535
```shell
36-
make anvil_start_with_block_time
36+
make anvil_start
3737
```
3838

3939
<details>

docs/3_guides/9_aligned_cli.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ Submit a proof to the Aligned Layer batcher.
8686
- `--default_fee_estimate`: Specifies a `max_fee` equivalent to the cost of 1 proof in a batch of size 10.
8787
- `--instant_fee_estimate`: Specifies a `max_fee` that ensures the proof is included instantly, equivalent to the cost of a proof in a batch of size 1.
8888
- `--custom_fee_estimate <amount_of_proofs_in_batch>`: Specifies a `max_fee` equivalent to the cost of 1 proof in a batch of size `num_proofs_in_batch`.
89-
89+
- `random_address`: If set, random addresses will be used as `proof_generator_addr` for each proof.
90+
- Default: `false`
9091

9192
#### Example:
9293

scripts/fund_operator_devnet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Check that OPERATOR_ADDRESS is not empty
4-
if [[ "$OPERATOR_ADDRESS" -eq "" ]]; then
4+
if [[ -z "$OPERATOR_ADDRESS" ]]; then
55
echo "OPERATOR_ADDRESS is empty, using default value 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
66
OPERATOR_ADDRESS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
77
fi;

scripts/mint_mock_token.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# check that OPERATOR_ADDRESS is not empty
4-
if [[ "$OPERATOR_ADDRESS" -eq "" ]]; then
4+
if [[ -z "$OPERATOR_ADDRESS" ]]; then
55
echo "OPERATOR_ADDRESS is empty, using default value 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
66
OPERATOR_ADDRESS="0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
77
fi;
@@ -17,7 +17,7 @@ mock_token_address=$(cast call "$mock_strategy_address" "underlyingToken()")
1717

1818
operator_address=$(cat "$1" | yq -r '.operator.address')
1919

20-
if [[ "$mock_token_address" -eq "" ]]; then
20+
if [[-z "$mock_token_address" ]]; then
2121
echo "Mock token address is empty, please deploy the contracts first"
2222
exit 1
2323
fi;

scripts/user_fund_payment_service_devnet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Check that OPERATOR_ADDRESS is not empty
4-
if [[ "$USER_ADDRESS" -eq "" ]]; then
4+
if [[ -z "$USER_ADDRESS" ]]; then
55
echo "USER_ADDRESS is empty, using default value 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
66
USER_ADDRESS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
77
USER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

0 commit comments

Comments
 (0)