fibercrypto / fibercrypto/skycoin

Don't use null hash for genesis UxOut.SrcTransaction

Open
#1,472 0 comments 0 reactions 0 assignees View on GitHub
core hardfork
Dominant language
Go
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The null hash is used for the genesis block's unspent output SrcTransaction, instead of the genesis transaction's hash. This affects the UxID of the genesis unspent outputs.

The null hash is not necessary to use here, and some special cases in the code could be removed by using the genesis transaction's hash to calculate the UxID.

The locations where this is special cased are:

- visor.NewReadableTransaction
- coin.CreateUnspents
- coin.CreateUnspent
- cmd/skycoin/skycoin.go InitTransaction (the hardcoded hash `"043836eb6f29aaeb8b9bfce847e07c159c72b25ae17d291f32125e7f1912e2a0"`)

However, this cannot be changed without a hardfork / blockchain reset.

Furthermore, any fiber coins would need to maintain the null hash behavior or else do a hardfork themselves. Consider providing an easy way for them to maintain compatibility when upgrading to newer releases.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.