Skip to content

Commit

Permalink
clarify the description of the coinbase instruction (#477)
Browse files Browse the repository at this point in the history
The previous description was somewhat ambiguous about whether the `CB`
opcode returns the address for the block producer or it's coinbase
address (which can be a distinct cold wallet for collecting fees).
  • Loading branch information
Voxelot authored Apr 5, 2023
1 parent ee15834 commit 813faf0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/vm/instruction_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
- [BHSH: Block hash](#bhsh-block-hash)
- [BURN: Burn existing coins](#burn-burn-existing-coins)
- [CALL: Call contract](#call-call-contract)
- [CB: Block proposer address](#cb-block-proposer-address)
- [CB: Coinbase address](#cb-coinbase-address)
- [CCP: Code copy](#ccp-code-copy)
- [CROO: Code Merkle root](#croo-code-merkle-root)
- [CSIZ: Code size](#csiz-code-size)
Expand Down Expand Up @@ -1252,15 +1252,15 @@ A [call frame](./index.md#call-frames) is pushed at `$sp`. In addition to fillin

This modifies the `balanceRoot` field of the appropriate output(s).

### CB: Block proposer address
### CB: Coinbase address

| | |
|-------------|----------------------------------|
| Description | Get block proposer address. |
| Operation | ```MEM[$rA, 32] = coinbase();``` |
| Syntax | `cb $rA` |
| Encoding | `0x00 rA - - -` |
| Notes | |
| | |
|-------------|-------------------------------------------------------------------------------------------------------------------|
| Description | Get the [coinbase address](./../protocol/tx_validity.md#coinbase-transaction) associated with the block proposer. |
| Operation | ```MEM[$rA, 32] = coinbase();``` |
| Syntax | `cb $rA` |
| Encoding | `0x00 rA - - -` |
| Notes | |

Panic if:

Expand Down

0 comments on commit 813faf0

Please # to comment.