Skip to content

Add Merkle Root on Spine Block #1222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 30, 2020
Merged

Add Merkle Root on Spine Block #1222

merged 5 commits into from
Sep 30, 2020

Conversation

sukrawidhyawan
Copy link
Contributor

@sukrawidhyawan sukrawidhyawan commented Sep 28, 2020

Description

Adding Merkle root & Merkle tree fields on main & spine block. For Spine block, merkle root is build from main blocks and Reference Block Height is the last main block that included in the spine block merkle root. Add fields merkle_root, merkle_tree , reference_block_height in main & spine block.

Breakdown

  • Add new cloumns on spine & main block : merkle_root, merkle_tree , reference_block_height
  • Select main block that want to be included in spine block when generate block
  • Add validation for checking included main block in spine block when receiving spine block

Reference Issue

Close #numberIssue

Schema PR changes

zoobc/zoobc-schema#156

Step to Test (optional)

Run multiple nodes in local

@sukrawidhyawan sukrawidhyawan changed the title add merkle tree on spine block Add Merkle Root on Spine Block Sep 28, 2020
@@ -1004,8 +1005,8 @@ func start() {

mainchainSyncChannel := make(chan bool, 1)
mainchainSyncChannel <- true
startSpinechain()
Copy link
Contributor

Choose a reason for hiding this comment

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

why starting mainchain before spinechain?

Copy link
Contributor Author

@sukrawidhyawan sukrawidhyawan Sep 29, 2020

Choose a reason for hiding this comment

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

because the mainchain is injected into spine chain, need the main service ready first

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

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.

4 participants