Skip to content

feat(SequencerInbox): gas optimization #22

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

Closed
wants to merge 2 commits into from
Closed
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
16 changes: 8 additions & 8 deletions src/bridge/ISequencerInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import "./IBridge.sol";

interface ISequencerInbox is IDelayedMessageProvider {
struct MaxTimeVariation {
uint256 delayBlocks;
uint256 futureBlocks;
uint256 delaySeconds;
uint256 futureSeconds;
uint64 delayBlocks;
uint64 futureBlocks;
uint64 delaySeconds;
uint64 futureSeconds;
}

struct TimeBounds {
Expand Down Expand Up @@ -80,10 +80,10 @@ interface ISequencerInbox is IDelayedMessageProvider {
external
view
returns (
uint256,
uint256,
uint256,
uint256
uint64,
uint64,
uint64,
uint64
);

function dasKeySetInfo(bytes32) external view returns (bool, uint64);
Expand Down
4 changes: 2 additions & 2 deletions test/storage/SequencerInbox.dot
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ rankdir=LR
color=black
arrowhead=open
node [shape=record, style=filled, fillcolor=gray95 fontname="Courier New"]
3 [label="SequencerInbox \<\<Contract\>\>\n | {{ slot| 0 | 1 | 2 | 3 | 4-7 | 8 | 9 } | { type: \<inherited contract\>.variable (bytes) | { uint256: totalDelayedMessagesRead (32) } | { unallocated (12) | IBridge: bridge (20) } | { unallocated (12) | IOwnable: rollup (20) } | { mapping\(address=\>bool\): isBatchPoster (32) } | { <9> ISequencerInbox.MaxTimeVariation: maxTimeVariation (128) } | { <12> mapping\(bytes32=\>DasKeySetInfo\): dasKeySetInfo (32) } | { mapping\(address=\>bool\): isSequencer (32) }}}"]
3 [label="SequencerInbox \<\<Contract\>\>\n | {{ slot| 0 | 1 | 2 | 3 | 4 | 5 | 6 } | { type: \<inherited contract\>.variable (bytes) | { uint256: totalDelayedMessagesRead (32) } | { unallocated (12) | IBridge: bridge (20) } | { unallocated (12) | IOwnable: rollup (20) } | { mapping\(address=\>bool\): isBatchPoster (32) } | { <9> ISequencerInbox.MaxTimeVariation: maxTimeVariation (32) } | { <12> mapping\(bytes32=\>DasKeySetInfo\): dasKeySetInfo (32) } | { mapping\(address=\>bool\): isSequencer (32) }}}"]

1 [label="ISequencerInbox.MaxTimeVariation \<\<Struct\>\>\n | {{ slot| 4 | 5 | 6 | 7 } | { type: variable (bytes) | { uint256: MaxTimeVariation.delayBlocks (32) } | { uint256: MaxTimeVariation.futureBlocks (32) } | { uint256: MaxTimeVariation.delaySeconds (32) } | { uint256: MaxTimeVariation.futureSeconds (32) }}}"]
1 [label="ISequencerInbox.MaxTimeVariation \<\<Struct\>\>\n | {{ slot| 4 } | { type: variable (bytes) | { uint64: MaxTimeVariation.futureSeconds (8) | uint64: MaxTimeVariation.delaySeconds (8) | uint64: MaxTimeVariation.futureBlocks (8) | uint64: MaxTimeVariation.delayBlocks (8) }}}"]

2 [label="DasKeySetInfo \<\<Struct\>\>\n | {{ slot| 0 } | { type: variable (bytes) | { unallocated (23) | uint64: creationBlock (8) | bool: isValidKeyset (1) }}}"]

Expand Down