JoshOrndorff / utxo-workshop

A Substrate UTXO workshop
The Unlicense
117 stars 81 forks source link

Update Genesis Config to build utxos using hash (transaction, index) to avoid collisions #55

Open nczhu opened 4 years ago

nczhu commented 4 years ago

This is just an observation, not a problem. The genesis UTXOs are stored at keys created by simply hashing the UTXO itself. This is different from how all future UTXOs will be stored (by hashing a (tx, index) tuple).

Originally posted by @JoshOrndorff in https://github.com/substrate-developer-hub/utxo-workshop/pull/45

nczhu commented 4 years ago

disperse_reward may also need to be updated, right now, its stored at the hash of (transaction_output, block_number), which is guaranteed unique but not super elegant.