Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sigmap-audit): Add precursor invariants to EigenDA entrypoint #28

Merged
merged 4 commits into from
Oct 25, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/audit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
install:
name: 'Install'
runs-on: ubuntu-latest
runs-on: linux-2xl
strategy:
matrix:
node-version: [18, 20]
Expand All @@ -30,7 +30,7 @@ jobs:

yarn-audit:
name: Audit
runs-on: ubuntu-latest
runs-on: linux-2xl
needs: install
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/base-branch-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
base_branch_check:
name: Pull request base branch check
runs-on: ubuntu-latest
runs-on: linux-2xl
steps:
- name: Check the pull request base branch
run: |
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
test-unit:
name: Test unit
runs-on: ubuntu-latest
runs-on: linux-2xl
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
test-4844:
name: 4844 tests
runs-on: ubuntu-latest
runs-on: linux-2xl
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -125,7 +125,6 @@ jobs:

- uses: Layr-Labs/arbitrum-actions/run-nitro-test-node@main
with:
nitro-testnode-ref: deneb-integration
args: --pos
no-token-bridge: true

Expand All @@ -146,7 +145,7 @@ jobs:
run: yarn test:4844
test-e2e:
name: Test e2e
runs-on: ubuntu-latest
runs-on: linux-2xl
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -176,7 +175,7 @@ jobs:
run: yarn test:e2e
test-e2e-custom-fee-token:
name: Test e2e custom fee token
runs-on: ubuntu-latest
runs-on: linux-2xl
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -207,7 +206,7 @@ jobs:
run: yarn test:e2e
test-e2e-fee-token-6-decimals:
name: Test e2e fee token with 6 decimals
runs-on: ubuntu-latest
runs-on: linux-2xl
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/slither.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
analyze:
runs-on: ubuntu-latest
runs-on: linux-2xl
steps:
- uses: actions/checkout@v4

Expand Down
3 changes: 3 additions & 0 deletions src/bridge/SequencerInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
AlreadyInit,
HadZeroInit,
BadPostUpgradeInit,
NotEOA,
NotOrigin,
DataTooLarge,
DelayedBackwards,
Expand Down Expand Up @@ -479,7 +480,9 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
uint256 prevMessageCount,
uint256 newMessageCount
) external refundsGas(gasRefunder, IReader4844(address(0))) {
if(msg.sender != tx.origin) revert NotOrigin();
if (!isBatchPoster[msg.sender]) revert NotBatchPoster();
if (address(msg.sender).code.length > 0) revert NotEOA();
// Verify that the blob was actually included before continuing
eigenDARollupManager.verifyBlob(cert.blobHeader, cert.blobVerificationProof);
// Form the EigenDA data hash and get the time bounds
Expand Down
3 changes: 3 additions & 0 deletions src/libraries/Error.sol
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ error IncorrectMessagePreimage();
/// @dev This can only be called by the batch poster
error NotBatchPoster();

/// @dev This can only be called by an EOA account without EIP-7702 enabled
error NotEOA();

/// @dev The sequence number provided to this message was inconsistent with the number of batches already included
error BadSequencerNumber(uint256 stored, uint256 received);

Expand Down
Loading