Commit Graph

18299 Commits

Author SHA1 Message Date
Jude Nelson
c288bca116 fix: plumb through target epoch ID in burn calculation 2022-10-27 12:15:31 -04:00
Jude Nelson
16f4655e8f fix: remove warning 2022-10-27 12:15:12 -04:00
Jude Nelson
7bd54e67ef Merge branch 'fix/restore-and-gate-pox-sunset' into chore/merge-develop-to-next-2 2022-10-27 11:22:49 -04:00
Jude Nelson
fda096af89 Merge branch 'develop' into next 2022-10-27 11:17:22 -04:00
Jude Nelson
9d897256b6 Merge pull request #3335 from stacks-network/feat/interruptable-miner
[DRAFT] [miner] Reduce fork and orphan rate with an interruptable miner
2022-10-22 00:49:33 +00:00
Jude Nelson
aba47e4228 fix: only disable the miner thread if the relayer reports that a network result contained new data 2022-10-21 16:21:56 -04:00
Jude Nelson
b1b0e2c092 feat: report number of *new* blocks, confirmed microblocks, and unconfirmed microblocks when processing a NetworkResult 2022-10-21 16:21:22 -04:00
Jude Nelson
1f7b295ea0 fix: remove mining fairness test, since this is no longer the desired behavior of mempool walks 2022-10-20 21:44:33 -04:00
Jude Nelson
049da9dcce Merge pull request #3352 from stacks-network/fix/retry-store-nonces
Fix/retry store nonces
2022-10-20 19:05:13 +00:00
Jude Nelson
33458fb878 fix: when mock-mining, always re-try minig an anchored block even if we haven't mined a microblock yet. Also, remove gratuitous debug messages. 2022-10-20 15:06:53 -04:00
Jude Nelson
a0fddb7aaf chore: add changelog 2022-10-20 15:06:04 -04:00
Jude Nelson
83f54f2eb5 fix: add a test to verify that a concurrent writer thread may delay the mempool walk from caching updated nonces, but it cannot prevent it 2022-10-20 13:52:31 -04:00
Jude Nelson
2896e40632 fix: if the act of storing mempool nonces in a write-through manner fails for some reason, then cache them until the end of the iteration loop and store them then as a transaction 2022-10-20 13:51:41 -04:00
Jude Nelson
6338cd3b1b chore: test-only deps shouldn't be included as top-level imports 2022-10-20 10:42:31 -04:00
Jude Nelson
940969e41d chore: require rust 1.61 2022-10-20 10:42:06 -04:00
Jude Nelson
0929f2b65f chore: update test comments to indicate that we're not supposed to consider transactions if they have higher nonces than an unmineable transaction 2022-10-20 10:41:44 -04:00
Jude Nelson
34189b62fc fix: calculate poll time in millis, not seconds; generate mock-miner VRF keypair in the miner thread if we're in mock-mining mode 2022-10-20 10:36:40 -04:00
Jude Nelson
458e055fbb fix: use new config options to get tests to pass 2022-10-19 21:54:12 -04:00
Jude Nelson
9f9795b8e9 fix: fix failing integration test due to using a new block version 2022-10-19 21:54:00 -04:00
Jude Nelson
f933814ab5 chore: log when we get microblock data (and poison results) 2022-10-19 21:53:44 -04:00
Jude Nelson
bc91a0a2a4 Merge branch 'develop' into feat/interruptable-miner 2022-10-19 21:53:33 -04:00
Jude Nelson
56061efb66 Merge pull request #3337 from stacks-network/feat/mempool-improvements
Mempool improvements
2022-10-19 23:45:47 +00:00
Brice Dobry
36690d0565 test: add unit tests for problematic/error txs
The old implementation incremented nonces when there was an error,
problematic, or skipped transaction, which would cause it to then
attempt to consider later nonces from the same addresses, incorrectly.
Three new unit tests are added to check for these cases.
2022-10-19 16:18:54 -04:00
Brice Dobry
1a65f0f0c5 test: fix tests' reliance on incorrect nonce
These tests were dependent on the old implementations increment of
nonces when a transaction was skipped. The correct response is to only
increment the nonces when the transaction is successfully included.
Therefore these tests need to simulate a success event in order to get
the expected behavior to be tested.
2022-10-19 15:44:53 -04:00
Jude Nelson
dacf5e63a7 feat: fix failing integration tests with new config options 2022-10-19 13:05:42 -04:00
Jude Nelson
3d30b92b5d feat: block version 2 2022-10-19 13:05:31 -04:00
Jude Nelson
d58449b879 fix: use a new block version for this release 2022-10-19 13:05:18 -04:00
Brice Dobry
35b38cb797 chore: cleanup last_known_nonces 2022-10-19 12:58:48 -04:00
Brice Dobry
f4b328b9b0 test: fix mempool_walk_ tests 2022-10-19 12:18:49 -04:00
Jude Nelson
66aefb508f Merge branch 'develop' into feat/mempool-improvements 2022-10-19 15:55:11 +00:00
Brice Dobry
b9b9bed6ae fix: only bump nonces when a tx is included
On `TransactionEvent`s other than `Success`, the nonces should not be
bumped because they indicate that the transaction is not included in the
block.
2022-10-19 10:27:34 -04:00
Brice Dobry
8ec406677b docs: improved iterate_candidates comment
Clarified the "best effort", based on Greg's feedback.
2022-10-19 10:04:15 -04:00
Brice Dobry
ab0dd14c06 docs: add to iterate_candidates documentation 2022-10-19 09:25:22 -04:00
Brice Dobry
2918ccbf14 fix: parameterized_mempool_walk_test
The test needs to call `iterate_candidates` in a loop, like the miner
does, in order to get all of the transactions considered.
2022-10-19 09:19:18 -04:00
Brice Dobry
b527be6184 feat: change behavior of sqlite nonce cache
Originally, this cache was only used after the in-memory cache is full.
Now, it is used more like a typical L2 cache, where it is always in sync
with the L1 cache, i.e. when the L1 cache is updated, so is the L2 cache.
Since this L2 cache is preserved across iterations, it improves the
speed in the typical running behavior.
2022-10-19 09:17:33 -04:00
Brice Dobry
0913218665 fix: fix insertion of nonces into cache 2022-10-19 08:39:03 -04:00
Jude Nelson
df6ab634b2 fix: update tests with new miner behavior 2022-10-18 23:39:05 -04:00
Jude Nelson
4a4ce1f01c fix: run microblock tenure multiple times when we're the tenure winner, and report missed sortitions if the parent block lookup fails if the burnchain tip changed 2022-10-18 23:38:33 -04:00
Jude Nelson
9ff5b6ca6a fix: run microblock poison integration test 2022-10-18 23:31:52 -04:00
Jude Nelson
e4d7e304e7 fix: fix broken unit test compile error 2022-10-18 20:09:37 -04:00
Jude Nelson
4cd13c15ad feat: surpress warnings, and add ability to create a distribution of transactions with different runtime sizes 2022-10-18 17:00:26 -04:00
Jude Nelson
1c8cb4c919 fix: surpress warnings 2022-10-18 17:00:11 -04:00
Jude Nelson
cd1990974c fix: surpress warnings 2022-10-18 17:00:00 -04:00
Jude Nelson
becf0bcbc7 fix: surpress warnings 2022-10-18 16:59:49 -04:00
Jude Nelson
7f4dc0bb0b fix: surpress warnings 2022-10-18 16:59:34 -04:00
Jude Nelson
0bde57822c fix: surpress warnings 2022-10-18 16:59:25 -04:00
Jude Nelson
c00b12aa46 fix: surpress warnings 2022-10-18 16:59:04 -04:00
Brice Dobry
7278a3d49e feat: add second-level nonce caching in sqlite db 2022-10-18 16:56:50 -04:00
Greg Coppola
0a2968e1ee tests are failing when cache is tight, and passing when cache is not a factor
see test results...

running 9 tests
test chainstate::stacks::miner::test::mempool_walk_test_users_1_rounds_10_cache_size_2_null_prob_100 ... FAILED
test chainstate::stacks::miner::test::mempool_walk_test_users_1_rounds_10_cache_size_2_null_prob_0 ... FAILED
test chainstate::stacks::miner::test::mempool_walk_test_users_10_rounds_3_cache_size_2_null_prob_50 ... FAILED
test chainstate::stacks::miner::test::mempool_walk_test_users_1_rounds_10_cache_size_2_null_prob_50 ... FAILED
test chainstate::stacks::miner::test::mempool_walk_test_users_10_rounds_3_cache_size_2_null_prob_0 ... FAILED
test chainstate::stacks::miner::test::mempool_walk_test_users_10_rounds_3_cache_size_2_null_prob_100 ... FAILED
test chainstate::stacks::miner::test::mempool_walk_test_users_10_rounds_3_cache_size_2000_null_prob_0 ... ok
test chainstate::stacks::miner::test::mempool_walk_test_users_10_rounds_3_cache_size_2000_null_prob_100 ... ok
test chainstate::stacks::miner::test::mempool_walk_test_users_10_rounds_3_cache_size_2000_null_prob_50 ... ok
2022-10-18 14:23:37 -05:00
Greg Coppola
fad4ec0056 fix parameterized test: set the mempool walk settings from test params 2022-10-18 14:15:40 -05:00