Skip to content

Commit 49d7043

Browse files
authored
docs: updated roles and benchmarks in README.md (#462)
1 parent c4e58f2 commit 49d7043

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

README.md

+20-16
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ just lint
182182
183183
## End to End Benchmarks
184184
185-
The contracts in this repository are benchmarked end-to-end using foundry. The following benchmarks were ran with the underlying [sp1-ics07-tendermint](https://github.com/cosmos/sp1-ics07-tendermint). About ~230,000 gas is used for each light client verification (groth16), and this is included in the gas costs below for `recvPacket`, `timeoutPacket` and `ackPacket`. At the time of writing, proof generation takes around 1 minute. More granular and in-depth benchmarks are planned for the future.
185+
The contracts in this repository are benchmarked end-to-end using foundry. The following benchmarks were ran with the underlying [sp1-ics07-tendermint](https://github.com/cosmos/sp1-ics07-tendermint). About ~230,000 gas is used for each light client verification (groth16), and this is included in the gas costs below for `recvPacket`, `timeoutPacket` and `ackPacket`. At the time of writing, proof generation takes around 25 seconds. More granular and in-depth benchmarks are planned for the future.
186186
187187
### Single Packet Benchmarks
188188
@@ -191,10 +191,10 @@ The following benchmarks are for a single packet transfer without aggregation.
191191
| **Contract** | **Method** | **Description** | **Gas (groth16)** | **Gas (plonk)** |
192192
|:---:|:---:|:---:|:---:|:---:|
193193
| `ICS26Router.sol` | `sendPacket` | Initiating an IBC transfer with an `ERC20`. | ~165,000 | ~165,000 |
194-
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | ~518,340 | ~602,020 |
195-
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | ~1,087,699 | ~1,171,433 |
196-
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | ~392,851 | ~476,578 |
197-
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | ~466,083 | ~550,208 |
194+
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | ~524,474 | ~608,862 |
195+
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | ~1,072,445 | ~1,156,233 |
196+
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | ~399,576 | ~483,375 |
197+
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | ~473,505 | ~556,640 |
198198
199199
### Aggregated Packet Benchmarks
200200
@@ -203,8 +203,8 @@ Since there is no meaningful difference in gas costs between plonk and groth16 i
203203
204204
| **ICS26Router Method** | **Description** | **Avg Gas (25 packets)** | **Avg Gas (50 packets)** | **Calldata size (25 packets)** | **Calldata size (50 packets)** |
205205
|:---:|:---:|:---:|:---:|:---:|:---:|
206-
| `multicall/recvPacket` | Receiving _back_ an `ERC20` token. | ~178,487 | ~172,258 | ~51,172B | ~100,772B |
207-
| `multicall/ackPacket` | Acknowledging an ICS20 packet. | ~91,722 | ~86,018 | ~53,572B | ~105,572B |
206+
| `multicall/recvPacket` | Receiving _back_ an `ERC20` token. | ~179,471 | ~172,804 | ~51,172B | ~100,772B |
207+
| `multicall/ackPacket` | Acknowledging an ICS20 packet. | ~92,621 | ~88,485 | ~53,572B | ~105,572B |
208208
209209
Note: These gas benchmarks are with Groth16.
210210
@@ -306,15 +306,19 @@ Once the **govAdmin** is set, the Security Council must **apply a timelock** to
306306
307307
The IBC contracts use `AccessControl` to manage roles and permissions and allow the admins to reassign roles. The roles are:
308308
309-
| **Role Name** | **Contract** | **Default** | **Description** |
310-
|:---:|:---:|:---:|:---:|
311-
| `PAUSER_ROLE` | `ICS20Transfer.sol` | Set at initialization. | Can pause the contract. |
312-
| `UNPAUSER_ROLE` | `ICS20Transfer.sol` | Set at initialization. | Can unpause the contract. |
313-
| `RATE_LIMITER_ROLE` | `Escrow.sol` | `None` | Can set withdrawal rate limits per `ERC20` token. |
314-
| `RELAYER_ROLE` | `ICS26Router.sol` | `None` | Whitelisted relayer addresses. Anyone can relay if `address(0)` has this role. |
315-
| `PORT_CUSTOMIZER_ROLE` | `ICS26Router.sol` | `None` | Can set custom port ids for applications. |
316-
| `CLIENT_ID_CUSTOMIZER_ROLE` | `ICS26Router.sol` | `None` | Can set custom light client ids for applications. |
317-
| `LIGHT_CLIENT_MIGRATOR_ROLE_{client_id}` | `ICS26Router.sol` | Creator of the light client. | Can migrate the light client identified by `client_id`. |
309+
| **Role Name** | **Contract** | **Description** |
310+
|:---:|:---:|:---:|
311+
| `PAUSER_ROLE` | `ICS20Transfer.sol` | Can pause the contract. |
312+
| `UNPAUSER_ROLE` | `ICS20Transfer.sol` | Can unpause the contract. |
313+
| `TOKEN_OPERATOR_ROLE` | `ICS20Transfer.sol` | Has permission to grant and revoke rate limiter and metadata customizer roles |
314+
| `DELEGATE_SENDER_ROLE` | `ICS20Transfer.sol` | Has permission to call `sendTransferWithSender` |
315+
| `RATE_LIMITER_ROLE` | `Escrow.sol` | Can set withdrawal rate limits per `ERC20` token. |
316+
| `METADATA_CUSTOMIZER_ROLE` | `IBCERC20.sol` | Can set custom `ERC20` metadata to this contract. |
317+
| `PROOF_SUBMITTER_ROLE` | `SP1ICS07Tendermint.sol` | Whitelisted proof submitter addresses. Anyone can submit if `address(0)` has this role. |
318+
| `RELAYER_ROLE` | `ICS26Router.sol` | Whitelisted relayer addresses. Anyone can relay if `address(0)` has this role. |
319+
| `PORT_CUSTOMIZER_ROLE` | `ICS26Router.sol` | Can set custom port ids for applications. |
320+
| `CLIENT_ID_CUSTOMIZER_ROLE` | `ICS26Router.sol` | Can set custom light client ids for applications. |
321+
| `LIGHT_CLIENT_MIGRATOR_ROLE_{client_id}` | `ICS26Router.sol` | Can migrate the light client identified by `client_id`. Creator of the light client has this role by default. |
318322
319323
## License
320324

0 commit comments

Comments
 (0)