Skip to content

Commit

Permalink
Merge branch 'master' into pathdb_fullnode
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoximenes authored Jul 23, 2024
2 parents af590c3 + 4c74ed8 commit 3af4343
Show file tree
Hide file tree
Showing 19 changed files with 3,377 additions and 163 deletions.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
COPY arbitrator/Cargo.* arbitrator/
COPY ./Makefile ./
COPY arbitrator/arbutil arbitrator/arbutil
COPY arbitrator/bench arbitrator/bench
COPY arbitrator/brotli arbitrator/brotli
COPY arbitrator/caller-env arbitrator/caller-env
COPY arbitrator/prover arbitrator/prover
Expand Down Expand Up @@ -131,21 +132,28 @@ RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
COPY --from=brotli-library-export / target/
COPY arbitrator/Cargo.* arbitrator/
COPY arbitrator/arbutil arbitrator/arbutil
COPY arbitrator/bench arbitrator/bench
COPY arbitrator/brotli arbitrator/brotli
COPY arbitrator/caller-env arbitrator/caller-env
COPY arbitrator/prover/Cargo.toml arbitrator/prover/
COPY arbitrator/prover/benches arbitrator/prover/benches
COPY arbitrator/bench/Cargo.toml arbitrator/bench/
COPY arbitrator/jit/Cargo.toml arbitrator/jit/
COPY arbitrator/stylus/Cargo.toml arbitrator/stylus/
COPY arbitrator/tools/wasmer arbitrator/tools/wasmer
COPY arbitrator/wasm-libraries/user-host-trait/Cargo.toml arbitrator/wasm-libraries/user-host-trait/Cargo.toml
RUN bash -c 'mkdir arbitrator/{prover,jit,stylus}/src arbitrator/wasm-libraries/user-host-trait/src'
RUN echo "fn test() {}" > arbitrator/jit/src/lib.rs && \
echo "fn test() {}" > arbitrator/prover/src/lib.rs && \
echo "fn test() {}" > arbitrator/bench/src/lib.rs && \
echo "fn test() {}" > arbitrator/prover/benches/merkle_bench.rs && \
echo "fn test() {}" > arbitrator/stylus/src/lib.rs && \
echo "fn test() {}" > arbitrator/wasm-libraries/user-host-trait/src/lib.rs && \
cargo build --manifest-path arbitrator/Cargo.toml --release --lib && \
rm arbitrator/prover/src/lib.rs arbitrator/jit/src/lib.rs arbitrator/stylus/src/lib.rs && \
rm arbitrator/wasm-libraries/user-host-trait/src/lib.rs
rm arbitrator/wasm-libraries/user-host-trait/src/lib.rs && \
rm arbitrator/prover/benches/merkle_bench.rs && \
rm arbitrator/bench/src/lib.rs
COPY ./Makefile ./
COPY arbitrator/prover arbitrator/prover
COPY arbitrator/wasm-libraries arbitrator/wasm-libraries
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,10 @@ $(stylus_test_erc20_wasm): $(stylus_test_erc20_src)
@touch -c $@ # cargo might decide to not rebuild the binary

contracts/test/prover/proofs/float%.json: $(arbitrator_cases)/float%.wasm $(prover_bin) $(output_latest)/soft-float.wasm
$(prover_bin) $< -l $(output_latest)/soft-float.wasm -o $@ -b --allow-hostapi --require-success --always-merkleize
$(prover_bin) $< -l $(output_latest)/soft-float.wasm -o $@ -b --allow-hostapi --require-success

contracts/test/prover/proofs/no-stack-pollution.json: $(arbitrator_cases)/no-stack-pollution.wasm $(prover_bin)
$(prover_bin) $< -o $@ --allow-hostapi --require-success --always-merkleize
$(prover_bin) $< -o $@ --allow-hostapi --require-success

target/testdata/preimages.bin:
mkdir -p `dirname $@`
Expand All @@ -455,19 +455,19 @@ contracts/test/prover/proofs/global-state.json:
echo "[]" > $@

contracts/test/prover/proofs/forward-test.json: $(arbitrator_cases)/forward-test.wasm $(arbitrator_tests_forward_deps) $(prover_bin)
$(prover_bin) $< -o $@ --allow-hostapi --always-merkleize $(patsubst %,-l %, $(arbitrator_tests_forward_deps))
$(prover_bin) $< -o $@ --allow-hostapi $(patsubst %,-l %, $(arbitrator_tests_forward_deps))

contracts/test/prover/proofs/link.json: $(arbitrator_cases)/link.wasm $(arbitrator_tests_link_deps) $(prover_bin)
$(prover_bin) $< -o $@ --allow-hostapi --always-merkleize --stylus-modules $(arbitrator_tests_link_deps) --require-success
$(prover_bin) $< -o $@ --allow-hostapi --stylus-modules $(arbitrator_tests_link_deps) --require-success

contracts/test/prover/proofs/dynamic.json: $(patsubst %,$(arbitrator_cases)/%.wasm, dynamic user) $(prover_bin)
$(prover_bin) $< -o $@ --allow-hostapi --always-merkleize --stylus-modules $(arbitrator_cases)/user.wasm --require-success
$(prover_bin) $< -o $@ --allow-hostapi --stylus-modules $(arbitrator_cases)/user.wasm --require-success

contracts/test/prover/proofs/bulk-memory.json: $(patsubst %,$(arbitrator_cases)/%.wasm, bulk-memory) $(prover_bin)
$(prover_bin) $< -o $@ --allow-hostapi --always-merkleize --stylus-modules $(arbitrator_cases)/user.wasm -b
$(prover_bin) $< -o $@ --allow-hostapi --stylus-modules $(arbitrator_cases)/user.wasm -b

contracts/test/prover/proofs/%.json: $(arbitrator_cases)/%.wasm $(prover_bin)
$(prover_bin) $< -o $@ --allow-hostapi --always-merkleize
$(prover_bin) $< -o $@ --allow-hostapi

# strategic rules to minimize dependency building

Expand Down
Loading

0 comments on commit 3af4343

Please sign in to comment.