mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-24 16:19:50 +08:00
c23c8fa4ec2f7f471ced76defbf528cc5e171425
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c2506552e7 |
merge: next-costs into next (#2956)
* fix: some spot fixes for obtaining epoch and block limit from clarity connection, adding evaluated epoch to block receipt * fix unit test errors, remove panics from net paths, use /v2/info to get current burn height in integration test * fix: use UnitTest versions of Burnstate and Headers dbs, which return sane-ish block height. Explicit special case for genesis block in get_epoch_of. Use Clarity epoch for read only connections * use drop_unconfirmed_state directly rather than begin_unconfirmed->rollback_unconfirmed * Fix: single line in sortdb for each db config version * feat: use serialized_size() aggregation for cost inputs of linear functions, #2871 * chore: remove unused CostInputHandle struct * chore: prepare changelog for release * chore: fix merge artifacts in unit tests * test: start of testing for #2913. adds a mined_block event to the dispatcher * fix: issue raised in #2913 * docs: add reference for the event dispatcher changes * fix: make burnchain test framework set the epoch marker in block-commits * chore: improve documentation for getting the parent block snapshot and block commit * feat: add has_microblock_parent() method to StacksBlockHeader and StacksBlock * fix: implement #2904 -- make it so that if an anchored block straddles an epoch boundary, it must not have a microblock parent. It will be invalid if it does. * feat: make it so the stacks anchored block miner will *not* confirm a microblock stream if the block it produces has a parent anchored block in a different epoch. Also, add unit tests to both the miner and consensus rules to make sure that the miner behaves this way, and a block that violates this new rule will be rejected * feat: add a variant for processing a tenure in the test framework that is allowed to fail * test: fix the assertion in runtime_overflow_unconfirmed_microblocks_integration_test to match new expected behavior * ci: add new test to github workflow * feat: update costs-2 with latest benchmark results, expand unit test coverage in vm::tests::costs * test: expand coverage for analysis costs in 2.05 * chore: refactoring with new API * fix: remember which blocks actually execute the epoch transition, so that when we process a child of that block, we can determine whether or not the child confirmed any microblocks of that epoch-transition block (it shouldn't) * fix: add a new table for stacks block IDs in which an epoch transition takes place, and add the schema migration code to apply it * fix: update the miner test to verify that both the validate_anchor_block_burnchain() method and the append_block() method correctly reject blocks whose parents encountered an epoch transaction and who confirmed microblocks * fix: test code refactoring to always restore sortdb and node in the test node when processing an epoch that could fail * chore: store network epoch in stacks epoch * chore: use network epoch in stacks epoch * chore: use network epoch in stacks epoch * chore: use network epoch in stacks epoch * chore: use network epoch in stacks epoch * feat: require the last byte of peer_version to indicate the epoch of the node (0x05 now) * feat: require a preamble's peer_version's epoch marker to be at least as high as the local node's epoch marker, or if it isn't, require that it is at least as high as the current epoch's epoch marker * refactor: pass along epochs * refactor: pass along epochs to peer network * refactor: add network_epoch to stacks epoch * refactor: add network_epoch to stacks epoch * refactor: add network_epoch to stacks epoch * refactor: add network_epoch to stacks epoch * refactor: pass epochs along to peer network * refactor: pass along epochs to peer network * refactor: add network_epoch to stacks epoch * refactor: add network epoch to stacks epoch * chore: test-debug output for rejecting peers based on their peer_version epoch * feat: e2e test to verify that nodes in different epochs can't talk to each other * chore: cargo fmt * fix: log the right hashes * fix: add epoch_205 test to verify that the new code that tracks which blocks contained epoch transitions works end-to-end * feat: update costs-2, fixing the matching between various paired methods * feat: match nft transfer/burn/mint/get-owner * Stacks 2.05: Allow epochs to be specified in Toml for Testnet (#2910) * added debug and serialize to the burnchainconfig * can supply epochs in toml, only use if not mainnet * add enough Debug to print ConfigFile * revert src/main * reduced some comments * info to debug * changed a few comments * removed the serialize's * fixed the doc * removed some Debug's * panicking earlier * chore: split testnet and mainnet costs * chore: select 2.05 xenon testnet start height, dead code elimination * fix: 2.0/1.0 epoch heights in testnet * chore: #2878 set 2.05 mainnet burn height * test: fix some test flakiness in epoch_205::exact * test: add assertion that the epoch switch is applied * chore: cargo fmt * fix: attempt #2 on testnet block height - 2104380 * test: add some comments for test changes * fix: include network_epoch * fix: add back in network_epoch * fix typo (#2929) * fix: insert epochs on migration in SortitionDB::connect, error in SortitionDB::open * smooth similar runtimes to same value, bump cost_principal_of to hash160(32) * Stacks 2.05: Add Epoch to Cost Estimate Key (#2923) * added bunch of things * moving the stuff * test compiles * added a test * fixed typo * added two tests * updated code/tests in stacks-node * replaced indexed conn with unindexed one * address PR feedback * add comment to validate_and_insert_epochs * fix: invoke connect early to avoid race-to-connect * fix: move connect_dbs to *after* initial burnchain sync * Ci/fix codecov (#2932) * ci: update codecov upload method * ci: give codecov git info * ci: codecov for stacks-node tests * ci: give codecov git access * ci: build binary and fix path * feat: add methods to directly query database version information from a path, so we can determine if the database is up to date with the current epoch * feat: add top-level method to check the sortition and chainstate database versions against the current epoch, to verify if they are consistent * chore: test for verifying that the database version check code works if the databases don't exist, if they do exist, and if they do exist in different epochs * chore: refactor the code for creating directories in the stacks chain state and for generating the various paths to its database files, and use the new refactored code to make it possible to query the chainstate database version directly from a path. * chore: document find_epoch() * feat: add get_stacks_epochs() trait implementation * feat: add get_stacks_epochs trait implementation * feat: require a burnchain controller to be able to determine the sequence of stacks epochs it supports * feat: check the chainstate database versions (if they exist), and abort the node if the versions are incompatible with the current epoch * fix: only return neighbors supported by the current epoch * fix: when querying neighbors, consider the peer version's epoch marker, and only return neighbors with epoch markers equal or higher * chore: api sync * chore: add helper method to get the current epoch from the peer network * chore: refactor /v2/neighbors to pass the current epoch marker * Ci/next costs coverage (#2934) * Ci/fix codecov (#2932) * ci: update codecov upload method * ci: give codecov git info * ci: codecov for stacks-node tests * ci: give codecov git access * ci: build binary and fix path * ci: code coverage for bitcoind_integration_test * ci: fix bin path * ci: cargo test first then build * ci: syntax * ci: name each code cov upload * ci: adjust source dir * switch cost tests to use mainnet as well as testnet * chore: add CHANGELOG.md entry for 2.05 * fix: use indexer's get_stacks_epochs() * chore: use testnet chain ID constant * mainnet tests are failing * chore: sync costs-2.clar with sip-012 * still not passing * all but two tests passing * fix run-on sentence * ok * changing the contract to be variable * test_cost_contract_short_circuits passing for mainnet * had to comment two things to get test to pass * Revert "had to comment two things to get test to pass" This reverts commit |