@@ -9,7 +9,7 @@ This integration branch is PR #21.
9
9
Note that the indentation indicates branch dependencies.
10
10
11
11
- ** evm_TransceiverRegistry_split** (PR #22 ) - This branch splits transceiver admin into a separate contract.
12
- - ** evm_per_chain_transceivers** (PR #26 ) - This branch adds per-chain transceiver support, should also add per-chain thresholds .
12
+ - ** evm_per_chain_transceivers** (PR #26 ) - This branch adds per-chain transceiver and per-chain threshold support .
13
13
- ** evm/add_MsgManager** (PR #23 ) - Creates ` MsgManagerBase ` and ` MsgManager ` and makes ` NttManager ` inherit from ` MsgManagerBase ` .
14
14
- ** evm/add_SharedWormholeTransceiver** (PR #25 ) - Adds a shareable transceiver.
15
15
@@ -20,55 +20,98 @@ I tried moving them, but that increases the size of `NttManagerNoRateLimiting` c
20
20
I'm not sure why that is, or how to avoid it, so I did not pursue that change at this time.
21
21
However, some of the other changes also cause that increase, so maybe we can revist this.
22
22
23
- ## Contract Sizes
24
-
25
- ### Before we started
23
+ ## Contract size before we started
26
24
27
25
``` bash
28
26
evm (main)$ forge build --sizes --via-ir --skip test
29
-
30
27
╭-----------------------------------------+------------------+-------------------+--------------------+---------------------╮
31
28
| Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
32
29
+===========================================================================================================================+
33
30
| -----------------------------------------+------------------+-------------------+--------------------+---------------------|
34
31
| NttManager | 24,066 | 25,673 | 510 | 23,479 |
35
32
| -----------------------------------------+------------------+-------------------+--------------------+---------------------|
36
33
| NttManagerNoRateLimiting | 17,141 | 18,557 | 7,435 | 30,595 |
37
- | -----------------------------------------+------------------+-------------------+--------------------+---------------------|
38
-
34
+ ╰-----------------------------------------+------------------+-------------------+--------------------+---------------------╯
39
35
```
40
36
41
- ### After moving token and mode (the change that wasn't made)
37
+ ## Contract size after moving token and mode (the change that wasn't made)
42
38
43
39
``` bash
44
40
evm (main)$ forge build --sizes --via-ir --skip test
45
-
41
+ ╭-----------------------------------------+------------------+-------------------+--------------------+---------------------╮
42
+ | Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
43
+ +===========================================================================================================================+
46
44
| -----------------------------------------+------------------+-------------------+--------------------+---------------------|
47
45
| NttManager | 24,066 | 25,676 | 510 | 23,476 |
48
46
| -----------------------------------------+------------------+-------------------+--------------------+---------------------|
49
47
| NttManagerNoRateLimiting | 18,788 | 20,281 | 5,788 | 28,871 |
50
- | -----------------------------------------+------------------+-------------------+--------------------+---------------------|
51
-
48
+ ╰-----------------------------------------+------------------+-------------------+--------------------+---------------------╯
52
49
```
53
50
54
- ## Creating TransceiverRegistryAdmin
51
+ ## Creating TransceiverRegistryAdmin (PR #22 )
52
+
53
+ This change creates a separate contract to perform transceiver administration and updates the standard ` TransceiverRegistry `
54
+ to delegate call into the new contract. This reduces the overall size of ` TransceiverRegistry ` and therefore ` NttManager ` .
55
+
56
+ Currently in this PR, ` TransceiverRegistry ` instantiates ` TransceiverRegistryAdmin ` in the constructor, so that I didn't have to update
57
+ all of the deployment code. I think it should actually be passed in as a constructor parameter and be updatable. (I'm not
58
+ saying that ` TransceiverRegistryAdmin ` needs to be upgradeable. We could just make the attribute in ` TransceiverRegistry `
59
+ mutable.)
60
+
61
+ ### Possible Enhancement
62
+
63
+ We could get rid of ` TransceiverRegistry ` altogether, and move the functionality into ` ManagerBase ` and change ` TransceiverRegistryAdmin `
64
+ to ` ManagerBaseAdmin ` . That would allow us to also move the admin code in ` ManagerBase ` into there, and further reduce the
65
+ size of` NttManager ` .
66
+
67
+ ### Contract Size with TransceiverRegistryAdmin
55
68
56
69
``` bash
57
70
evm (main)$ forge build --sizes --via-ir --skip test
58
-
71
+ ╭-----------------------------------------+------------------+-------------------+--------------------+---------------------╮
72
+ | Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
73
+ +===========================================================================================================================+
59
74
| -----------------------------------------+------------------+-------------------+--------------------+---------------------|
60
75
| NttManager | 23,220 | 26,937 | 1,356 | 22,215 |
61
76
| -----------------------------------------+------------------+-------------------+--------------------+---------------------|
62
77
| NttManagerNoRateLimiting | 16,254 | 19,713 | 8,322 | 29,439 |
63
- | -----------------------------------------+------------------+-------------------+--------------------+---------------------|
64
-
78
+ ╰-----------------------------------------+------------------+-------------------+--------------------+---------------------╯
65
79
```
66
80
67
- ## Creating MsgManagerBase
81
+ ## Adding Per-Chain Transceivers (on top of TransceiverRegistryAdmin) (PR #26 )
82
+
83
+ This change allows you to specify different sets of transceivers for each destination chain, as well as different sets
84
+ for sending and receiving. Additionally, it allows you to specify a different threshold for each destination chain.
85
+
86
+ Note that there is no default set of send / receive transceivers. They must be enabled for each chain. This must be handled
87
+ during contract migration.
88
+
89
+ ### Contract Size with Per-Chain Transceivers
68
90
69
91
``` bash
70
92
evm (main)$ forge build --sizes --via-ir --skip test
93
+ ╭-----------------------------------------+------------------+-------------------+--------------------+---------------------╮
94
+ | Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
95
+ +===========================================================================================================================+
96
+ | -----------------------------------------+------------------+-------------------+--------------------+---------------------|
97
+ | NttManager | 24,089 | 31,480 | 487 | 17,672 |
98
+ | -----------------------------------------+------------------+-------------------+--------------------+---------------------|
99
+ | NttManagerNoRateLimiting | 17,150 | 24,275 | 7,426 | 24,877 |
100
+ ╰-----------------------------------------+------------------+-------------------+--------------------+---------------------╯
101
+ ```
102
+
103
+ ## Creating MsgManagerBase (PR #23 )
104
+
105
+ This change adds support for generic message passing. It also updates ` NttManager `
106
+ to use it.
71
107
108
+ ### Contract Size with MsgManagerBase
109
+
110
+ ``` bash
111
+ evm (main)$ forge build --sizes --via-ir --skip test
112
+ ╭-----------------------------------------+------------------+-------------------+--------------------+---------------------╮
113
+ | Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
114
+ +===========================================================================================================================+
72
115
| -----------------------------------------+------------------+-------------------+--------------------+---------------------|
73
116
| NttManager | 24,076 | 25,719 | 500 | 23,433 |
74
117
| -----------------------------------------+------------------+-------------------+--------------------+---------------------|
@@ -77,6 +120,10 @@ evm (main)$ forge build --sizes --via-ir --skip test
77
120
| MsgManager | 12,540 | 13,745 | 12,036 | 35,407 |
78
121
| -----------------------------------------+------------------+-------------------+--------------------+---------------------|
79
122
| MsgManagerWithExecutor | 13,145 | 14,400 | 11,431 | 34,752 |
80
- | -----------------------------------------+------------------+-------------------+--------------------+---------------------|
81
-
123
+ ╰-----------------------------------------+------------------+-------------------+--------------------+---------------------╯
82
124
```
125
+
126
+ ## Shared Transceiver (PR #25 )
127
+
128
+ This change allows a Wormhole transceiver to be shared between multiple ` NttManagers ` . This transceiver does not support relaying
129
+ because it is assumed that the integrator will call the ` Executor ` at a higher level, using something like ` NttManagerWithExecutor ` .
0 commit comments