Skip to content

add blockchain parameters + genesis#272

Merged
scravy merged 2 commits into
dtr-org:masterfrom
scravy:blockchain-parameters
Nov 22, 2018
Merged

add blockchain parameters + genesis#272
scravy merged 2 commits into
dtr-org:masterfrom
scravy:blockchain-parameters

Conversation

@scravy

@scravy scravy commented Nov 21, 2018

Copy link
Copy Markdown
Member

I am starting to separate things from #212 in order for it to be easier reviewable and mergable. This particular piece is the blockchain parameters and genesis block creation.

Ultimately I want to get rid of chainparams (and chainparamsbase and the like). The idea here being that it can't even conflict with bitcoin if it does not exist. Since we're starting over we are not interested in bitcoin checkpoints, bitcoin versions, etc. Also this version is way cleaner.

Right now it would be dead code though, which changes once merged with #212. I nevertheless would like to merge this separately.

Signed-off-by: Julian Fleischer julian@thirdhash.com

@scravy scravy added the wip Work in progress which is not supposed to be merged yet label Nov 21, 2018
@scravy scravy force-pushed the blockchain-parameters branch 3 times, most recently from bdbcdd8 to 5d2c8d3 Compare November 21, 2018 13:35
@scravy scravy removed the wip Work in progress which is not supposed to be merged yet label Nov 21, 2018
@scravy scravy changed the title WIP: add blockchain parameters + genesis add blockchain parameters + genesis Nov 21, 2018
@scravy scravy requested a review from a team November 21, 2018 13:48
Comment thread src/blockchain/blockchain_genesis.cpp Outdated
@scravy scravy self-assigned this Nov 21, 2018
Comment thread src/blockchain/blockchain_genesis.cpp Outdated
Comment thread src/Makefile.am Outdated
Comment thread src/blockchain/blockchain_genesis.cpp Outdated
Comment thread src/blockchain/blockchain_parameters.cpp Outdated
Comment thread src/blockchain/blockchain_parameters.cpp Outdated
Comment thread src/blockchain/blockchain_genesis.cpp Outdated
Comment thread src/blockchain/blockchain_genesis.cpp Outdated
Comment thread src/blockchain/blockchain_genesis.cpp Outdated
Comment thread src/blockchain/blockchain_parameters.h Outdated
@scravy scravy added the genesis label Nov 21, 2018
@dtr-org dtr-org deleted a comment from thothd Nov 22, 2018
@scravy scravy force-pushed the blockchain-parameters branch from f8fbe29 to a55df92 Compare November 22, 2018 10:28
@scravy

scravy commented Nov 22, 2018

Copy link
Copy Markdown
Member Author

@AM5800 @cornelius @castarco @kostyantyn @frolosofsky @Nizametdinov please re-review, I think I tackled all your comments.

@kostyantyn kostyantyn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK a55df92

Comment thread src/blockchain/blockchain_genesis.cpp Outdated
Signed-off-by: Julian Fleischer <julian@thirdhash.com>
Signed-off-by: Julian Fleischer <julian@thirdhash.com>
@scravy scravy force-pushed the blockchain-parameters branch from a55df92 to a1abd37 Compare November 22, 2018 10:46

@AM5800 AM5800 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK a1abd37

Comment thread src/blockchain/blockchain_genesis.cpp Outdated

@Ruteri Ruteri Nov 22, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: We will need to differentiate the parameters for networks (esp. the difficulty), but we will not be able to use the wrapper const CBlock Build(std::initializer_list<P2WPKH> outputs) then. Maybe genesis block params should be a separate structure that we also pass into the Build along with outputs?

@Ruteri Ruteri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@scravy

scravy commented Nov 22, 2018

Copy link
Copy Markdown
Member Author

@Ruteri as discussed over lunch, I will add that when needed later.

@scravy scravy merged commit 36b7cfd into dtr-org:master Nov 22, 2018
@scravy scravy deleted the blockchain-parameters branch November 27, 2018 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants