Skip to content

Commit c5b5494

Browse files
MauroToscanoJuArceMechanix97hexcow
authored
# Pull testnet hotfixes (#1873)
Co-authored-by: Julian Arce <[email protected]> Co-authored-by: Mechardo <[email protected]> Co-authored-by: hexcow <[email protected]>
2 parents b63a928 + b77e8fd commit c5b5494

File tree

11 files changed

+43
-19
lines changed

11 files changed

+43
-19
lines changed

Makefile

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

145145
anvil_start:
146-
@echo "Starting Anvil..."
147-
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
148-
149-
anvil_start_with_block_time:
150146
@echo "Starting Anvil..."
151147
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7
152148

153-
anvil_start_with_block_time_with_more_prefunded_accounts:
149+
anvil_start_with_more_prefunded_accounts:
154150
@echo "Starting Anvil..."
155151
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000
156152

@@ -1168,7 +1164,7 @@ setup_local_aligned_all:
11681164
tmux new-session -d -s aligned_layer
11691165

11701166
tmux new-window -t aligned_layer -n anvil
1171-
tmux send-keys -t aligned_layer 'make anvil_start_with_block_time' C-m
1167+
tmux send-keys -t aligned_layer 'make anvil_start' C-m
11721168

11731169
tmux new-window -t aligned_layer -n aggregator
11741170
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

contracts/script/output/holesky/alignedlayer_deployment_output.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"addresses": {
33
"alignedLayerProxyAdmin": "0x3eb924d928c138898FC089328f840105969bD6a0",
44
"alignedLayerServiceManager": "0x58F280BeBE9B34c9939C3C39e0890C81f163B623",
5-
"alignedLayerServiceManagerImplementation": "0x48d70037cC01c31039d476CbbbAe2Aa36F86Ef16",
5+
"alignedLayerServiceManagerImplementation": "0xA13a945B5334038C8D1d63e4Bc6199929F3DDE97",
66
"blsApkRegistry": "0xD0A725d82649f9e4155D7A60B638Fe33b3F25e3b",
77
"blsApkRegistryImplementation": "0xB05BB98a966F58aDAB8dF58350b77fF2131A3b87",
88
"indexRegistry": "0x4A7DE0a9fBBAa4fF0270d31852B363592F68B81F",
@@ -14,7 +14,7 @@
1414
"stakeRegistry": "0x51462D5511563A0F97Bb3Ce5475E1c3905b83F4b",
1515
"stakeRegistryImplementation": "0xd1555Be14931C061E06D3CE1D1Daadc1B3c6F8c7",
1616
"batcherPaymentService": "0x815aeCA64a974297942D2Bbf034ABEe22a38A003",
17-
"batcherPaymentServiceImplementation": "0x07802Aa18a16E6F4d1a3411657a0f6b0a9Cb8Ea1",
17+
"batcherPaymentServiceImplementation": "0x20e3D8D58B4AEAe3ec858825a6Ac5061AaDD53DF",
1818
"pauserRegistry": "0x0CBc10A1142465B2042f3804107A7283044dC6eD"
1919
},
2020
"chainInfo": {

contracts/script/output/holesky/alignedlayer_deployment_output.stage.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"addresses": {
33
"alignedLayerProxyAdmin": "0x7262d34478f8fB496a8feDfa0fdaBD1a0401d6cD",
44
"alignedLayerServiceManager": "0x9C5231FC88059C086Ea95712d105A2026048c39B",
5-
"alignedLayerServiceManagerImplementation": "0x87B8a7dbA67E5015BD24e3f2e1cDf1747819365b",
5+
"alignedLayerServiceManagerImplementation": "0xd8653f06625bD975561D47e26BE0651AAbB60A7C",
66
"blsApkRegistry": "0xEe1b6Dc663F17eC69987b6D56255a7282b358a09",
77
"blsApkRegistryImplementation": "0x875f22C55D5363f7d1d1d63420298E89DcdB7bdF",
88
"indexRegistry": "0xF12b82A933381391fE0e9a0270111f90FB10a810",
@@ -14,7 +14,7 @@
1414
"stakeRegistry": "0x1b0C9b87b094d821911500F91914B1A1D2856F14",
1515
"stakeRegistryImplementation": "0x52A9e264b98fe2d53805937Bc094a981E7eB6BeE",
1616
"batcherPaymentService": "0x7577Ec4ccC1E6C529162ec8019A49C13F6DAd98b",
17-
"batcherPaymentServiceImplementation": "0x230FF8F073C188732856990b070485FD1A9b1039",
17+
"batcherPaymentServiceImplementation": "0x9c95b11d04e0f1a72eEde033Cb2F687Fe0d79fB9",
1818
"pauserRegistry": "0xBCd09a605906a13F917230F82BdAC15B778A5B03"
1919
},
2020
"chainInfo": {

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;

0 commit comments

Comments
 (0)