-
Notifications
You must be signed in to change notification settings - Fork 660
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
Feat: Mockamoto + coordinator integration #4098
Conversation
testnet/stacks-node/src/mockamoto.rs
Outdated
let vrf_seed = VRFSeed::from_proof(&parent_vrf_proof); | ||
|
||
let block_commit = LeaderBlockCommitOp { | ||
block_header_hash: BlockHeaderHash([0; 32]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure this field is getting validated now. This should be the index block hash of the last tenure's tenure-start block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated this to be the parent block ID, but I would suggest that this is not being validated currently: the coordinator absolutely accepted blocks with null block header hashes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the coordinator absolutely accepted blocks with null block header hashes.
Oh interesting! I'll see if I can fix this in my tenure-change validation PR.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## next #4098 +/- ##
==========================================
- Coverage 0.04% 0.04% -0.01%
==========================================
Files 419 421 +2
Lines 297652 298557 +905
==========================================
Hits 136 136
- Misses 297516 298421 +905 ☔ View full report in Codecov by Sentry. |
05274b6
to
b447984
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kantai events for the initial boot contracts and seed balance are missing:
- The initial synthetic
token_transfer
tx containingstx_mint
events for the seed account(s) - These contracts:
bns
,pox
,costs
,cost-voting
,genesis
.
The API tests don't work very well when the stx_mints and bns boot contract in particular are missing. Anyway to get these working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The /new_block
event has the properties pox_v1_unlock_height
and pox_v2_unlock_height
-- can pox_v3_unlock_height
be added?
…nlock to /new_block events
@zone117x -- both should be added in my last commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well for initial API integration, the events were usable to ingest TenureChange txs and NakamotoBlocks. We're still working on pox-3 force unlocks & pox-4 integration and testing. I'll open issues for any bugs found if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR integrates the mockamoto node into the latest nakamoto coordinator work. It includes a test case that ensures that the event observer sees 100 nakamoto blocks.
This operation simulates bitcoin blocks, storing them directly into the burndb, and then notifying the chains coordinator.