Skip to content

Commit fa0ba5b

Browse files
committed
Merge branch '311-aggregator-wait-for-receipt-for-1-minute-if-not-bump-the-fee-v2' into test-aggregator-bump-fee
2 parents 47dc924 + 7c4c9ad commit fa0ba5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+15522
-5219
lines changed

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Please delete options that are not relevant.
1414
- [ ] Refactor
1515

1616
## Checklist
17+
18+
- [ ] “Hotfix” to `testnet`, everything else to `staging`
1719
- [ ] Linked to Github Issue
1820
- [ ] This change depends on code or research by an external entity
1921
- [ ] Acknowledgements were updated to give credit
@@ -24,3 +26,6 @@ Please delete options that are not relevant.
2426
- [ ] Benchmarks added/run
2527
- [ ] Has a known issue
2628
- [Link to the open issue addressing it]()
29+
- [ ] If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
30+
- [ ] This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
31+
- [ ] This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ jobs:
2727
cache: false
2828
- name: Build SP1 bindings
2929
run: make build_sp1_linux
30+
- name: Build Old SP1 bindings
31+
run: make build_sp1_linux_old
3032
- name: Build Risc Zero go bindings
3133
run: make build_risc_zero_linux
34+
- name: Build Old Risc Zero go bindings
35+
run: make build_risc_zero_linux_old
3236
- name: Build Merkle Tree bindings
3337
run: make build_merkle_tree_linux
3438
- name: Build operator
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: test-risc-zero-old
2+
3+
on:
4+
merge_group:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: ["*"]
9+
paths:
10+
- "operator/risc_zero_old/**"
11+
- ".github/workflows/test-risc-zero-old.yml"
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Clear device space
18+
run: |
19+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
20+
sudo rm -rf /usr/local/lib/android
21+
sudo rm -rf /opt/ghc
22+
sudo rm -rf /usr/local/.ghcup
23+
sudo rm -rf /usr/share/dotnet
24+
sudo rm -rf /opt/ghc
25+
sudo rm -rf "/usr/local/share/boost"
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-go@v5
28+
with:
29+
go-version: "1.22"
30+
cache: false
31+
- uses: actions-rs/toolchain@v1
32+
with:
33+
toolchain: stable
34+
- name: Test Old Risc Zero Rust
35+
run: make test_risc_zero_rust_ffi_old
36+
- name: Test Old Risc Zero go bindings
37+
run: make test_risc_zero_go_bindings_linux_old

.github/workflows/test-sp1-old.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: test-sp1-old
2+
3+
on:
4+
merge_group:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: ["*"]
9+
paths:
10+
- 'operator/sp1_old/**'
11+
- '.github/workflows/test-sp1-old.yml'
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-go@v5
19+
with:
20+
go-version: '1.22'
21+
cache: false
22+
- uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: stable
25+
- name: Test Old SP1 Rust
26+
run: make test_sp1_rust_ffi_old
27+
- name: Test Old SP1 go bindings
28+
run: make test_sp1_go_bindings_linux_old

Makefile

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OS := $(shell uname -s)
66
CONFIG_FILE?=config-files/config.yaml
77
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml
88

9-
OPERATOR_VERSION=v0.10.0
9+
OPERATOR_VERSION=v0.10.2
1010

1111
ifeq ($(OS),Linux)
1212
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
@@ -17,7 +17,8 @@ ifeq ($(OS),Darwin)
1717
endif
1818

1919
ifeq ($(OS),Linux)
20-
LD_LIBRARY_PATH += $(CURDIR)/operator/risc_zero/lib
20+
export LD_LIBRARY_PATH+=$(CURDIR)/operator/risc_zero_old/lib:$(CURDIR)/operator/risc_zero/lib
21+
OPERATOR_FFIS=$(CURDIR)/operator/risc_zero_old/lib:$(CURDIR)/operator/risc_zero/lib
2122
endif
2223

2324
ifeq ($(OS),Linux)
@@ -141,7 +142,7 @@ build_operator_macos:
141142

142143
build_operator_linux:
143144
@echo "Building Operator..."
144-
@go build -ldflags "-X main.Version=$(OPERATOR_VERSION) -r $(LD_LIBRARY_PATH)" -o ./operator/build/aligned-operator ./operator/cmd/main.go
145+
@go build -ldflags "-X main.Version=$(OPERATOR_VERSION) -r $(OPERATOR_FFIS)" -o ./operator/build/aligned-operator ./operator/cmd/main.go
145146
@echo "Operator built into /operator/build/aligned-operator"
146147

147148
update_operator:
@@ -513,11 +514,11 @@ build_binaries:
513514
__SP1_FFI__: ##
514515
build_sp1_macos:
515516
@cd operator/sp1/lib && cargo build $(RELEASE_FLAG)
516-
@cp operator/sp1/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_ffi.dylib operator/sp1/lib/libsp1_verifier.dylib
517+
@cp operator/sp1/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_ffi.dylib operator/sp1/lib/libsp1_verifier_ffi.dylib
517518

518519
build_sp1_linux:
519520
@cd operator/sp1/lib && cargo build $(RELEASE_FLAG)
520-
@cp operator/sp1/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_ffi.so operator/sp1/lib/libsp1_verifier.so
521+
@cp operator/sp1/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_ffi.so operator/sp1/lib/libsp1_verifier_ffi.so
521522

522523
test_sp1_rust_ffi:
523524
@echo "Testing SP1 Rust FFI source code..."
@@ -542,6 +543,25 @@ generate_risc_zero_empty_journal_proof:
542543
@cd scripts/test_files/risc_zero/no_public_inputs && RUST_LOG=info cargo run --release
543544
@echo "Fibonacci proof and ELF with empty journal generated in scripts/test_files/risc_zero/no_public_inputs folder"
544545

546+
build_sp1_macos_old:
547+
@cd operator/sp1_old/lib && cargo build $(RELEASE_FLAG)
548+
@cp operator/sp1_old/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_old_ffi.dylib operator/sp1_old/lib/libsp1_verifier_old_ffi.dylib
549+
550+
build_sp1_linux_old:
551+
@cd operator/sp1_old/lib && cargo build $(RELEASE_FLAG)
552+
@cp operator/sp1_old/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_old_ffi.so operator/sp1_old/lib/libsp1_verifier_old_ffi.so
553+
554+
test_sp1_rust_ffi_old:
555+
@echo "Testing SP1 Rust FFI source code..."
556+
@cd operator/sp1_old/lib && RUST_MIN_STACK=83886080 cargo t --release
557+
558+
test_sp1_go_bindings_macos_old: build_sp1_macos_old
559+
@echo "Testing SP1 Go bindings..."
560+
go test ./operator/sp1_old/... -v
561+
562+
test_sp1_go_bindings_linux_old: build_sp1_linux_old
563+
@echo "Testing SP1 Go bindings..."
564+
go test ./operator/sp1_old/... -v
545565

546566
__RISC_ZERO_FFI__: ##
547567
build_risc_zero_macos:
@@ -569,6 +589,27 @@ generate_risc_zero_fibonacci_proof:
569589
RUST_LOG=info cargo run --release && \
570590
echo "Fibonacci proof, pub input and image ID generated in scripts/test_files/risc_zero folder"
571591

592+
build_risc_zero_macos_old:
593+
@cd operator/risc_zero_old/lib && cargo build $(RELEASE_FLAG)
594+
@cp operator/risc_zero_old/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_old_ffi.dylib operator/risc_zero_old/lib/librisc_zero_verifier_old_ffi.dylib
595+
596+
build_risc_zero_linux_old:
597+
@cd operator/risc_zero_old/lib && cargo build $(RELEASE_FLAG)
598+
@cp operator/risc_zero_old/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_old_ffi.so operator/risc_zero_old/lib/librisc_zero_verifier_old_ffi.so
599+
600+
test_risc_zero_rust_ffi_old:
601+
@echo "Testing RISC Zero Rust FFI source code..."
602+
@cd operator/risc_zero_old/lib && cargo test --release
603+
604+
test_risc_zero_go_bindings_macos_old: build_risc_zero_macos_old
605+
@echo "Testing RISC Zero Go bindings..."
606+
go test ./operator/risc_zero_old/... -v
607+
608+
test_risc_zero_go_bindings_linux_old: build_risc_zero_linux_old
609+
@echo "Testing RISC Zero Go bindings..."
610+
go test ./operator/risc_zero_old/... -v
611+
612+
572613
__MERKLE_TREE_FFI__: ##
573614
build_merkle_tree_macos:
574615
@cd operator/merkle_tree/lib && cargo build $(RELEASE_FLAG)
@@ -607,13 +648,17 @@ build_all_ffi_macos: ## Build all FFIs for macOS
607648
@echo "Building all FFIs for macOS..."
608649
@$(MAKE) build_sp1_macos
609650
@$(MAKE) build_risc_zero_macos
651+
@$(MAKE) build_sp1_macos_old
652+
@$(MAKE) build_risc_zero_macos_old
610653
@$(MAKE) build_merkle_tree_macos
611654
@echo "All macOS FFIs built successfully."
612655

613656
build_all_ffi_linux: ## Build all FFIs for Linux
614657
@echo "Building all FFIs for Linux..."
615658
@$(MAKE) build_sp1_linux
616659
@$(MAKE) build_risc_zero_linux
660+
@$(MAKE) build_sp1_linux_old
661+
@$(MAKE) build_risc_zero_linux_old
617662
@$(MAKE) build_merkle_tree_linux
618663
@echo "All Linux FFIs built successfully."
619664

batcher/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

batcher/aligned-batcher/src/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -467,16 +467,6 @@ impl Batcher {
467467
return Ok(());
468468
}
469469

470-
// Nonce and max fee verification
471-
let max_fee = nonced_verification_data.max_fee;
472-
if max_fee < U256::from(MIN_FEE_PER_PROOF) {
473-
error!("The max fee signed in the message is less than the accepted minimum fee to be included in the batch.");
474-
send_message(ws_conn_sink.clone(), ValidityResponseMessage::InvalidMaxFee).await;
475-
return Ok(());
476-
}
477-
478-
// Check that we had a user state entry for this user and insert it if not.
479-
480470
// We aquire the lock first only to query if the user is already present and the lock is dropped.
481471
// If it was not present, then the user nonce is queried to the Aligned contract.
482472
// Lastly, we get a lock of the batch state again and insert the user state if it was still missing.

batcher/aligned/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aligned"
3-
version = "0.9.2"
3+
version = "0.10.2"
44
edition = "2021"
55

66
[dependencies]

contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)