Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,4 @@ A message that is sent from L2 to L1.
| `recipient` | `L1Actor` | The actor on L1 that is to receive the message. |
| `content` | `field (~254 bits)` | The field element containing the content to be consumed by the portal on L1. |

## `RegistrySnapshot`

A snapshot of the registry values.

#include_code registry_snapshot l1-contracts/src/governance/libraries/DataStructures.sol solidity

| Name | Type | Description |
| -------------- | ------- | ----------- |
| `rollup` | `address` | The address of the rollup contract for the snapshot. |
| `blockNumber` | `uint256` | The block number at which the snapshot was created. |




Original file line number Diff line number Diff line change
Expand Up @@ -13,55 +13,26 @@ Retrieves the number of versions that have been deployed.

#include_code registry_number_of_versions l1-contracts/src/governance/interfaces/IRegistry.sol solidity

| Name | Description |
| -------------- | ----------- |
| ReturnValue | The number of versions that have been deployed |
| Name | Description |
| ----------- | ---------------------------------------------- |
| ReturnValue | The number of versions that have been deployed |

## `getRollup()`
Retrieves the current rollup contract.

#include_code registry_get_rollup l1-contracts/src/governance/interfaces/IRegistry.sol solidity

| Name | Description |
| -------------- | ----------- |
| ReturnValue | The current rollup |

## `getVersionFor(address _rollup)`

Retrieve the version of a specific rollup contract.

#include_code registry_get_version_for l1-contracts/src/governance/interfaces/IRegistry.sol solidity
## `getCanonicalRollup()`

| Name | Description |
| -------------- | ----------- |
| `_rollup` | The address of the rollup to lookup |
| ReturnValue | The version number of `_rollup` |

#### Edge cases
Will revert with `Registry__RollupNotRegistered(_rollup)` if the rollup have not been registered.

## `getSnapshot(uint256 _version)`

Retrieve the snapshot of a specific version.

#include_code registry_snapshot l1-contracts/src/governance/libraries/DataStructures.sol solidity
#include_code registry_get_snapshot l1-contracts/src/governance/interfaces/IRegistry.sol solidity

| Name | Description |
| -------------- | ----------- |
| `_version` | The version number to fetch data for |
| ReturnValue.rollup | The address of the `rollup` for the `_version` |
| ReturnValue.blockNumber | The block number of the snapshot creation |
Retrieves the current rollup contract.

#include_code registry_get_canonical_rollup l1-contracts/src/governance/interfaces/IRegistry.sol solidity

## `getCurrentSnapshot()`
| Name | Description |
| ----------- | ------------------ |
| ReturnValue | The current rollup |

Retrieves the snapshot for the current version.
## `getRollup(uint256 _version)`

#include_code registry_get_current_snapshot l1-contracts/src/governance/interfaces/IRegistry.sol solidity
Retrieves the rollup contract for a specfic version.

| Name | Description |
| -------------- | ----------- |
| ReturnValue.rollup | The address of the `rollup` for the current `_version` |
| ReturnValue.blockNumber | The block number of the snapshot creation |
#include_code registry_get_rollup l1-contracts/src/governance/interfaces/IRegistry.sol solidity

| Name | Description |
| ----------- | ------------------ |
| ReturnValue | The current rollup |
12 changes: 7 additions & 5 deletions l1-contracts/gas_benchmark.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
| src/core/Rollup.sol:Rollup contract | | | | | |
|-------------------------------------|-----------------|----------|----------|----------|---------|
| Deployment Cost | Deployment Size | | | | |
| 7944840 | 38653 | | | | |
| 8451525 | 41441 | | | | |
| Function Name | min | avg | median | max | # calls |
| cheat__InitialiseValidatorSet | 13524835 | 13524835 | 13524835 | 13524835 | 1 |
| cheat__InitialiseValidatorSet | 13526635 | 13526635 | 13526635 | 13526635 | 1 |
| getBlock | 1230 | 1230 | 1230 | 1230 | 12 |
| getBurnAddress | 369 | 369 | 369 | 369 | 1 |
| getCurrentEpoch | 1017 | 1017 | 1017 | 1017 | 397 |
| getCurrentProposer | 139908 | 143780 | 140137 | 263958 | 200 |
| getCurrentSlot | 823 | 833 | 823 | 4823 | 397 |
| getEpochCommittee | 135768 | 139483 | 135780 | 259358 | 100 |
| getEpochForBlock | 1016 | 1016 | 1016 | 1016 | 196 |
| getFeeAssetPortal | 519 | 519 | 519 | 519 | 1 |
| getFeeHeader | 1457 | 1457 | 1457 | 1457 | 95 |
| getManaBaseFeeAt | 20442 | 26863 | 27182 | 34313 | 195 |
| getManaBaseFeeAt | 19460 | 25848 | 26200 | 26831 | 195 |
| getPendingBlockNumber | 507 | 511 | 507 | 2507 | 401 |
| getProvenBlockNumber | 490 | 490 | 490 | 490 | 3 |
| getTimestampForSlot | 887 | 887 | 887 | 887 | 195 |
| getVersion | 493 | 513 | 493 | 2493 | 100 |
| setProvingCostPerMana | 25915 | 25942 | 25915 | 28715 | 101 |
| submitEpochRootProof | 771062 | 783900 | 771086 | 809552 | 3 |
| submitEpochRootProof | 778549 | 791392 | 778573 | 817054 | 3 |
| src/periphery/Forwarder.sol:Forwarder contract | | | | | |
|------------------------------------------------|-----------------|--------|--------|---------|---------|
| Deployment Cost | Deployment Size | | | | |
| 358690 | 1553 | | | | |
| Function Name | min | avg | median | max | # calls |
| forward | 634788 | 685012 | 645781 | 1916159 | 100 |
| forward | 627336 | 677587 | 638357 | 1908717 | 100 |
Loading