Skip to content

Commit f6d4155

Browse files
Merge branch 'staging' into feataggmode/add-subscription-limit-and-arbitrary-expiracy-lists
2 parents 21d2878 + d623ed0 commit f6d4155

28 files changed

+250
-136
lines changed

.github/workflows/build-and-test-rust.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,5 @@ jobs:
124124
- name: Run AggregationMode tests
125125
run: |
126126
cd aggregation_mode/proof_aggregator && cargo test
127-
cd ../batcher && cargo test
127+
cd ../gateway && cargo test
128+
cd ../payments_poller && cargo test

Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,19 +317,25 @@ agg_mode_docker_clean: agg_mode_docker_down
317317
agg_mode_run_migrations: agg_mode_docker_up
318318
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin migrate -- postgres://postgres:postgres@localhost:5435/
319319

320-
agg_mode_batcher_start_local: agg_mode_run_migrations
321-
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin agg_mode_batcher -- config-files/config-agg-mode-batcher.yaml
320+
agg_mode_gateway_start_local: agg_mode_run_migrations
321+
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin gateway -- config-files/config-agg-mode-gateway.yaml
322322

323-
agg_mode_batcher_start_ethereum_package: agg_mode_run_migrations
324-
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin agg_mode_batcher -- config-files/config-agg-mode-batcher-ethereum-package.yaml
323+
agg_mode_gateway_start_ethereum_package: agg_mode_run_migrations
324+
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin gateway -- config-files/config-agg-mode-gateway-ethereum-package.yaml
325+
326+
agg_mode_payments_poller_start_local: agg_mode_run_migrations
327+
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin payments_poller -- config-files/config-agg-mode-gateway.yaml
328+
329+
agg_mode_payments_poller_start_ethereum_package: agg_mode_run_migrations
330+
cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin payments_poller -- config-files/config-agg-mode-gateway-ethereum-package.yaml
325331

326332
AGG_MODE_SENDER ?= 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
327-
agg_mode_batcher_send_payment:
333+
agg_mode_gateway_send_payment:
328334
@cast send --value 1ether \
329335
0x922D6956C99E12DFeB3224DEA977D0939758A1Fe \
330336
--private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
331337

332-
agg_mode_batcher_send_sp1_proof:
338+
agg_mode_gateway_send_sp1_proof:
333339
@cargo run --manifest-path aggregation_mode/cli/Cargo.toml -- submit sp1 \
334340
--proof scripts/test_files/sp1/sp1_fibonacci_5_0_0.proof \
335341
--vk scripts/test_files/sp1/sp1_fibonacci_5_0_0_vk.bin \

aggregation_mode/Cargo.lock

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

aggregation_mode/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
resolver = "2"
3-
members = ["./batcher", "./proof_aggregator", "./db", "./sdk", "./cli"]
3+
members = ["./gateway", "./proof_aggregator", "./db", "./payments_poller", "./sdk", "./cli"]
44

55
[workspace.package]
66
version = "0.1.0"

aggregation_mode/batcher/abi/AggregationModePaymentService.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

aggregation_mode/batcher/src/server/mod.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "agg_mode_batcher"
2+
name = "gateway"
33
version = "0.1.0"
44
edition = "2021"
55

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ use serde::{Deserialize, Serialize};
66
pub struct Config {
77
pub port: u16,
88
pub db_connection_url: String,
9-
pub eth_rpc_url: String,
10-
pub payment_service_address: String,
119
pub network: String,
1210
pub max_daily_proofs_per_user: i64,
1311
}
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -138,29 +138,6 @@ impl Db {
138138
.await
139139
}
140140

141-
pub async fn insert_payment_event(
142-
&self,
143-
address: &str,
144-
started_at: &BigDecimal,
145-
amount: &BigDecimal,
146-
valid_until: &BigDecimal,
147-
tx_hash: &str,
148-
) -> Result<(), sqlx::Error> {
149-
sqlx::query(
150-
"INSERT INTO payment_events (address, started_at, amount, valid_until, tx_hash)
151-
VALUES ($1, $2, $3, $4, $5)
152-
ON CONFLICT (tx_hash) DO NOTHING",
153-
)
154-
.bind(address.to_lowercase())
155-
.bind(started_at)
156-
.bind(amount)
157-
.bind(valid_until)
158-
.bind(tx_hash)
159-
.execute(&self.pool)
160-
.await
161-
.map(|_| ())
162-
}
163-
164141
pub async fn has_active_payment_event(
165142
&self,
166143
address: &str,
File renamed without changes.

0 commit comments

Comments
 (0)