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
2 changes: 1 addition & 1 deletion .github/workflows/ci-all-via-ir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
profile: [via-ir-0,via-ir-1,via-ir-2,via-ir-3]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-invariant-intense.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
profile: [invariant-intense-0,invariant-intense-1,invariant-intense-2,invariant-intense-3]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-super-intense.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
profile: [super-intense-0,super-intense-1]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-wake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
profile: [via-ir-off, via-ir-on]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Setup Wake
uses: Ackee-Blockchain/[email protected]
Expand Down
55 changes: 29 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
profile: [post-cancun,post-cancun-via-ir,solc-past-versions-0,solc-past-versions-1,via-ir,min-solc,min-solc-via-ir,intense]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Install Foundry Stable
uses: foundry-rs/foundry-toolchain@v1
with:
Expand Down Expand Up @@ -78,27 +78,30 @@ jobs:
forge test --fuzz-runs 5000
)

tests-ithaca:
name: Forge Ithaca Testing
runs-on: ubuntu-latest
strategy:
matrix:
profile: [post-cancun,post-cancun-via-ir]
steps:
- uses: actions/checkout@v4
- name: Install Foundry Nightly
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
- name: Install Dependencies
run: forge install
- name: Run Tests with ${{ matrix.profile }}
run: |
if [[ "${{ matrix.profile }}" == "post-cancun" ]]; then
FOUNDRY_PROFILE=ithaca forge test --use 0.8.28
elif [[ "${{ matrix.profile }}" == "post-cancun-via-ir" ]]; then
FOUNDRY_PROFILE=ithaca forge test --use 0.8.28 --via-ir
fi
# Disable for now until we can use `foundry.toml` setting to override the
# transaction gas limit. See: EIP-7825.
#
# tests-ithaca:
# name: Forge Ithaca Testing
# runs-on: ubuntu-latest
# strategy:
# matrix:
# profile: [post-cancun,post-cancun-via-ir]
# steps:
# - uses: actions/checkout@v5
# - name: Install Foundry Nightly
# uses: foundry-rs/foundry-toolchain@v1
# with:
# version: nightly
# - name: Install Dependencies
# run: forge install
# - name: Run Tests with ${{ matrix.profile }}
# run: |
# if [[ "${{ matrix.profile }}" == "post-cancun" ]]; then
# FOUNDRY_PROFILE=ithaca forge test --use 0.8.28
# elif [[ "${{ matrix.profile }}" == "post-cancun-via-ir" ]]; then
# FOUNDRY_PROFILE=ithaca forge test --use 0.8.28 --via-ir
# fi

codespell:
runs-on: ${{ matrix.os }}
Expand All @@ -108,7 +111,7 @@ jobs:
- ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Run codespell
uses: codespell-project/[email protected]
with:
Expand All @@ -126,7 +129,7 @@ jobs:
- ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
Expand All @@ -150,11 +153,11 @@ jobs:
- ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
version: nightly
- name: Install Dependencies
run: forge install
- name: Run prep scripts and forge fmt
Expand Down
5 changes: 3 additions & 2 deletions src/utils/MerkleTreeLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,9 @@ library MerkleTreeLib {
mstore(0x00, 0xe7171dc4) // `MerkleTreeLeavesEmpty()`.
revert(0x1c, 0x04)
}
let p := 1 // Padded length.
for {} lt(p, l) {} { p := add(p, p) }
let p := sub(mload(leaves), 1)
for { let i := 1 } lt(i, 0x80) { i := add(i, i) } { p := or(p, shr(i, p)) }
p := add(p, 1)
mstore(result, p) // Store length.
mstore(0x40, add(result, add(0x20, shl(5, p)))) // Allocate memory.
let d := sub(result, leaves)
Expand Down