Skip to content

Commit

Permalink
Merge pull request #28 from Layr-Labs/epociask--fix-EDAA-04
Browse files Browse the repository at this point in the history
fix(sigmap-audit): Add precursor invariants to EigenDA entrypoint
  • Loading branch information
EthenNotEthan authored Oct 25, 2024
2 parents 637e477 + 5ed286d commit e38b07d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
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

0 comments on commit e38b07d

Please sign in to comment.