Skip to content

Commit b54e40a

Browse files
committed
feat: add sepolia to SDK
chore: update ansible batcher
1 parent c2101d4 commit b54e40a

File tree

8 files changed

+70
-37
lines changed

8 files changed

+70
-37
lines changed

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,14 +1349,13 @@ ansible_batcher_create_env: ## Create empty variables files for the Batcher depl
13491349
@echo "Config files for the Batcher created in infra/ansible/playbooks/ini"
13501350
@echo "Please complete the values and run make ansible_batcher_deploy"
13511351

1352-
ansible_batcher_deploy: ## Deploy the Batcher. Parameters: INVENTORY, KEYSTORE
1353-
@if [ -z "$(INVENTORY)" ] || [ -z "$(KEYSTORE)" ]; then \
1354-
echo "Error: Both INVENTORY and KEYSTORE must be set."; \
1352+
ansible_batcher_deploy: ## Deploy the Batcher. Parameters: INVENTORY
1353+
@if [ -z "$(INVENTORY)" ]; then \
1354+
echo "Error: INVENTORY must be set."; \
13551355
exit 1; \
13561356
fi
13571357
@ansible-playbook infra/ansible/playbooks/batcher.yaml \
1358-
-i $(INVENTORY) \
1359-
-e "keystore_path=$(KEYSTORE)"
1358+
-i $(INVENTORY)
13601359

13611360
ansible_aggregator_create_env: ## Create empty variables files for the Aggregator deploy
13621361
@cp -n infra/ansible/playbooks/ini/config-aggregator.ini.example infra/ansible/playbooks/ini/config-aggregator.ini
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"addresses": {
3+
"batcherPaymentService": "0x403dE630751e148bD71BFFcE762E5667C0825399",
4+
"batcherPaymentServiceImplementation": "0xCDafa6c553AFE700964Adf04B577517b2BAe8318"
5+
}
6+
}

crates/Cargo.lock

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/sdk/src/common/constants.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ pub const BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET: &str =
6161
"0xb0567184A52cB40956df6333510d6eF35B89C8de";
6262
pub const BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET_STAGE: &str =
6363
"0x88ad27EfBeF16b6fC5b2E40c5155d61876f847c5";
64+
pub const BATCHER_PAYMENT_SERVICE_ADDRESS_SEPOLIA: &str =
65+
"0x403dE630751e148bD71BFFcE762E5667C0825399";
6466

6567
/// AlignedServiceManager
6668
pub const ALIGNED_SERVICE_MANAGER_DEVNET: &str = "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8";
@@ -70,6 +72,7 @@ pub const ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE: &str =
7072
pub const ALIGNED_SERVICE_MANAGER_MAINNET: &str = "0xeF2A435e5EE44B2041100EF8cbC8ae035166606c";
7173
pub const ALIGNED_SERVICE_MANAGER_MAINNET_STAGE: &str =
7274
"0x96b6a29D7B98519Ae66E6398BD27A76B30a5dC3f";
75+
pub const ALIGNED_SERVICE_MANAGER_SEPOLIA: &str = "0xFf731AB7b3653dc66878DC77E851D174f472d137";
7376

7477
// AlignedProofAggregationService
7578
pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET: &str = "0x0";
@@ -80,10 +83,12 @@ pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_HOLESKY: &str =
8083
"0xe84CD4084d8131841CE6DC265361f81F4C59a1d4";
8184
pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_DEVNET: &str =
8285
"0xFD471836031dc5108809D173A067e8486B9047A3";
86+
pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_SEPOLIA: &str = "0x0";
8387

8488
/// Batcher URL's
8589
pub const BATCHER_URL_DEVNET: &str = "ws://localhost:8080";
8690
pub const BATCHER_URL_HOLESKY: &str = "wss://batcher.alignedlayer.com";
8791
pub const BATCHER_URL_HOLESKY_STAGE: &str = "wss://stage.batcher.alignedlayer.com";
8892
pub const BATCHER_URL_MAINNET: &str = "wss://mainnet.batcher.alignedlayer.com";
8993
pub const BATCHER_URL_MAINNET_STAGE: &str = "wss://mainnetstage.batcher.alignedlayer.com";
94+
pub const BATCHER_URL_SEPOLIA: &str = "wss://sepolia.batcher.alignedlayer.com";

crates/sdk/src/common/types.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ use sha3::{Digest, Keccak256};
2121
use super::constants::{
2222
ALIGNED_PROOF_AGG_SERVICE_ADDRESS_DEVNET, ALIGNED_PROOF_AGG_SERVICE_ADDRESS_HOLESKY,
2323
ALIGNED_PROOF_AGG_SERVICE_ADDRESS_HOLESKY_STAGE, ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET,
24-
ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET_STAGE, ALIGNED_SERVICE_MANAGER_DEVNET,
25-
ALIGNED_SERVICE_MANAGER_HOLESKY, ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE,
26-
ALIGNED_SERVICE_MANAGER_MAINNET, ALIGNED_SERVICE_MANAGER_MAINNET_STAGE,
24+
ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET_STAGE, ALIGNED_PROOF_AGG_SERVICE_ADDRESS_SEPOLIA,
25+
ALIGNED_SERVICE_MANAGER_DEVNET, ALIGNED_SERVICE_MANAGER_HOLESKY,
26+
ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE, ALIGNED_SERVICE_MANAGER_MAINNET,
27+
ALIGNED_SERVICE_MANAGER_MAINNET_STAGE, ALIGNED_SERVICE_MANAGER_SEPOLIA,
2728
BATCHER_PAYMENT_SERVICE_ADDRESS_DEVNET, BATCHER_PAYMENT_SERVICE_ADDRESS_HOLESKY,
2829
BATCHER_PAYMENT_SERVICE_ADDRESS_HOLESKY_STAGE, BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET,
29-
BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET_STAGE, BATCHER_URL_DEVNET, BATCHER_URL_HOLESKY,
30-
BATCHER_URL_HOLESKY_STAGE, BATCHER_URL_MAINNET, BATCHER_URL_MAINNET_STAGE,
30+
BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET_STAGE, BATCHER_PAYMENT_SERVICE_ADDRESS_SEPOLIA,
31+
BATCHER_URL_DEVNET, BATCHER_URL_HOLESKY, BATCHER_URL_HOLESKY_STAGE, BATCHER_URL_MAINNET,
32+
BATCHER_URL_MAINNET_STAGE, BATCHER_URL_SEPOLIA,
3133
};
3234
use super::errors::VerifySignatureError;
3335

@@ -447,6 +449,7 @@ pub enum Network {
447449
HoleskyStage,
448450
Mainnet,
449451
MainnetStage,
452+
Sepolia,
450453
Custom(String, String, String),
451454
}
452455

@@ -458,6 +461,7 @@ impl Network {
458461
Self::HoleskyStage => H160::from_str(ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE).unwrap(),
459462
Self::Mainnet => H160::from_str(ALIGNED_SERVICE_MANAGER_MAINNET).unwrap(),
460463
Self::MainnetStage => H160::from_str(ALIGNED_SERVICE_MANAGER_MAINNET_STAGE).unwrap(),
464+
Self::Sepolia => H160::from_str(ALIGNED_SERVICE_MANAGER_SEPOLIA).unwrap(),
461465
Self::Custom(s, _, _) => H160::from_str(s.as_str()).unwrap(),
462466
}
463467
}
@@ -473,6 +477,7 @@ impl Network {
473477
Self::MainnetStage => {
474478
H160::from_str(BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET_STAGE).unwrap()
475479
}
480+
Self::Sepolia => H160::from_str(BATCHER_PAYMENT_SERVICE_ADDRESS_SEPOLIA).unwrap(),
476481
Self::Custom(_, s, _) => H160::from_str(s.as_str()).unwrap(),
477482
}
478483
}
@@ -488,6 +493,7 @@ impl Network {
488493
Self::MainnetStage => {
489494
H160::from_str(ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET_STAGE).unwrap()
490495
}
496+
Self::Sepolia => H160::from_str(ALIGNED_PROOF_AGG_SERVICE_ADDRESS_SEPOLIA).unwrap(),
491497
Self::Custom(_, s, _) => H160::from_str(s.as_str()).unwrap(),
492498
}
493499
}
@@ -499,6 +505,7 @@ impl Network {
499505
Self::HoleskyStage => BATCHER_URL_HOLESKY_STAGE,
500506
Self::Mainnet => BATCHER_URL_MAINNET,
501507
Self::MainnetStage => BATCHER_URL_MAINNET_STAGE,
508+
Self::Sepolia => BATCHER_URL_SEPOLIA,
502509
Self::Custom(_, _, s) => s.as_str(),
503510
}
504511
}

infra/ansible/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The `caddy-batcher.ini` contains the following variables:
5757
Deploy the Batcher:
5858

5959
```shell
60-
make ansible_batcher_deploy INVENTORY=</path/to/inventory> KEYSTORE=<path/to/keystore/in/your/local>
60+
make ansible_batcher_deploy INVENTORY=</path/to/inventory>
6161
```
6262

6363
## Operator

infra/ansible/playbooks/batcher.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
ansible.builtin.git:
5353
repo: https://github.com/yetanotherco/aligned_layer.git
5454
dest: /home/{{ ansible_user }}/repos/batcher/aligned_layer
55-
version: v0.10.2
55+
version: staging
5656
recursive: false
5757

5858
# Build the batcher
@@ -118,12 +118,12 @@
118118
ansible_ssh_user: "{{ admin_user }}"
119119
batcher_domain: "{{ lookup('ini', 'batcher_domain', file='ini/caddy-batcher.ini') }}"
120120

121-
- name: Copy keystore to server
122-
ansible.builtin.copy:
123-
src: '{{ keystore_path }}'
124-
dest: /home/{{ ansible_user }}/.keystores/batcher
125-
owner: '{{ ansible_user }}'
126-
group: '{{ ansible_user }}'
121+
# - name: Copy keystore to server
122+
# ansible.builtin.copy:
123+
# src: '{{ keystore_path }}'
124+
# dest: /home/{{ ansible_user }}/.keystores/batcher
125+
# owner: '{{ ansible_user }}'
126+
# group: '{{ ansible_user }}'
127127

128128
- name: Start Batcher service
129129
ansible.builtin.systemd_service:
@@ -140,7 +140,7 @@
140140
vars:
141141
ansible_ssh_user: "{{ admin_user }}"
142142

143-
- name: Run node_exporter playbook
144-
ansible.builtin.import_playbook: node_exporter.yaml
145-
vars:
146-
host: batcher
143+
# - name: Run node_exporter playbook
144+
# ansible.builtin.import_playbook: node_exporter.yaml
145+
# vars:
146+
# host: batcher
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
aggregator:
2+
hosts:
3+
aligned-sepolia-aggregator:
4+
ansible_host: aligned-sepolia-aggregator
5+
admin_user: admin
6+
ansible_user: app
7+
ansible_python_interpreter: /usr/bin/python3
8+
9+
batcher:
10+
hosts:
11+
aligned-sepolia-batcher:
12+
ansible_host: aligned-sepolia-batcher
13+
admin_user: admin
14+
ansible_user: app
15+
ansible_python_interpreter: /usr/bin/python3
16+
17+
explorer:
18+
hosts:
19+
aligned-sepolia-explorer:
20+
ansible_host: aligned-sepolia-explorer
21+
admin_user: admin
22+
ansible_user: app
23+
ansible_python_interpreter: /usr/bin/python3
24+
25+
telemetry:
26+
hosts:
27+
aligned-sepolia-telemetry:
28+
ansible_host: aligned-sepolia-telemetry
29+
admin_user: admin
30+
ansible_user: app
31+
ansible_python_interpreter: /usr/bin/python3

0 commit comments

Comments
 (0)