Skip to content

Commit def1a60

Browse files
Sneh1999ImJeremyHe
andauthored
Move to v1 integration (#546)
* merge VID changes * fix golang lint * fix nix * run lint * use wasm32-wasip1 * Fix default option * Export ld library * Update dev node (#551) * Update dev node * fix tests * Use the debug image * Set the epoch height to an extremely large value * Update the merkle proof data * Add test data generation script * Test the latest fix * Revert "Test the latest fix" This reverts commit d8810c3. * Pin the docker image version * Update rust dependencies --------- Co-authored-by: Jeremy <[email protected]> (cherry picked from commit 9983816) * fix lint * fix lint --------- Co-authored-by: Jeremy <[email protected]>
1 parent fda7509 commit def1a60

35 files changed

+3281
-1762
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ jobs:
188188
echo "GOMEMLIMIT=6GiB" >> "$GITHUB_ENV"
189189
echo "GOGC=80" >> "$GITHUB_ENV"
190190
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV"
191+
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/target/lib" >> "$GITHUB_ENV"
191192
192193
- name: run tests without race detection and path state scheme
193194
if: matrix.test-mode == 'defaults'

Dockerfile

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ FROM wasm-base AS wasm-libs-builder
4646
RUN apt-get update && \
4747
apt-get install -y clang=1:14.0-55.7~deb12u1 lld=1:14.0-55.7~deb12u1 wabt
4848
# pinned rust 1.81.0
49-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.81.0 --target x86_64-unknown-linux-gnu,wasm32-unknown-unknown,wasm32-wasi
49+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.81.0 --target x86_64-unknown-linux-gnu,wasm32-unknown-unknown,wasm32-wasip1
5050
COPY ./Makefile ./
5151
COPY arbitrator/Cargo.* arbitrator/
5252
COPY arbitrator/arbutil arbitrator/arbutil
@@ -57,6 +57,7 @@ COPY arbitrator/wasm-libraries arbitrator/wasm-libraries
5757
COPY arbitrator/tools/wasmer arbitrator/tools/wasmer
5858
COPY brotli brotli
5959
COPY scripts/build-brotli.sh scripts/
60+
COPY scripts/remove_reference_types.sh scripts/
6061
COPY --from=brotli-wasm-export / target/
6162
RUN apt-get update && apt-get install -y cmake
6263
RUN . ~/.cargo/env && NITRO_BUILD_IGNORE_TIMESTAMPS=1 RUSTFLAGS='-C symbol-mangling-version=v0' make build-wasm-libs
@@ -65,6 +66,7 @@ FROM scratch AS wasm-libs-export
6566
COPY --from=wasm-libs-builder /workspace/ /
6667

6768
FROM wasm-base AS wasm-bin-builder
69+
RUN apt-get update && apt-get install -y wabt
6870
# pinned go version
6971
RUN curl -L https://golang.org/dl/go1.23.1.linux-`dpkg --print-architecture`.tar.gz | tar -C /usr/local -xzf -
7072
COPY ./Makefile ./go.mod ./go.sum ./
@@ -88,13 +90,14 @@ COPY ./safe-smart-account ./safe-smart-account
8890
COPY ./solgen/gen.go ./solgen/
8991
COPY ./fastcache ./fastcache
9092
COPY ./go-ethereum ./go-ethereum
93+
COPY scripts/remove_reference_types.sh scripts/
9194
COPY --from=brotli-wasm-export / target/
9295
COPY --from=contracts-builder workspace/contracts/build/contracts/src/precompiles/ contracts/build/contracts/src/precompiles/
9396
COPY --from=contracts-builder workspace/contracts/node_modules/@offchainlabs/upgrade-executor/build/contracts/src/UpgradeExecutor.sol/UpgradeExecutor.json contracts/
9497
COPY --from=contracts-builder workspace/.make/ .make/
9598
RUN PATH="$PATH:/usr/local/go/bin" NITRO_BUILD_IGNORE_TIMESTAMPS=1 make build-wasm-bin
9699

97-
FROM rust:1.81.0-slim-bookworm AS prover-header-builder
100+
FROM rust:1.83.0-slim-bookworm AS prover-header-builder
98101
WORKDIR /workspace
99102
RUN export DEBIAN_FRONTEND=noninteractive && \
100103
apt-get update && \
@@ -118,7 +121,13 @@ COPY brotli brotli
118121
RUN apt-get update && apt-get install -y cmake
119122
RUN NITRO_BUILD_IGNORE_TIMESTAMPS=1 make build-prover-header
120123

121-
RUN apt-get install -y libssl-dev pkg-config
124+
RUN apt-get update && \
125+
apt-get install -y \
126+
libssl-dev \
127+
pkg-config \
128+
perl \
129+
perl-modules-5.36 \
130+
libfindbin-libs-perl
122131
RUN NITRO_BUILD_IGNORE_TIMESTAMPS=1 make build-espresso-crypto-lib
123132

124133
FROM scratch AS prover-header-export
@@ -224,14 +233,21 @@ RUN ./download-machine.sh consensus-v30 0xb0de9cb89e4d944ae6023a3b62276e54804c24
224233
RUN ./download-machine.sh consensus-v31 0x260f5fa5c3176a856893642e149cf128b5a8de9f828afec8d11184415dd8dc69
225234
RUN ./download-machine.sh consensus-v32 0x184884e1eb9fefdc158f6c8ac912bb183bf3cf83f0090317e0bc4ac5860baa39
226235

227-
FROM golang:1.23.1-bookworm AS node-builder
236+
FROM golang:1.23.4-bookworm AS node-builder
228237
WORKDIR /workspace
229238
ARG version=""
230239
ARG datetime=""
231240
ARG modified=""
232241
ENV NITRO_VERSION=$version
233242
ENV NITRO_DATETIME=$datetime
234243
ENV NITRO_MODIFIED=$modified
244+
245+
# Install Rust and build dependencies
246+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
247+
ENV PATH="/root/.cargo/bin:${PATH}"
248+
RUN apt-get update && \
249+
apt-get install -y wabt pkg-config libssl-dev && \
250+
apt-get clean
235251
RUN export DEBIAN_FRONTEND=noninteractive && \
236252
apt-get update && \
237253
apt-get install -y wabt
@@ -265,6 +281,8 @@ ENTRYPOINT [ "/usr/local/bin/fuzz.bash", "FuzzStateTransition", "--binary-path",
265281

266282
FROM debian:bookworm-slim AS nitro-node-slim
267283
WORKDIR /home/user
284+
COPY --from=node-builder /workspace/target/lib/libespresso_crypto_helper.so /usr/local/lib/
285+
RUN ldconfig
268286
COPY --from=node-builder /workspace/target/bin/nitro /usr/local/bin/
269287
COPY --from=node-builder /workspace/target/bin/relay /usr/local/bin/
270288
COPY --from=node-builder /workspace/target/bin/nitro-val /usr/local/bin/

Makefile

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ arbitrator_cases=arbitrator/prover/test-cases
7070
arbitrator_tests_wat=$(wildcard $(arbitrator_cases)/*.wat)
7171
arbitrator_tests_rust=$(wildcard $(arbitrator_cases)/rust/src/bin/*.rs)
7272

73-
arbitrator_test_wasms=$(patsubst %.wat,%.wasm, $(arbitrator_tests_wat)) $(patsubst $(arbitrator_cases)/rust/src/bin/%.rs,$(arbitrator_cases)/rust/target/wasm32-wasi/release/%.wasm, $(arbitrator_tests_rust)) $(arbitrator_cases)/go/testcase.wasm
73+
arbitrator_test_wasms=$(patsubst %.wat,%.wasm, $(arbitrator_tests_wat)) $(patsubst $(arbitrator_cases)/rust/src/bin/%.rs,$(arbitrator_cases)/rust/target/wasm32-wasip1/release/%.wasm, $(arbitrator_tests_rust)) $(arbitrator_cases)/go/testcase.wasm
7474

7575
arbitrator_tests_link_info = $(shell cat $(arbitrator_cases)/link.txt | xargs)
7676
arbitrator_tests_link_deps = $(patsubst %,$(arbitrator_cases)/%.wasm, $(arbitrator_tests_link_info))
@@ -103,7 +103,7 @@ stylus_files = $(wildcard $(stylus_dir)/*.toml $(stylus_dir)/src/*.rs) $(wasm_li
103103
jit_dir = arbitrator/jit
104104
jit_files = $(wildcard $(jit_dir)/*.toml $(jit_dir)/*.rs $(jit_dir)/src/*.rs $(jit_dir)/src/*/*.rs) $(stylus_files)
105105

106-
wasm32_wasi = target/wasm32-wasi/release
106+
wasm32_wasi = target/wasm32-wasip1/release
107107
wasm32_unknown = target/wasm32-unknown-unknown/release
108108

109109
stylus_dir = arbitrator/stylus
@@ -157,7 +157,14 @@ stylus_benchmarks = $(wildcard $(stylus_dir)/*.toml $(stylus_dir)/src/*.rs) $(st
157157

158158
espresso_crypto_dir = ./espressocrypto/lib/espresso-crypto-helper
159159
espresso_crypto_files = $(wildcard $(espresso_crypto_dir)/*.toml $(espresso_crypto_dir)/src/*.rs)
160-
espresso_crypto_lib = $(output_root)/lib/libespresso_crypto_helper.a
160+
espresso_crypto_lib = $(output_root)/lib/libespresso_crypto_helper
161+
espresso_crypto_filename = libespresso_crypto_helper.so
162+
ifeq ($(UNAME_S), Darwin)
163+
espresso_crypto_filename = libespresso_crypto_helper.dylib
164+
else
165+
export LD_LIBRARY_PATH := $(shell pwd)/target/lib:$LD_LIBRARY_PATH
166+
endif
167+
161168
CBROTLI_WASM_BUILD_ARGS ?=-d
162169

163170
# user targets
@@ -167,7 +174,7 @@ build-espresso-crypto-lib: $(espresso_crypto_lib)
167174
$(espresso_crypto_lib): $(DEP_PREDICATE) $(espresso_crypto_files)
168175
mkdir -p `dirname $(espresso_crypto_lib)`
169176
cargo build --release --manifest-path $(espresso_crypto_dir)/Cargo.toml
170-
install $(espresso_crypto_dir)/target/release/libespresso_crypto_helper.a $@
177+
install $(espresso_crypto_dir)/target/release/$(espresso_crypto_filename) $(output_root)/lib/$(espresso_crypto_filename)
171178

172179
.PHONY: push
173180
push: lint test-go .make/fmt
@@ -355,6 +362,7 @@ $(output_root)/bin/dbconv: $(DEP_PREDICATE) build-node-deps
355362
$(replay_wasm): $(DEP_PREDICATE) $(go_source) .make/solgen
356363
mkdir -p `dirname $(replay_wasm)`
357364
GOOS=wasip1 GOARCH=wasm go build -o $@ ./cmd/replay/...
365+
./scripts/remove_reference_types.sh $@
358366

359367
$(prover_bin): $(DEP_PREDICATE) $(rust_prover_files)
360368
mkdir -p `dirname $(prover_bin)`
@@ -372,7 +380,8 @@ $(arbitrator_jit): $(DEP_PREDICATE) $(jit_files)
372380
install arbitrator/target/release/jit $@
373381

374382
$(arbitrator_cases)/rust/$(wasm32_wasi)/%.wasm: $(arbitrator_cases)/rust/src/bin/%.rs $(arbitrator_cases)/rust/src/lib.rs $(arbitrator_cases)/rust/.cargo/config.toml
375-
cargo build --manifest-path $(arbitrator_cases)/rust/Cargo.toml --release --target wasm32-wasi --config $(arbitrator_cases)/rust/.cargo/config.toml --bin $(patsubst $(arbitrator_cases)/rust/$(wasm32_wasi)/%.wasm,%, $@)
383+
cargo build --manifest-path $(arbitrator_cases)/rust/Cargo.toml --release --target wasm32-wasip1 --config $(arbitrator_cases)/rust/.cargo/config.toml --bin $(patsubst $(arbitrator_cases)/rust/$(wasm32_wasi)/%.wasm,%, $@)
384+
./scripts/remove_reference_types.sh $@
376385

377386
$(arbitrator_cases)/go/testcase.wasm: $(arbitrator_cases)/go/*.go .make/solgen
378387
cd $(arbitrator_cases)/go && GOOS=wasip1 GOARCH=wasm go build -o testcase.wasm
@@ -386,6 +395,7 @@ $(arbitrator_generated_header): $(DEP_PREDICATE) $(stylus_files)
386395
$(output_latest)/wasi_stub.wasm: $(DEP_PREDICATE) $(call wasm_lib_deps,wasi-stub)
387396
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-unknown-unknown --config $(wasm_lib_cargo) --package wasi-stub
388397
install arbitrator/wasm-libraries/$(wasm32_unknown)/wasi_stub.wasm $@
398+
./scripts/remove_reference_types.sh $@
389399

390400
arbitrator/wasm-libraries/soft-float/SoftFloat/build/Wasm-Clang/softfloat.a: $(DEP_PREDICATE) \
391401
arbitrator/wasm-libraries/soft-float/SoftFloat/build/Wasm-Clang/Makefile \
@@ -397,10 +407,10 @@ arbitrator/wasm-libraries/soft-float/SoftFloat/build/Wasm-Clang/softfloat.a: $(D
397407
cd arbitrator/wasm-libraries/soft-float/SoftFloat/build/Wasm-Clang && make $(MAKEFLAGS)
398408

399409
arbitrator/wasm-libraries/soft-float/bindings32.o: $(DEP_PREDICATE) arbitrator/wasm-libraries/soft-float/bindings32.c
400-
clang arbitrator/wasm-libraries/soft-float/bindings32.c --sysroot $(WASI_SYSROOT) -I arbitrator/wasm-libraries/soft-float/SoftFloat/source/include -target wasm32-wasi -Wconversion -c -o $@
410+
clang arbitrator/wasm-libraries/soft-float/bindings32.c --sysroot $(WASI_SYSROOT) -I arbitrator/wasm-libraries/soft-float/SoftFloat/source/include -target wasm32-wasip1 -Wconversion -c -o $@
401411

402412
arbitrator/wasm-libraries/soft-float/bindings64.o: $(DEP_PREDICATE) arbitrator/wasm-libraries/soft-float/bindings64.c
403-
clang arbitrator/wasm-libraries/soft-float/bindings64.c --sysroot $(WASI_SYSROOT) -I arbitrator/wasm-libraries/soft-float/SoftFloat/source/include -target wasm32-wasi -Wconversion -c -o $@
413+
clang arbitrator/wasm-libraries/soft-float/bindings64.c --sysroot $(WASI_SYSROOT) -I arbitrator/wasm-libraries/soft-float/SoftFloat/source/include -target wasm32-wasip1 -Wconversion -c -o $@
404414

405415
$(output_latest)/soft-float.wasm: $(DEP_PREDICATE) \
406416
arbitrator/wasm-libraries/soft-float/bindings32.o \
@@ -426,24 +436,29 @@ $(output_latest)/soft-float.wasm: $(DEP_PREDICATE) \
426436
--export wavm__f64_promote_f32
427437

428438
$(output_latest)/host_io.wasm: $(DEP_PREDICATE) $(call wasm_lib_deps,host-io) $(wasm_lib_go_abi)
429-
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasi --config $(wasm_lib_cargo) --package host-io
439+
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasip1 --config $(wasm_lib_cargo) --package host-io
430440
install arbitrator/wasm-libraries/$(wasm32_wasi)/host_io.wasm $@
441+
./scripts/remove_reference_types.sh $@
431442

432443
$(output_latest)/user_host.wasm: $(DEP_PREDICATE) $(wasm_lib_user_host) $(rust_prover_files) $(output_latest)/forward_stub.wasm .make/machines
433-
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasi --config $(wasm_lib_cargo) --package user-host
444+
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasip1 --config $(wasm_lib_cargo) --package user-host
434445
install arbitrator/wasm-libraries/$(wasm32_wasi)/user_host.wasm $@
446+
./scripts/remove_reference_types.sh $@
435447

436448
$(output_latest)/program_exec.wasm: $(DEP_PREDICATE) $(call wasm_lib_deps,program-exec) $(rust_prover_files) .make/machines
437-
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasi --config $(wasm_lib_cargo) --package program-exec
449+
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasip1 --config $(wasm_lib_cargo) --package program-exec
438450
install arbitrator/wasm-libraries/$(wasm32_wasi)/program_exec.wasm $@
451+
./scripts/remove_reference_types.sh $@
439452

440453
$(output_latest)/user_test.wasm: $(DEP_PREDICATE) $(call wasm_lib_deps,user-test) $(rust_prover_files) .make/machines
441-
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasi --config $(wasm_lib_cargo) --package user-test
454+
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasip1 --config $(wasm_lib_cargo) --package user-test
442455
install arbitrator/wasm-libraries/$(wasm32_wasi)/user_test.wasm $@
456+
./scripts/remove_reference_types.sh $@
443457

444458
$(output_latest)/arbcompress.wasm: $(DEP_PREDICATE) $(call wasm_lib_deps,brotli) $(wasm_lib_go_abi)
445-
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasi --config $(wasm_lib_cargo) --package arbcompress
459+
cargo build --manifest-path arbitrator/wasm-libraries/Cargo.toml --release --target wasm32-wasip1 --config $(wasm_lib_cargo) --package arbcompress
446460
install arbitrator/wasm-libraries/$(wasm32_wasi)/arbcompress.wasm $@
461+
./scripts/remove_reference_types.sh $@
447462

448463
$(output_latest)/forward.wasm: $(DEP_PREDICATE) $(wasm_lib_forward) .make/machines
449464
cargo run --manifest-path $(forward_dir)/Cargo.toml -- --path $(forward_dir)/forward.wat
@@ -465,84 +480,72 @@ $(stylus_test_dir)/%.wasm: $(stylus_test_dir)/%.b $(stylus_lang_bf)
465480

466481
$(stylus_test_keccak_wasm): $(stylus_test_keccak_src)
467482
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
468-
wasm2wat $@ > $@.wat #removing reference types
469-
wat2wasm $@.wat -o $@
483+
./scripts/remove_reference_types.sh $@
470484
@touch -c $@ # cargo might decide to not rebuild the binary
471485

472486
$(stylus_test_keccak-100_wasm): $(stylus_test_keccak-100_src)
473487
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
474-
wasm2wat $@ > $@.wat #removing reference types
475-
wat2wasm $@.wat -o $@
488+
./scripts/remove_reference_types.sh $@
476489
@touch -c $@ # cargo might decide to not rebuild the binary
477490

478491
$(stylus_test_fallible_wasm): $(stylus_test_fallible_src)
479492
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
480-
wasm2wat $@ > $@.wat #removing reference types
481-
wat2wasm $@.wat -o $@
493+
./scripts/remove_reference_types.sh $@
482494
@touch -c $@ # cargo might decide to not rebuild the binary
483495

484496
$(stylus_test_storage_wasm): $(stylus_test_storage_src)
485497
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
486-
wasm2wat $@ > $@.wat #removing reference types
487-
wat2wasm $@.wat -o $@
498+
./scripts/remove_reference_types.sh $@
488499
@touch -c $@ # cargo might decide to not rebuild the binary
489500

490501
$(stylus_test_multicall_wasm): $(stylus_test_multicall_src)
491502
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
492-
wasm2wat $@ > $@.wat #removing reference types
493-
wat2wasm $@.wat -o $@
503+
./scripts/remove_reference_types.sh $@
494504
@touch -c $@ # cargo might decide to not rebuild the binary
495505

496506
$(stylus_test_log_wasm): $(stylus_test_log_src)
497507
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
498-
wasm2wat $@ > $@.wat #removing reference types
499-
wat2wasm $@.wat -o $@
508+
./scripts/remove_reference_types.sh $@
500509
@touch -c $@ # cargo might decide to not rebuild the binary
501510

502511
$(stylus_test_create_wasm): $(stylus_test_create_src)
503512
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
504-
wasm2wat $@ > $@.wat #removing reference types
505-
wat2wasm $@.wat -o $@
513+
./scripts/remove_reference_types.sh $@
506514
@touch -c $@ # cargo might decide to not rebuild the binary
507515

508516
$(stylus_test_math_wasm): $(stylus_test_math_src)
509517
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
510-
wasm2wat $@ > $@.wat #removing reference types
511-
wat2wasm $@.wat -o $@
518+
./scripts/remove_reference_types.sh $@
512519
@touch -c $@ # cargo might decide to not rebuild the binary
513520

514521
$(stylus_test_evm-data_wasm): $(stylus_test_evm-data_src)
515522
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
516-
wasm2wat $@ > $@.wat #removing reference types
517-
wat2wasm $@.wat -o $@
523+
./scripts/remove_reference_types.sh $@
518524
@touch -c $@ # cargo might decide to not rebuild the binary
519525

520526
$(stylus_test_read-return-data_wasm): $(stylus_test_read-return-data_src)
521527
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
522-
wasm2wat $@ > $@.wat #removing reference types
523-
wat2wasm $@.wat -o $@
528+
./scripts/remove_reference_types.sh $@
524529
@touch -c $@ # cargo might decide to not rebuild the binary
525530

526531
$(stylus_test_sdk-storage_wasm): $(stylus_test_sdk-storage_src)
527532
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
528-
wasm2wat $@ > $@.wat #removing reference types
529-
wat2wasm $@.wat -o $@
533+
./scripts/remove_reference_types.sh $@
530534
@touch -c $@ # cargo might decide to not rebuild the binary
531535

532536
$(stylus_test_erc20_wasm): $(stylus_test_erc20_src)
533537
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
534-
wasm2wat $@ > $@.wat #removing reference types
535-
wat2wasm $@.wat -o $@
538+
./scripts/remove_reference_types.sh $@
536539
@touch -c $@ # cargo might decide to not rebuild the binary
537540

538541
$(stylus_test_hostio-test_wasm): $(stylus_test_hostio-test_src)
539542
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
540-
wasm2wat $@ > $@.wat #removing reference types
541-
wat2wasm $@.wat -o $@
543+
./scripts/remove_reference_types.sh $@
542544
@touch -c $@ # cargo might decide to not rebuild the binary
543545

544546
$(stylus_test_hostio-test_wasm): $(stylus_test_hostio-test_src)
545547
$(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo)
548+
./scripts/remove_reference_types.sh $@
546549
@touch -c $@ # cargo might decide to not rebuild the binary
547550

548551
contracts/test/prover/proofs/float%.json: $(arbitrator_cases)/float%.wasm $(prover_bin) $(output_latest)/soft-float.wasm
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
[build]
2-
target = "wasm32-wasi"
2+
target = "wasm32-wasip1"
33

4-
[target.wasm32-wasi]
5-
rustflags = [
6-
"-C", "target-cpu=mvp",
7-
]
4+
[target.wasm32-wasip1]
5+
rustflags = ["-C", "target-cpu=mvp"]
86

97
[unstable]
108
build-std = ["core", "panic_abort", "alloc", "std"]

arbnode/batch_poster.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"sync/atomic"
1717
"time"
1818

19-
hotshotClient "github.com/EspressoSystems/espresso-sequencer-go/client"
20-
lightclient "github.com/EspressoSystems/espresso-sequencer-go/light-client"
19+
hotshotClient "github.com/EspressoSystems/espresso-network-go/client"
20+
lightclient "github.com/EspressoSystems/espresso-network-go/light-client"
2121
"github.com/andybalholm/brotli"
2222
"github.com/ethereum/go-ethereum"
2323
"github.com/ethereum/go-ethereum/accounts/abi"
@@ -34,6 +34,7 @@ import (
3434
"github.com/ethereum/go-ethereum/rlp"
3535
"github.com/ethereum/go-ethereum/rpc"
3636
"github.com/offchainlabs/bold/solgen/go/bridgegen"
37+
3738
"github.com/offchainlabs/nitro/arbnode/dataposter"
3839
"github.com/offchainlabs/nitro/arbnode/dataposter/storage"
3940
"github.com/offchainlabs/nitro/arbnode/redislock"
@@ -185,6 +186,7 @@ type BatchPosterConfig struct {
185186
// Espresso specific flags
186187
LightClientAddress string `koanf:"light-client-address"`
187188
HotShotUrl string `koanf:"hotshot-url"`
189+
FallBackUrl string `koanf:"fall-back-url"`
188190
UseEscapeHatch bool `koanf:"use-escape-hatch"`
189191
EspressoTxnsPollingInterval time.Duration `koanf:"espresso-txns-polling-interval"`
190192
ResubmitEspressoTxDeadline time.Duration `koanf:"resubmit-espresso-tx-deadline"`
@@ -386,7 +388,7 @@ func NewBatchPoster(ctx context.Context, opts *BatchPosterOpts) (*BatchPoster, e
386388
lightClientAddr := opts.Config().LightClientAddress
387389

388390
if hotShotUrl != "" {
389-
hotShotClient := hotshotClient.NewClient(hotShotUrl)
391+
hotShotClient := hotshotClient.NewClient(hotShotUrl, opts.Config().FallBackUrl)
390392
opts.Streamer.espressoClient = hotShotClient
391393
}
392394

0 commit comments

Comments
 (0)