Skip to content

Commit

Permalink
Merge pull request #38 from wizeguyy/fix-qip10-bit9
Browse files Browse the repository at this point in the history
Update qip-0010 to include 7b spacer
  • Loading branch information
wizeguyy authored Apr 3, 2024
2 parents 699bfec + 9f5dbba commit 78cd805
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions qip-0010.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,18 @@ destination chain information, which this specification intends to address.
## Specification
### Transaction Identifiers
Transaction identifiers will consist of a permuted transaction hash.
Specifically, the first two bytes of the hash will be overwritten with the
Specifically, the first four bytes of the hash will be bit-masked with the
origin and destination shard identifiers respectively. [qip-0002](qip-0002.md)
describes the encoding of shard identifiers. For this specification, we only
care that they are 9 bits in length.

| bits 0..8 | bits 9..17 | bits 18..255 |
|--------------|--------------|----------------------------|
| src shard id | dst shard id | hash(transaction)[18..255] |
| bits 0..8 | bits 9..15 | bits 16..24 | bits 25..255 |
|--------------|--------------------------|--------------|----------------------------|
| src shard id | hash(transaction)[9..15] | dst shard id | hash(transaction)[25..255] |

> Note: since shard identifiers are 9 bits, we include a 7 bits of the actual
> transaction hash as a spacer, so that the destination shard id starts at a
> round byte position.
## Copyright
This QIP licensed under the BSD 2-clause license.

0 comments on commit 78cd805

Please sign in to comment.