-
Notifications
You must be signed in to change notification settings - Fork 29
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
Acp 77 updates #585
Acp 77 updates #585
Changes from 26 commits
6121347
6e8fa6b
f1a5147
b412e48
9515841
3b06b23
80902f0
b015856
54e0c76
e6ffd3b
90967aa
907e41d
506c603
29214d2
85daef0
5f26868
3f0b287
f74c575
0ca3a53
2207e65
b553d96
f90c70d
f4bb683
f281179
06a244e
d6e0632
ead93bc
7c1e007
72ea62d
63bad1a
406caf7
2d5bbb3
3b62b9b
c8ebfd2
5a76c07
0fa2ae8
c3a0640
70b85e9
b4710e5
c9320a9
7136669
3ecdb46
2f3390a
e033da0
e0e108b
f57c860
11e8a39
0cb408f
380fc9a
a3b77b0
9123f15
ec11cd1
9a962ed
f49fe5f
6ec27cc
02ce9d0
43c2279
391b03c
cbe7a7e
4bd2158
098442e
646e4dd
4cbde54
dac3220
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,4 @@ server.log | |
|
||
# Forge documentation | ||
docs/ | ||
coverage/ |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,115 @@ | ||
## Warp Message Format Reference | ||
|
||
### `SubnetConversionMessage` | ||
|
||
- Description: Confirms conversion to a Permissionless Subnet on the P-Chain | ||
|
||
- Signed by: P-Chain | ||
|
||
- Consumed by: Validator Manager contract | ||
|
||
Specification: | ||
|
||
``` | ||
SubnetConversionMessage | ||
+--------------------+----------+----------+ | ||
| codecID : uint16 | 2 bytes | | ||
+--------------------+----------+----------+ | ||
| typeID : uint32 | 4 bytes | | ||
+--------------------+----------+----------+ | ||
| subnetConversionID : [32]byte | 32 bytes | | ||
+--------------------+----------+----------+ | ||
| 38 bytes | | ||
+----------+ | ||
``` | ||
|
||
where `subnetConversionID` is defined as the `sha256` hash of the serialization of the `SubnetConversionData`, defined as follows: | ||
|
||
``` | ||
ValidatorData | ||
+--------------+----------+------------------------+ | ||
| nodeID : []byte | 4 + len(nodeID) bytes | | ||
+--------------+----------+------------------------+ | ||
| blsPublicKey : [48]byte | 48 bytes | | ||
+--------------+----------+------------------------+ | ||
| weight : uint64 | 8 bytes | | ||
+--------------+----------+------------------------+ | ||
| 60 + len(nodeID) bytes | | ||
+------------------------+ | ||
|
||
SubnetConversionData | ||
+----------------+-----------------+--------------------------------------------------------+ | ||
| codecID : uint16 | 2 bytes | | ||
+----------------+-----------------+--------------------------------------------------------+ | ||
| subnetID : [32]byte | 32 bytes | | ||
+----------------+-----------------+--------------------------------------------------------+ | ||
| managerChainID : [32]byte | 32 bytes | | ||
+----------------+-----------------+--------------------------------------------------------+ | ||
| managerAddress : []byte | 4 + len(managerAddress) bytes | | ||
+----------------+-----------------+--------------------------------------------------------+ | ||
| validators : []ValidatorData | 4 + sum(validatorLengths) bytes | | ||
+----------------+-----------------+--------------------------------------------------------+ | ||
| 74 + len(managerAddress) + len(validatorLengths) bytes | | ||
+--------------------------------------------------------+ | ||
``` | ||
|
||
### `RegisterSubnetValidatorMessage` | ||
|
||
Description: Register a Subnet Validator on the P-Chain | ||
- Description: Registers a Subnet Validator on the P-Chain | ||
|
||
Signed by: Subnet | ||
Consumed by: P-Chain | ||
- Signed by: Subnet | ||
|
||
- Consumed by: P-Chain | ||
|
||
Specification: | ||
|
||
``` | ||
+--------------+----------+-----------+ | ||
| codecID : uint16 | 2 bytes | | ||
+--------------+----------+-----------+ | ||
| typeID : uint32 | 4 bytes | | ||
+--------------+----------+-----------+ | ||
| subnetID : [32]byte | 32 bytes | | ||
+--------------+----------+-----------+ | ||
| nodeID : [32]byte | 32 bytes | | ||
+--------------+----------+-----------+ | ||
| weight : uint64 | 8 bytes | | ||
+--------------+----------+-----------+ | ||
| blsPublicKey : [48]byte | 48 bytes | | ||
+--------------+----------+-----------+ | ||
| expiry : uint64 | 8 bytes | | ||
+--------------+----------+-----------+ | ||
| 134 bytes | | ||
+-----------+ | ||
PChainOwner | ||
+-----------+------------+-------------------------------+ | ||
| threshold : uint32 | 4 bytes | | ||
+-----------+------------+-------------------------------+ | ||
| addresses : [][20]byte | 4 + len(addresses) * 20 bytes | | ||
+-----------+------------+-------------------------------+ | ||
| 8 + len(addresses) * 20 bytes | | ||
+-------------------------------+ | ||
|
||
RegisterSubnetValidatorMessage | ||
+-----------------------+-------------+--------------------------------------------------------------------+ | ||
| codecID : uint16 | 2 bytes | | ||
+-----------------------+-------------+--------------------------------------------------------------------+ | ||
| typeID : uint32 | 4 bytes | | ||
+-----------------------+-------------+-------------------------------------------------------------------+ | ||
| subnetID : [32]byte | 32 bytes | | ||
+-----------------------+-------------+--------------------------------------------------------------------+ | ||
| nodeID : []byte | 4 + len(nodeID) bytes | | ||
+-----------------------+-------------+--------------------------------------------------------------------+ | ||
| blsPublicKey : [48]byte | 48 bytes | | ||
+-----------------------+-------------+--------------------------------------------------------------------+ | ||
| expiry : uint64 | 8 bytes | | ||
+-----------------------+-------------+--------------------------------------------------------------------+ | ||
| remainingBalanceOwner : PChainOwner | 4 + len(addresses) * 20 bytes | | ||
+-----------------------+-------------+--------------------------------------------------------------------+ | ||
| disableOwner : PChainOwner | 4 + len(addresses) * 20 bytes | | ||
+-----------------------+-------------+--------------------------------------------------------------------+ | ||
| weight : uint64 | 8 bytes | | ||
+-----------------------+-------------+--------------------------------------------------------------------+ | ||
| 114 + len(nodeID) + (len(addresses1) + len(addresses2)) * 20 bytes | | ||
+--------------------------------------------------------------------+ | ||
|
||
``` | ||
|
||
### `SubnetValidatorRegistrationMessage` | ||
|
||
Description: Confirms a Subnet Validator's registration validity on the P-Chain | ||
- Description: Confirms a Subnet Validator's registration validity on the P-Chain | ||
|
||
- Signed by: P-Chain | ||
|
||
Signed by: P-Chain | ||
Consumed by: Validator Manager contract | ||
- Consumed by: Validator Manager contract | ||
|
||
Specification: | ||
|
||
``` | ||
SubnetValidatorRegistrationMessage | ||
+--------------+----------+----------+ | ||
| codecID : uint16 | 2 bytes | | ||
+--------------+----------+----------+ | ||
|
@@ -53,39 +123,27 @@ Specification: | |
+----------+ | ||
``` | ||
|
||
### `ValidationUptimeMessage` | ||
### `SubnetValidatorWeightMessage` | ||
|
||
Description: Provides a Validator's uptime for calculating staking rewards | ||
- Description: Used to set and acknowledge a Validator's stake weight on another chain | ||
|
||
Signed by: Subnet | ||
Consumed by: Validator Manager contract | ||
- To effect a weight change: | ||
|
||
Specification: | ||
- Signed by: Subnet | ||
|
||
``` | ||
+--------------+----------+----------+ | ||
| codecID : uint16 | 2 bytes | | ||
+--------------+----------+----------+ | ||
| typeID : uint32 | 4 bytes | | ||
+--------------+----------+----------+ | ||
| validationID : [32]byte | 32 bytes | | ||
+--------------+----------+----------+ | ||
| uptime : uint64 | 8 bytes | | ||
+--------------+----------+----------+ | ||
| 46 bytes | | ||
+----------+ | ||
``` | ||
- Consumed by: P-Chain | ||
|
||
### `SetSubnetValidatorWeightMessage` | ||
- To acknowledge the weight change: | ||
|
||
Description: Used to set a Validator's stake weight on another chain | ||
- Signed by P-Chain | ||
|
||
Signed by: Subnet | ||
Consumed by: P-Chain | ||
|
||
- Consumed by Subnet | ||
|
||
Specification: | ||
|
||
``` | ||
SubnetValidatorWeightMessage | ||
+--------------+----------+----------+ | ||
| codecID : uint16 | 2 bytes | | ||
+--------------+----------+----------+ | ||
|
@@ -101,27 +159,27 @@ Specification: | |
+----------+ | ||
``` | ||
|
||
### `SubnetValidatorWeightUpdateMessage` | ||
### `ValidationUptimeMessage` | ||
|
||
- Description: Provides a Validator's uptime for calculating staking rewards | ||
|
||
Description: Acknowledges a Validator weight update | ||
- Signed by: Subnet | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not for this PR, but just a heads up that we'll be updating the terminology from subnet -> L1 soon, including for these message names and transaction types. Subnets will refer to pre-Etna Subnets, where their validator set must also validate the primary network, making it a subset of the primary network validators. L1s will refer to post-Etna sovereign networks, whose validators sets can be completely independent of the primary network. |
||
|
||
Signed by: P-Chain | ||
Consumed by: Validator Manager contract | ||
- Consumed by: Validator Manager contract | ||
|
||
Specification: | ||
|
||
``` | ||
ValidationUptimeMessage | ||
+--------------+----------+----------+ | ||
| codecID : uint16 | 2 bytes | | ||
+--------------+----------+----------+ | ||
| typeID : uint32 | 4 bytes | | ||
+--------------+----------+----------+ | ||
| validationID : [32]byte | 32 bytes | | ||
+--------------+----------+----------+ | ||
| nonce : uint64 | 8 bytes | | ||
+--------------+----------+----------+ | ||
| weight : uint64 | 8 bytes | | ||
| uptime : uint64 | 8 bytes | | ||
+--------------+----------+----------+ | ||
| 54 bytes | | ||
| 46 bytes | | ||
+----------+ | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't matter at all for this PR, but worth noting that markdown supports tables that provide auto-formatting in the future. It makes it easy to modify in the future without having to manually correct all of the spacing.