Skip to content

Commit

Permalink
chore: fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Jul 27, 2023
1 parent 9c58976 commit ec5f90d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion l1-contracts/src/core/messagebridge/Inbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ contract Inbox is IInbox {
for (uint256 i = 0; i < _entryKeys.length; i++) {
if (_entryKeys[i] == bytes32(0)) continue;
DataStructures.Entry memory entry = get(_entryKeys[i]);
// @todo Forget that gas exists right now. With transient etc, this can be much more efficient.
if (entry.version != expectedVersion) {
revert Errors.Inbox__InvalidVersion(entry.version, expectedVersion);
}
Expand Down Expand Up @@ -194,6 +193,8 @@ contract Inbox is IInbox {
* @param _entryKey - The key to lookup
* @param _storedFee - The fee stored in the entry
* @param _feePassed - The fee passed into the insertion
* @param _storedVersion - The version stored in the entry
* @param _versionPassed - The version passed into the insertion
* @param _storedDeadline - The deadline stored in the entry
* @param _deadlinePassed - The deadline passed into the insertion
*/
Expand Down
1 change: 0 additions & 1 deletion l1-contracts/src/core/messagebridge/Outbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ contract Outbox is IOutbox {
if (block.chainid != _message.recipient.chainId) revert Errors.Outbox__InvalidChainId();

entryKey = computeEntryKey(_message);
// @todo @LHerskind fetch the version from the entry and check that it matches the message
DataStructures.Entry memory entry = entries.get(entryKey, _errNothingToConsume);
if (entry.version != _message.sender.version) {
revert Errors.Outbox__InvalidVersion(entry.version, _message.sender.version);
Expand Down
6 changes: 3 additions & 3 deletions l1-contracts/src/core/messagebridge/Registry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ contract Registry is IRegistry {

constructor() {
// Inserts a "dead" rollup and message boxes at version 0
// This is simply done to make
// Populate "genesis" to make the first version 1 indexed which fits better with the rest of the system
// This is simply done to make first version 1, which fits better with the rest of the system
upgrade(address(0xdead), address(0xdead), address(0xdead));
}

Expand All @@ -41,7 +40,7 @@ contract Registry is IRegistry {
}

/**
* @notice Returns the version for a specific rollup contract
* @notice Returns the version for a specific rollup contract or reverts if not listed
* @param _rollup - The address of the rollup contract
* @return The version of the rollup contract
*/
Expand Down Expand Up @@ -101,6 +100,7 @@ contract Registry is IRegistry {
* @param _rollup - The address of the rollup contract
* @param _inbox - The address of the inbox contract
* @param _outbox - The address of the outbox contract
* @return The version of the new snapshot
*/
function upgrade(address _rollup, address _inbox, address _outbox)
public
Expand Down

0 comments on commit ec5f90d

Please sign in to comment.