Skip to content
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/time based tenure extend merge #5504

Merged
Merged
Changes from 1 commit
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
4f2c74f
fix/5274: add test coverage for microforks
jcnelson Oct 7, 2024
62d2629
chore: separate load_tenure_info() into inner_load_tenure_info(), so …
jcnelson Oct 10, 2024
e274770
feat: enable shadow blocks -- blocks that are added to the chainstate…
jcnelson Oct 10, 2024
a81f6f4
chore: update staging DB to add code to insert and query shadow block…
jcnelson Oct 10, 2024
a01b36c
chore: accomodate shadow blocks when validating a tenure against a so…
jcnelson Oct 10, 2024
f6e2b8d
chore: static transaction validation test coverage for data in shadow…
jcnelson Oct 10, 2024
9f9ff79
chore: add functionality to mine shadow block tenures and build atop …
jcnelson Oct 10, 2024
f07aca5
chore: don't divide by zero when processing a shadow tenure coinbase …
jcnelson Oct 10, 2024
de26a08
chore: try to load blocks from chainstate if we have them, so we don'…
jcnelson Oct 10, 2024
345f63a
chore: when getting tenure start/end blocks, see if we have them loca…
jcnelson Oct 10, 2024
136fd0f
chore: drive downloaders from chainstate data
jcnelson Oct 10, 2024
1cc53b7
chore: load tenure data from chainstate if we have it
jcnelson Oct 10, 2024
2c954dc
chore: log the neighbor address of the remote peer when we get back a…
jcnelson Oct 10, 2024
13d7212
chore: test that shadow tenures are reported as 1's in a nakamoto inv…
jcnelson Oct 10, 2024
5cf2946
Merge branch 'develop' into fix/5285
jcnelson Oct 11, 2024
6531b2c
Merge branch 'fix/5274' into fix/5285
jcnelson Oct 11, 2024
5154771
feat: epoch 3.0 supports shadow blocks
jcnelson Oct 18, 2024
e700ffa
feat: mock coinbaes in test burnchain blocks, since block-commits tha…
jcnelson Oct 18, 2024
81699d6
feat: a block-commit mined in epoch 3.x whose parent_vtxindex is 0 is…
jcnelson Oct 18, 2024
8b44fe2
feat: count shadow tenures as prepare-phase sortitions even if they'r…
jcnelson Oct 18, 2024
9d7f894
chore: make some tenure-mining code fallible so we can test resuming …
jcnelson Oct 18, 2024
5fe06ad
chore: more debug
jcnelson Oct 18, 2024
81b17ec
feat: fix process_next_nakamoto_block() to treat shadow blocks as una…
jcnelson Oct 18, 2024
fdbec99
feat: getters for shadow blocks and shadow tenures, and also, require…
jcnelson Oct 18, 2024
4f30e51
chore: make some mining code fallible so we can handle null-miner win…
jcnelson Oct 18, 2024
18d11c9
chore: API sync
jcnelson Oct 18, 2024
0f96ead
fix: pass the tenure IDs for the tenure start/end blocks to tenure do…
jcnelson Oct 18, 2024
aba7ca9
chore: with_dbs() helper
jcnelson Oct 18, 2024
4ff1a39
chore: drop "relayed" shadow blocks, since they get passed from the d…
jcnelson Oct 18, 2024
0b0f712
chore: test coverage for downloading tenures that start/stop with a s…
jcnelson Oct 18, 2024
4511362
chore: test that shadow blocks are part of the block inventory
jcnelson Oct 18, 2024
c077cf7
chore: some minnig functions are fallible now
jcnelson Oct 18, 2024
3e575e0
chore: always use affirmation maps from now on
jcnelson Oct 18, 2024
6101b9f
Merge branch 'develop' into fix/5285
jcnelson Oct 18, 2024
1035b89
chore: fix compiler warnings
jcnelson Oct 18, 2024
acd8732
chore: cargo fmt
jcnelson Oct 18, 2024
3a46282
fix: always use affirmation maps now that mainline testnet uses bitco…
jcnelson Oct 18, 2024
bdd5ea3
chore: address @kantai's PR feedback by refactoring the shadow block …
jcnelson Oct 21, 2024
47761f2
Merge branch 'develop' into fix/5285
jcnelson Oct 21, 2024
9ad17f1
chore: print out assert failure
jcnelson Oct 21, 2024
c478e29
chore: move staging blocks' shadow code to shadow.rs
jcnelson Oct 21, 2024
b7d5d4f
chore: cargo fmt
jcnelson Oct 21, 2024
fb54e4c
chore: add unit test coverage for shadow DB methods and validation logic
jcnelson Oct 22, 2024
4dd6630
Merge branch 'develop' into fix/5285
jcnelson Oct 22, 2024
8a5e6bd
Merge branch 'develop' into fix/5285
jcnelson Oct 22, 2024
81920f1
chore: fix unit test due to vtxindex=0 not being allowed by default i…
jcnelson Oct 22, 2024
8939fd3
Merge branch 'fix/5285' of https://github.com/stacks-network/stacks-b…
jcnelson Oct 22, 2024
19044ef
Merge branch 'develop' into fix/5285
jcnelson Oct 23, 2024
1597209
chore: add nakamoto testnet pox settings
jcnelson Oct 23, 2024
fbec882
chore: expose NakamotoBlockBuilder::get_account()
jcnelson Oct 23, 2024
7e26c01
feat: add `get-account`, `get-nakamoto-tip`, `make-shadow-block`, and…
jcnelson Oct 23, 2024
dcab2b6
chore: typo
jcnelson Oct 24, 2024
8e8981e
chore: typo
jcnelson Oct 24, 2024
0865787
Merge branch 'develop' into fix/5285
jcnelson Oct 24, 2024
9bcee64
fix: use correct pox params
jcnelson Oct 24, 2024
850d00b
chore: move shadow block creation and replay into separate functions …
jcnelson Oct 24, 2024
fb391fc
chore: make function public
jcnelson Oct 24, 2024
0f29c68
chore: shadow-chainstate-repair and shadow-chainstate-patch
jcnelson Oct 24, 2024
e8da151
fix: the parent can be a shadow block and thus not have a commit
jcnelson Oct 24, 2024
4851c3c
chore: integration test
jcnelson Oct 24, 2024
8fff6bd
chore: run integration test in CI
jcnelson Oct 24, 2024
e72a266
fix: use correct pox params
jcnelson Oct 24, 2024
05ac928
Merge branch 'fix/5285' into feat/shadow-block-tooling
jcnelson Oct 24, 2024
05a99fa
chore: typo
jcnelson Oct 24, 2024
bfbfbf7
chore: cargo fmt
jcnelson Oct 24, 2024
f7a06d4
Merge branch 'develop' into fix/5285
jcnelson Oct 25, 2024
8743b0b
chore: fix compile issue
jcnelson Oct 25, 2024
84c982c
Adding stacks-signer binary to image
wileyj Oct 25, 2024
c75ed39
chore: read/write
jcnelson Oct 25, 2024
b98239d
fix: load blocks json from file
jcnelson Oct 25, 2024
4153cec
Merge branch 'feat/shadow-block-tooling' of https://github.com/stacks…
jcnelson Oct 25, 2024
ca17ede
chore: don't use docstring
jcnelson Oct 25, 2024
439abdb
fix: accomodate shadow blocks which have no sortition but do have a s…
jcnelson Oct 25, 2024
69eb7ac
fix: use a real signer to verify that we can resume mining atop shado…
jcnelson Oct 25, 2024
3430a81
fix: advance cursor before depth check
jcnelson Oct 28, 2024
1578014
chore: handle shadow block case
jcnelson Oct 28, 2024
0ace927
chore: log HTTP RPC error values at debug level
jcnelson Oct 28, 2024
7bd1ae8
chore: info when post-shadow tenures happen
jcnelson Oct 28, 2024
7341a4b
chore: cargo fmt
jcnelson Oct 28, 2024
b30c0b4
chore: halt block-processing while we process shadow blocks
jcnelson Oct 28, 2024
ab605d9
Merge branch 'develop' into fix/5285
jcnelson Nov 8, 2024
5970a57
Merge branch 'fix/5285' into feat/shadow-block-tooling
jcnelson Nov 8, 2024
5f83847
chore: search depth only increases with sortitions, not shadow blocks
jcnelson Nov 9, 2024
4a105e4
Merge branch 'develop' into fix/5285
jcnelson Nov 11, 2024
6eaf1ed
Merge branch 'develop' into fix/5285
jcnelson Nov 11, 2024
ad01a76
Merge branch 'fix/5285' into feat/shadow-block-tooling
jcnelson Nov 11, 2024
62f5130
Merge branch 'develop' into fix/5285
jcnelson Nov 12, 2024
28e1be4
chore: fix failing integration test and unstage accidentally-added file
jcnelson Nov 12, 2024
1e0b1c5
info log to add and remove neighbors
ASuciuX Nov 14, 2024
abbeca4
Merge branch 'develop' into logs/info-neighbor-add-and-remove
ASuciuX Nov 14, 2024
f43ede5
Merge branch 'develop' into fix/5285
jcnelson Nov 15, 2024
08365d6
chore: fix slow unit test
jcnelson Nov 15, 2024
75e409d
chore: fix test
jcnelson Nov 16, 2024
c60b569
Merge branch 'fix/5285' of https://github.com/stacks-network/stacks-b…
jcnelson Nov 16, 2024
90134db
move logs to add/remove neighbor to p2p session
ASuciuX Nov 18, 2024
34d658a
Merge branch 'develop' into fix/5285
jcnelson Nov 19, 2024
a99a6d1
Merge branch 'fix/5285' into feat/shadow-block-tooling
jcnelson Nov 19, 2024
c4b5cda
test: add test for tenure-extend upon failed miner
obycode Nov 9, 2024
09e2554
feat: implement tenure-extend after bad sortition winner
obycode Nov 12, 2024
799ce1f
feat: make signer accept tenure extend on bad sortition
obycode Nov 13, 2024
492c88e
test: add `tenure_extend_after_bad_commit` to yaml file
obycode Nov 14, 2024
f79050e
refactor: move the `StackerDBChannel` into the `EventDispatcher`
obycode Nov 14, 2024
7888fa7
feat: add an index for block state
obycode Nov 14, 2024
93e218f
docs: update changelogs
obycode Nov 14, 2024
a466df4
chore: improve comment about checking the parent tenure
obycode Nov 14, 2024
e6538a0
test: add unit test for `SignerDb::get_canonical_tip`
obycode Nov 14, 2024
321b0d6
chore: remove unnecessary log
obycode Nov 14, 2024
dda9b1e
feat: simplify signerdb migration
obycode Nov 14, 2024
145e5d4
chore: cleanup unused
obycode Nov 15, 2024
3e2e6bd
refactor: clean up `continue_tenure`
obycode Nov 15, 2024
2d1cb42
refactor: `last_block_contains_tenure_change_tx`
obycode Nov 15, 2024
57049c1
test: additional checks requested in PR review
obycode Nov 15, 2024
f0e664d
feat: add ability to disable tenure-extend for tests
obycode Nov 15, 2024
8778f96
fix: fix import for test-only feature
obycode Nov 15, 2024
3271761
refactor: add comments and improve naming
obycode Nov 15, 2024
96c7650
Revert "feat: add ability to disable tenure-extend for tests"
hstove Nov 18, 2024
a3f690d
chore: more logging info in test
hstove Nov 19, 2024
dc88a72
wip: still tweaking partial_tenure_fork test, failing
hstove Nov 19, 2024
eebf10d
move net::api::tests::postblock_proposal::test_try_make_response to p…
wileyj Nov 19, 2024
6a80290
test: add `tenure_extend_after_2_bad_commits`
obycode Nov 19, 2024
dfee8f4
added getblockbyhash and getblockbyheight RPC api calls
rdeioris Nov 9, 2024
a98fdb6
removed useless get_nakamoto_block_by_hash_rowid and added notes abou…
rdeioris Nov 11, 2024
c7c899e
updated docs for /v3/blockbyhash and /v3/blockbyheight
rdeioris Nov 11, 2024
24a9c61
updated changelog
rdeioris Nov 11, 2024
94b85c3
added integration tests for blockbyhash and blockbyheight
rdeioris Nov 11, 2024
4a6276f
added tests::nakamoto_integrations::v3_blockbyhash_api_endpoint and t…
rdeioris Nov 11, 2024
8d46202
reformatted nakamoto_integrations.rs
rdeioris Nov 11, 2024
cb97c2d
reformat unit tests
rdeioris Nov 11, 2024
d46bfcd
fixed blockbyheight to use the marf
rdeioris Nov 12, 2024
6cc44c6
removed get_block_id_by_block_height over staging db
rdeioris Nov 12, 2024
ce533e0
more restful path for blockbyheight
rdeioris Nov 12, 2024
1e628f7
removed getblockbyhash
rdeioris Nov 13, 2024
4bea12a
removed files for getblockbyhash
rdeioris Nov 13, 2024
6acfddd
reverted getblock_v3 patch
rdeioris Nov 13, 2024
f81749a
removed test for old getblockbyhash
rdeioris Nov 13, 2024
67dc987
improved docs as suggested by jcnelson
rdeioris Nov 14, 2024
d778b2f
improved integration test for get_v3_block_by_height
rdeioris Nov 14, 2024
cc064a5
removed useless .clone()
rdeioris Nov 14, 2024
5cc1a1c
fixed typos in tests comments
rdeioris Nov 15, 2024
c0f53ff
added /v3/blocks/height/{block_height} in openapi definitions
rdeioris Nov 15, 2024
2e6d279
added block_id test over canonical_tip in test_try_make_response
rdeioris Nov 19, 2024
b83e2dc
merged with develop
rdeioris Nov 19, 2024
2cd02d6
added getblockbyhash and getblockbyheight RPC api calls
rdeioris Nov 9, 2024
fc2e4c3
removed useless get_nakamoto_block_by_hash_rowid and added notes abou…
rdeioris Nov 11, 2024
1535f9b
reformat unit tests
rdeioris Nov 11, 2024
5a812fa
fixed blockbyheight to use the marf
rdeioris Nov 12, 2024
553ec68
removed get_block_id_by_block_height over staging db
rdeioris Nov 12, 2024
cdf6879
removed getblockbyhash
rdeioris Nov 13, 2024
bc0fc2e
removed files for getblockbyhash
rdeioris Nov 13, 2024
648c9a9
reverted getblock_v3 patch
rdeioris Nov 13, 2024
5647bc9
fixed rebasing for CHANGELOG and bitcoin-tests
rdeioris Nov 19, 2024
0a4252f
upodated CHANGELOG and integration tests
rdeioris Nov 19, 2024
cd391dc
completed rebase to develop
rdeioris Nov 19, 2024
c631c2a
fix: miner_forking test to expect a TenureExtend
hstove Nov 19, 2024
a7e89bc
Merge branch 'develop' into fix/5285
jcnelson Nov 19, 2024
a3cdab6
Merge branch 'fix/5285' into feat/shadow-block-tooling
jcnelson Nov 19, 2024
67a90e8
fix: check against first proposal timeout when validating fork in sig…
hstove Nov 19, 2024
5fd7d1c
wip: fixing tenure_extend_after_bad_commit by modifying first_proposa…
hstove Nov 20, 2024
34cd592
move net::api::tests::postblock_proposal::test_try_make_response to p…
wileyj Nov 19, 2024
82c36d7
move net::api::tests::postblock_proposal::test_try_make_response to p…
wileyj Nov 19, 2024
ae3c1ce
Merge pull request #5485 from stacks-network/fix/block_proposal_test_…
hstove Nov 20, 2024
93d9536
Merge branch 'develop' into feat/rpc_blockbyhash_blockbyheight_develop
hstove Nov 20, 2024
cd4fd5b
wip: debugging `partial_tenure_fork`
obycode Nov 20, 2024
819440b
Merge pull request #5445 from stacks-network/feat/rpc_blockbyhash_blo…
hstove Nov 20, 2024
d038752
Merge pull request #5362 from stacks-network/feat/shadow-block-tooling
wileyj Nov 20, 2024
b14dcd5
update to structured logs
ASuciuX Nov 20, 2024
2b769fc
test: fix remaining issues in `partial_tenure_fork`
obycode Nov 20, 2024
a2a5c86
Merge branch 'develop' into feat/tenure-extend-no-blocks
obycode Nov 20, 2024
edc8b67
Merge branch 'develop' into fix/5285
jcnelson Nov 20, 2024
b9dfb09
test: wait for miner 2 to sync with miner 1 in `partial_tenure_fork`
obycode Nov 20, 2024
3a46c36
chore: test debugging
obycode Nov 21, 2024
2ec4eec
chore: fix comments/expects
obycode Nov 21, 2024
dc6827f
test: ensure miner 2 is up to tip before continuing
obycode Nov 21, 2024
5c9ccc1
test: check burn block height in miner 2
obycode Nov 21, 2024
90cc224
Merge branch 'develop' into logs/info-neighbor-add-and-remove
ASuciuX Nov 21, 2024
6a0d048
Merge pull request #5459 from stacks-network/logs/info-neighbor-add-a…
ASuciuX Nov 21, 2024
e1699fa
Merge branch 'develop' into feat/tenure-extend-no-blocks
obycode Nov 21, 2024
212914b
Merge branch 'develop' into fix/5285
jcnelson Nov 21, 2024
37bdaab
chore: fix HTTP server's error handling code path for unparsable HTTP…
jcnelson Nov 21, 2024
041665e
chore: fix #5490
jcnelson Nov 21, 2024
c79fa6c
Merge pull request #5491 from stacks-network/fix/http-stall-on-invali…
jcnelson Nov 21, 2024
6ddfd6c
Merge branch 'develop' into fix/5285
jcnelson Nov 21, 2024
c213115
refactor: `SortitionDB::get_canonical_stacks_tip_block_id`
obycode Nov 21, 2024
2e963e7
chore: update comments and logs for clarity
obycode Nov 21, 2024
c8f1d99
fix: use signed_group as tiebreaker for canonical tip
hstove Nov 21, 2024
5e6c264
chore: add thiserror and DBError to NakamotoNodeError
hstove Nov 21, 2024
a3640b4
chore: PR feedback
jcnelson Nov 21, 2024
bec8de8
feat: clean up NakamotoNodeError with thiserror
hstove Nov 22, 2024
4662f05
chore: remove unused NakamotoNodeError
hstove Nov 22, 2024
ca5ab06
chore: fix compile error
jcnelson Nov 22, 2024
de84f53
Merge branch 'develop' into feat/tenure-extend-no-blocks
obycode Nov 22, 2024
ecae254
chore: merge schema 5 into 4
obycode Nov 22, 2024
982ca9c
Merge pull request #5452 from stacks-network/feat/tenure-extend-no-bl…
obycode Nov 22, 2024
d13bdb8
Merge pull request #5296 from stacks-network/fix/5285
jcnelson Nov 22, 2024
ecb92c4
Merge branch 'develop' into feat/time-based-tenure-extend
obycode Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: API sync
  • Loading branch information
jcnelson committed Oct 18, 2024
commit 18d11c941c4bf565a65c15938d8783ea2a4a2bfb
1 change: 1 addition & 0 deletions stackslib/src/net/api/postblock_proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ impl NakamotoBlockProposal {

// Static validation checks
NakamotoChainState::validate_nakamoto_block_burnchain(
chainstate.nakamoto_blocks_db(),
&db_handle,
expected_burn_opt,
&self.block,
Expand Down