Skip to content

Commit 7364e6a

Browse files
committed
Merge remote-tracking branch 'origin/develop' into batch-poster-manager
2 parents b43718a + 7c841ee commit 7364e6a

23 files changed

+378
-302
lines changed

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
printWidth: 100,
1515
singleQuote: false,
1616
bracketSpacing: false,
17-
compiler: '0.8.6',
17+
compiler: '0.8.9',
1818
},
1919
},
2020
],

deploy/SequencerInboxStubCreator.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
import { Toolkit4844 } from '../test/contract/toolkit4844'
2+
13
module.exports = async hre => {
2-
const { deployments, getNamedAccounts, ethers } = hre
4+
const { deployments, getSigners, getNamedAccounts, ethers } = hre
35
const { deploy } = deployments
46
const { deployer } = await getNamedAccounts()
57

68
const bridge = await ethers.getContract('BridgeStub')
7-
const blobBasefeeReader = await ethers.getContract('BlobBasefeeReader')
8-
const dataHashReader = await ethers.getContract('DataHashReader')
9+
const reader4844 = await Toolkit4844.deployReader4844(
10+
await ethers.getSigner(deployer)
11+
)
912
const maxTime = {
1013
delayBlocks: 10000,
1114
futureBlocks: 10000,
@@ -14,14 +17,7 @@ module.exports = async hre => {
1417
}
1518
await deploy('SequencerInboxStub', {
1619
from: deployer,
17-
args: [
18-
bridge.address,
19-
deployer,
20-
maxTime,
21-
117964,
22-
dataHashReader,
23-
blobBasefeeReader,
24-
],
20+
args: [bridge.address, deployer, maxTime, 117964, reader4844.address],
2521
})
2622
}
2723

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"build:all": "yarn build && yarn build:forge",
2222
"build": "hardhat compile",
2323
"build:forge:sol": "forge build --skip *.yul",
24-
"build:forge:yul": "FOUNDRY_PROFILE=yul forge build --skip *.sol --skip *BlobBasefeeReader.yul && FOUNDRY_PROFILE=yul forge build --skip *.sol --skip *DataHashesReader.yul",
24+
"build:forge:yul": "FOUNDRY_PROFILE=yul forge build --skip *.sol",
2525
"build:forge": "yarn build:forge:sol && yarn build:forge:yul",
2626
"lint:test": "eslint ./test",
2727
"solhint": "solhint -f table src/**/*.sol",

src/bridge/ISequencerInbox.sol

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ interface ISequencerInbox is IDelayedMessageProvider {
4747
// solhint-disable-next-line func-name-mixedcase
4848
function HEADER_LENGTH() external view returns (uint256);
4949

50+
/// @dev If the first batch data byte after the header has this bit set,
51+
/// the sequencer inbox has authenticated the data. Currently only used for 4844 blob support.
52+
/// See: https://github.com/OffchainLabs/nitro/blob/69de0603abf6f900a4128cab7933df60cad54ded/arbstate/das_reader.go
53+
// solhint-disable-next-line func-name-mixedcase
54+
function DATA_AUTHENTICATED_FLAG() external view returns (bytes1);
55+
5056
/// @dev If the first data byte after the header has this bit set,
5157
/// then the batch data is to be found in 4844 data blobs
5258
/// See: https://github.com/OffchainLabs/nitro/blob/69de0603abf6f900a4128cab7933df60cad54ded/arbstate/das_reader.go
@@ -147,6 +153,15 @@ interface ISequencerInbox is IDelayedMessageProvider {
147153
IGasRefunder gasRefunder
148154
) external;
149155

156+
function addSequencerL2BatchFromOrigin(
157+
uint256 sequenceNumber,
158+
bytes calldata data,
159+
uint256 afterDelayedMessagesRead,
160+
IGasRefunder gasRefunder,
161+
uint256 prevMessageCount,
162+
uint256 newMessageCount
163+
) external;
164+
150165
function addSequencerL2Batch(
151166
uint256 sequenceNumber,
152167
bytes calldata data,
@@ -156,6 +171,14 @@ interface ISequencerInbox is IDelayedMessageProvider {
156171
uint256 newMessageCount
157172
) external;
158173

174+
function addSequencerL2BatchFromBlobs(
175+
uint256 sequenceNumber,
176+
uint256 afterDelayedMessagesRead,
177+
IGasRefunder gasRefunder,
178+
uint256 prevMessageCount,
179+
uint256 newMessageCount
180+
) external;
181+
159182
// ---------- onlyRollupOrOwner functions ----------
160183

161184
/**
@@ -204,13 +227,3 @@ interface ISequencerInbox is IDelayedMessageProvider {
204227

205228
function initialize(IBridge bridge_, MaxTimeVariation calldata maxTimeVariation_) external;
206229
}
207-
208-
interface IDataHashReader {
209-
/// @notice Returns all the data hashes of all the blobs on the current transaction
210-
function getDataHashes() external view returns (bytes32[] memory);
211-
}
212-
213-
interface IBlobBasefeeReader {
214-
/// @notice Returns the current BLOBBASEFEE
215-
function getBlobBaseFee() external view returns (uint256);
216-
}

0 commit comments

Comments
 (0)