Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,9 @@ jobs:
- restore_cache:
name: Restore cannon prestate cache
key: cannon-prestate-{{ checksum "./cannon/bin/cannon" }}-{{ checksum "op-program/bin/op-program-client.elf" }}
- run:
name: Sanitize op-program guest
command: make -f cannon/Makefile sanitize-program GUEST_PROGRAM=op-program/bin/op-program-client.elf
- run:
name: generate cannon prestate
command: make cannon-prestate
Expand Down
8 changes: 8 additions & 0 deletions cannon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ clean:
elf:
make -C ./testdata/example elf

sanitize-program:
@if ! { mips-linux-gnu-objdump -d -j .text $$GUEST_PROGRAM | awk '{print $3}' | grep -Ew -m1 '(bgezal|bltzal)'; }; then \
echo "guest program is sanitized for unsupported instructions"; \
else \
echo "found unsupported instructions in the guest program"; \
exit 1; \
fi

contract:
cd ../packages/contracts-bedrock && forge build

Expand Down