mirror of
https://github.com/seigler/dips
synced 2025-07-27 01:36:14 +00:00
Update DIPs regarding use of BLS12-381-reversed (#25)
* Update bls_signature_scheme.md with BLS12-381-reversed * Update DIP3/DIP4 to use BLS operator keys * Update DIP5 to use BLS keys for user keys Also add the "Size" column to all serialization specs to align with other DIPs. * Update BLS primitives serialization size in DIP6/7 * DIP3 - Correct PubKeyOperator type * DIP4 - Correct PubKeyOperator type * Remove trailing e from integere
This commit is contained in:
parent
b1b56aaefd
commit
52aee60048
6 changed files with 60 additions and 63 deletions
19
dip-0003.md
19
dip-0003.md
|
@ -69,10 +69,11 @@ Only the valid subset is used in calculations to determine the recipient of the
|
|||
|
||||
To join the masternode list, masternode owners must submit a special transaction (DIP2) to the network. This transaction is called a Provider Registration Transaction and is abbreviated to ProRegTx. The ProRegTx must include an output with the 1000 DASH or refer to an already existing unspent output which holds 1000 DASH.
|
||||
|
||||
The ProRegTx contains 3 public key IDs, which represent 3 different roles in the masternode and define update and voting rights. A "public key ID" refers to the hash160 of an ECDSA public key. These are:
|
||||
The ProRegTx contains 2 public key IDs and one BLS public key, which represent 3 different roles in the masternode and define update and voting rights.
|
||||
A "public key ID" refers to the hash160 of an ECDSA public key. The keys are:
|
||||
|
||||
1. KeyIdOwner: This is the public key ID of the masternode or collateral owner. It is different than the key used in the collateral output. Only the owner is allowed to issue ProUpRegTx transactions.
|
||||
2. KeyIdOperator: This is the public key ID of the masternode operator. Only the operator is allowed to issue ProUpServTx transactions. The operator key is also used while operating the masternode to sign masternode related P2P messages, quorum related messages and governance trigger votes. Messages signed with this key are only valid while the masternode is in the valid set.
|
||||
2. PubKeyOperator: This is the BLS public key of the masternode operator. Only the operator is allowed to issue ProUpServTx transactions. The operator key is also used while operating the masternode to sign masternode related P2P messages, quorum related messages and governance trigger votes. Messages signed with this key are only valid while the masternode is in the valid set.
|
||||
3. KeyIdVoting: This is the public key ID used for proposal voting. Votes signed with this key are valid while the masternode is in the registered set.
|
||||
|
||||
A single key can be used for multiple roles so the owner can also operate the masternode and/or issue proposal votes. Alternately, different keys can be used to delegate duties to other people. For example, owners might decide to use a masternode hosting service instead of self-hosting the masternode. To do so, they would use the operator key provided by the hosting service. The same applies to the voting key, which allows them to assign voting rights to someone else.
|
||||
|
@ -98,7 +99,7 @@ The transaction consists of the following data in the payload area:
|
|||
| ipAddress | byte[] | 16 | IPv6 address in network byte order. Only IPv4 mapped addresses are allowed (to be extended in the future) |
|
||||
| port | uint_16 | 2 | Port (network byte order) |
|
||||
| KeyIdOwner | CKeyID | 20 | The public key hash used for owner related signing (ProTx updates, governance voting) |
|
||||
| KeyIdOperator | CKeyID | 20 | The public key hash used for operational related signing (network messages, ProTx updates) |
|
||||
| PubKeyOperator | BLSPubKey | 48 | The public key used for operational related signing (network messages, ProTx updates) |
|
||||
| KeyIdVoting | CKeyID | 20 | The public key hash used for voting. |
|
||||
| operatorReward | uint_16 | 2 | A value from 0 to 10000. |
|
||||
| scriptPayoutSize | compactSize uint | 1-9 | Size of the Payee Script. |
|
||||
|
@ -138,8 +139,7 @@ The transaction consists of the following data in the payload area:
|
|||
| scriptOperatorPayoutSize | compactSize uint | 1-9 | Size of the Payee Script. |
|
||||
| scriptOperatorPayout | Script | Variable | Payee script (p2pkh/p2sh) |
|
||||
| inputsHash | uint256 | 32 | Hash of all the outpoints of the transaction inputs |
|
||||
| payloadSigSize | compactSize uint | 1-9 | Size of the Signature |
|
||||
| payloadSig | vector<unsigned char> | Variable | Signature of the hash of the ProUpServTx fields. Signed by the Operator. |
|
||||
| payloadSig | BLSSig | 96 | Signature of the hash of the ProUpServTx fields. Signed by the Operator. |
|
||||
|
||||
### Updating Registrar of Masternode (ProUpRegTx)
|
||||
|
||||
|
@ -156,7 +156,7 @@ The transaction consists of the following data in the payload area:
|
|||
| version | uint_16 | 2 | Upgrade Provider Transaction version number. Currently set to 1. |
|
||||
| proTXHash | uint256 | 32 | The hash of the provider transaction |
|
||||
| mode | uint_16 | 2 | Masternode mode |
|
||||
| KeyIdOperator | CKeyID | 20 | The public key hash used for operational related signing (network messages, ProTx updates) |
|
||||
| PubKeyOperator | BLSPubKey | 48 | The public key used for operational related signing (network messages, ProTx updates) |
|
||||
| KeyIdVoting | CKeyID | 20 | The public key hash used for voting. |
|
||||
| scriptPayoutSize | compactSize uint | 1-9 | Size of the Payee Script. |
|
||||
| scriptPayout | Script | Variable | Payee script (p2pkh/p2sh) |
|
||||
|
@ -182,8 +182,7 @@ The transaction consists of the following data in the payload area:
|
|||
| proTXHash | uint256 | 32 | The hash of the provider transaction |
|
||||
| reason | uint_16 | 2 | The reason for revoking the key. |
|
||||
| inputsHash | uint256 | 32 | Hash of all the outpoints of the transaction inputs |
|
||||
| payloadSigSize | compactSize uint | 1-9 | Size of the Signature |
|
||||
| payloadSig | vector<unsigned char> | Variable | Signature of the hash of the ProTx fields. Signed by the Operator. |
|
||||
| payloadSig | BLSSig | 96 | Signature of the hash of the ProTx fields. Signed by the Operator. |
|
||||
|
||||
## Rules for Updating the Masternode List
|
||||
|
||||
|
@ -215,9 +214,9 @@ A ProRegTx is invalid if any of these conditions are true:
|
|||
1. collateralOutpoint `hash` is null but an output with 1000 DASH is not present at position `n` of the ProRegTx outputs
|
||||
2. collateralOutpoint `hash` is not null but an output with 1000 DASH can't be found in the UTXO specified by the `hash` and `n`
|
||||
3. Any KeyId* field is null (KeyIdOwner, KeyIdOperator or KeyIdVoting)
|
||||
4. KeyIdOwner or KeyIdOperator was already used by any entry in the registered masternodes set
|
||||
4. KeyIdOwner or PubKeyOperator was already used by any entry in the registered masternodes set
|
||||
5. scriptPayout is not a P2PKH or P2SH script
|
||||
6. When scriptPayout is P2PKH script and the public key hash equals any of KeyIdOwner, KeyIdOperator or KeyIdVoting
|
||||
6. When scriptPayout is P2PKH script and the public key hash equals any of KeyIdOwner or KeyIdVoting
|
||||
7. ipAddress is set and port is not set to the default mainnet port
|
||||
8. ipAddress is set and not routable or not an IPv4 mapped address
|
||||
9. ipAddress is set and already used in the registered masternodes set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue