1831 Commits

Author SHA1 Message Date
Aaron Blankstein
d5d94cfb2d chore: integrate into neon_node. requires Box<dyn ..> 2021-09-23 13:29:48 -05:00
Aaron Blankstein
1004cf9183 fix config/test error 2021-09-10 15:50:58 -05:00
Aaron Blankstein
a95d3be02d Merge branch 'develop' into feat/cost-estimator 2021-09-10 15:44:17 -05:00
Aaron Blankstein
b16dd8b119 use f64 math, add test coverage, formatting, descriptions in README and CHANGELOG 2021-09-10 15:32:57 -05:00
Aaron Blankstein
b0c5f5c4d2 chore: more resilient size_overflow_unconfirmed_stream_microblocks_integration_test 2021-09-09 11:48:48 -05:00
Aaron Blankstein
037bb37dc8 Merge branch 'develop' into feat/cost-estimator 2021-09-09 09:48:41 -05:00
Aaron Blankstein
7b6950f4f5 chore: remove potential infinite loop from fix_2771, use a direct interval for testing slowly adding blocks 2021-09-09 09:41:01 -05:00
Aaron Blankstein
e27d2312a3 feat: make fee estimation, cost estimation, and scalar selection configurable 2021-09-08 15:41:54 -05:00
Aaron Blankstein
e3496d3a3c Merge branch 'master' into chore/merge-master-develop 2021-09-08 09:56:15 -05:00
Aaron Blankstein
b8b33d5269 feat: add FeeEstimator, configurability 2021-09-07 16:12:53 -05:00
Jude Nelson
0c94379c92 fix: fix integration test against some non-determinism 2021-09-03 05:21:57 -04:00
Jude Nelson
6718f08292 fix: clear miner tip on invalid sortition. Also, info!-log microblock mining 2021-09-03 05:21:37 -04:00
Gregory Coppola
f89d29963e Merge branch 'next' into feat/height 2021-09-02 18:16:52 -05:00
Gregory Coppola
9f089a2cba need to move empty snapshot 2021-09-02 17:36:14 -05:00
Jude Nelson
5cd4292409 fix: be consistent in conf.miner settings 2021-09-02 04:31:57 -04:00
Jude Nelson
c01e4b13b3 fix: be more patient with microblock mining in this integration test 2021-09-01 22:53:20 -04:00
Jude Nelson
8ffe63945c chore: cargo fmt 2021-09-01 17:12:31 -04:00
Jude Nelson
1b0f17f8a4 fix: make size_check_integration_test more robust to non-determinism 2021-09-01 17:07:58 -04:00
Jude Nelson
3fd84eea05 fix: yet another fixed integration test 2021-09-01 12:19:28 -04:00
Jude Nelson
08ea8489c6 fix: yet another failing integraiton test because tx fees can't be zero 2021-09-01 04:05:04 -04:00
Jude Nelson
f5a8d34162 fix: only one microblock will be mined if transactions are big enough that they fill the whole epoch 2021-09-01 00:08:11 -04:00
Jude Nelson
6c05d039f1 chore: cargo fmt 2021-08-31 22:35:54 -04:00
Jude Nelson
584e2a2183 fix: remove timeouts in size check integration test -- they're not needed 2021-08-31 22:05:55 -04:00
Jude Nelson
a1f5b28173 fix: fix failing tests due to new non-zero fee default requirement 2021-08-31 18:45:11 -04:00
Jude Nelson
4843cc6ec4 refactor: create block builder settings should be a function of the config 2021-08-31 18:44:39 -04:00
Jude Nelson
f4018764b3 fix: fix failing integration tests because we now need a positive tx fee 2021-08-31 16:41:56 -04:00
Jude Nelson
bee409cfc9 fix: make size-check integration test a little more forgiving of non-determinism 2021-08-30 22:28:21 -04:00
Jude Nelson
f59542cd27 chore: fix integration test with new mempool walk 2021-08-30 18:17:07 -04:00
Jude Nelson
0672e26603 feat: add a test that verifies that origin address consideration is fair -- i.e. all origins that meet the minimum tx fee are considered in a round-robin fashion 2021-08-30 17:50:38 -04:00
Jude Nelson
aaed25111b refactor: remove min_cumulative_fee since it's not used anymore 2021-08-30 12:47:35 -04:00
Jude Nelson
2f77d56a8e fix: remove sleep_before_tenure since it's no longer used 2021-08-30 12:47:20 -04:00
Jude Nelson
6ce86c3615 fix: remove cumulative tx fee setting 2021-08-30 12:45:57 -04:00
Jude Nelson
f5f7e9549c fix: fix failing integration test due to mempool walk timeout 2021-08-28 01:00:42 -04:00
Jude Nelson
382e5d0fdc chore: remove commented-out code 2021-08-28 01:00:26 -04:00
Jude Nelson
d55d60aa75 fix: remove now-unneeded config item for mining 2021-08-28 01:00:10 -04:00
Jude Nelson
ba771ad035 feat: always try and mine a new block immediately after committing to an empty block, and always try to mine if the burnchain tip changes 2021-08-27 23:03:43 +00:00
Jude Nelson
5ef53c8423 chore: cargo fmt 2021-08-27 23:03:16 +00:00
Jude Nelson
98abd88f7f feat: use the miner config's first and subsequent maximum mining times to determine how much time to spend trying to mine an anchored block. Also, rework the RunTenure() relayer thread case so that the node unconditionally tries to mine a block if it notices that there's a new burnchain (i.e. don't wait for a tenure timeout) 2021-08-26 23:01:47 -04:00
Jude Nelson
19e1c0645e feat: add config items for the miner to decide how much time to spend buiding the first block versus subsequent blocks 2021-08-26 22:59:59 -04:00
Jude Nelson
82aa428ad6 feat: add two new integration tests: one to verify that low-fee transactions are ignored by the miner, and one to verify that a maximum miner time of 0ms results in empty blocks (since the node doesn't have time to mine any transactions) 2021-08-26 13:25:57 -04:00
Jude Nelson
bd175693fb refactor: use new BlockBuilderSettings struct 2021-08-26 13:25:46 -04:00
Jude Nelson
6347b2bc3a refactor: use new BlockBuilderSettings struct 2021-08-26 13:25:28 -04:00
Jude Nelson
8b7ae76e8a feat: pass through new [miner] config file settings to the block-building logic 2021-08-26 13:24:53 -04:00
Jude Nelson
43070b262e feat: Add a [miner] config file section that allows the node operator to fill in BlockBuilderSettings and MemPoolWalkSettings structs to control how their nodes mine blocks 2021-08-26 13:24:16 -04:00
Jude Nelson
eb69fc917d Merge branch 'next' into fix/1805 2021-08-19 21:31:02 -04:00
pavitthrap
5200305cd1 Merge branch 'next' into merge/dev-to-next 2021-08-16 16:43:30 -04:00
pavitthrap
d4c5856874 Merge branch 'develop' into fix/rpc-tip 2021-08-05 13:00:48 -04:00
Gregory Coppola
90bc9b1991 added TODO to integration test 2021-08-02 13:17:32 -05:00
Gregory Coppola
5b72b190e9 revert the integrations test 2021-08-02 13:14:43 -05:00
Gregory Coppola
63d24b1185 Release 2.0.11.2.0 (#2750)
* feat: add lcov compatible coverage reporting to clarity-cli

* make lcov output configurable

* chore: cleanup/refactor miner tenure information gathering

* chore: updates for latest bitcoind

* typo

* fix: ensure microblocks mined by the node itself are emitted to the event observer

* feat: emit microblock header hash to event observer, required for micro-fork detection

* feat: include microblock parent hash in /new_microblocks event paylaod

* test: added test to ensure microblock hashes were properly added to the mb event

* fix: #2668 microblock data missing from event emitter while syncing

* Added prev burn block stats to the new_block event

* Added burn block stats for new_microblock event; refactored variable names for burn block stats for the new_block event

* Switched using  to using  for all the burn block stats, handled getting burn block stats in the case that the parent_consensus_hash was the

* Add some string-ascii and string-utf8 types to the docs

* ran format

* Changed panic! to warn! statement

* feat: add output_serialized to clarity-cli

* added some additional examples

* added all the different examples

* added concat example

* feat: make eval_all function public (#2689)

* running format

* Addressed comments.

* Addressed failing tests

* Use a virtual type 'sequence' to condense complicated disjoined types

Instead of having long lists of disjoined types, e.g.,
buff|(list A)|string-ascii|string-utf8

We now condense these to being a 'virtual' type called 'sequence',
which doesn't actually exist in the Clarity type hierarchy,
but is used in the docs, and which is explained in each description
in which it is used.

* Ran 'cargo fmt'

* Fixed some signatures

Some signatures were inconsistent with the input/output types.

* Fixed one more signature

This changes a signature that antedates this PR to be
more consistent.

* Re-worked the types and signatures

Various changes to the focus functions were made for clarity and consistency.

* fix: #2644 reorder UTXO staleness and RBF-limit check

* Addressing comments by @pavitthrap

* Fixes build warnings for 'cargo build' in 'develop' branch

* Added new-microblocks event to event dispatcher docs

* chore: remove tini dependency

* Fixed a vm:docs test case

* Fixed some typos

* removed some files that aren't in 'develop'

* Trying to rever CHANGELOG.md

* Reverting files to the 'develop' branch versions

* fix: logic bug in mocknet/helium miner #2710

* Removed a TODO, the question it relates to is now in issue #2712

* Removed a trailing space character.

* chore: try to speed up some integration tests

* chore: remove infinite loop in microblock_integration test

* test: use wait_for_microblocks rather than a wait_ms

* dont assert microblocks bumped -- it could have been bumped before the call to wait_for_microblocks

* test: wait for microblock to be processed before fetching /v2/info, use loop on wait_for_microblocks

* test: oops, flip equality in /v2/info loop

* docs: adding release process to README.md

* docs: add info on creating release candidate, and Hiro testing envs

* chore: genesis accounts key rotation

* chore: update magic bytes (X6 to T2)

* chore: update POX constants

* chore: update genesis anchoring (block #2000000)

* chore: update testnet command

* fix: address regressions

* chore: cargo fmt

* chore: update readme

* fix: addressing regression in integration test

* fix: silence non-fmt panic warnings

* fix: remove potentiall runtime panic that can arise when a sortition is queried while it is in the process of being invalidated

* fix: disable non-fmt panic warnings

* fix: disable non-fmt panic warnings

* refactor: use PeerNetwork::with_http() to expose the underlying HttpPeer

* fix: when loading block headers, if we encounter an InvalidPoxSortition error from the GetBlocksInv handler, reply a NACK instead of erroring out

* feat: query the list of bootstrap nodes distinct from always-allowed nodes

* fix: address #2730 by considering whether or not we are in the IBD phase when choosing where to start scanning for new block downloads. Also, use the PeerNetwork::with_http() interface to access the inner HTTP peer when downloading blocks and microblocks.

* fix: address #2728 by only rescanning a neighbor's inventory from just before the reward cycle it reported that the local peer diverged. Also, record this sortition height for the block downloader's consumption.

* fix: address #2719 by introducing a Transient(..) error type which indicates that a network error can be resolved by simply re-trying the poll loop.

* refactor: make the HTTP peer an Optional<..> so the PeerNetwork instance can be passed to the HTTP handler code. Also, do a better job at propagating hints from the inventory state-machine to the downloader as part of #2730.

* refactor: use new test API for adding peers

* fix: take a PeerNetwork as an argument for handling requests, and address #2738 by way of using cached data in the PeerNetwork to construct a /v2/info response without doing any I/O

* refactor: take a PeerNetwork instance as an argument instead of a hodge-podge of fields from it, so it can be passed into the HTTP request handler

* fix: address #2701 by catching Transient(..) errors and simply logging them

* fix: address #2713 by starting processing from the first burnchain block of the reward cycle in which the canonical Stacks chain state starts

* refactor: use latest rust-ism for spin loops

* fix: fix compiler errors in unit tests

* fix: more compile-time errors

* docs: address PR feedback

* fix: update the cached burnchain view *before* servicing HTTP requests, so /v2/info acts on the *current* chain view

* Update README.md

Co-authored-by: Ludo Galabru <ludovic@blockstack.com>

* Update README.md

Co-authored-by: Ludo Galabru <ludovic@blockstack.com>

* Update README.md

Co-authored-by: Ludo Galabru <ludovic@blockstack.com>

* docs: add optionality on when to open develop->master PR

* fix: sync one more blocks inventory on PoX disagreement so we don't stall, and use the cached burnchain_tip in PeerNetwork to determine whether or not the PoX bitvector needs to be reloaded. In addition, use the _new_ PoX bitvector length to carry out an inv trucation if it's shorter

* fix: refresh cached sortition state before doing anything else in the peer network run loop

* fix: mask net_error::Transient in the p2p state machine so we don't accidentally drop receipts

* fix: always panic on network error, now that the network masks transient errors

* fix: re-enable non_fmt_panic lint

* style: make bufflength instance variable private

* fix: only set the block/microblock start sortition if the downloader isn't in the middle of processing blocks

* fix: when starting a block inventory scan from a remote bootstrap peer that's diverged from us, start at either the reward cycle that contains the highest processed Stacks block, or INV_REWARD_CYCLES fewer reward cycles than the diverged reward cycle -- whichever is lower

* fix: when starting a downloader pass, start from the sortition height of either the highest processed Stacks block, or the inventory sortition height hint from the inv state machine -- whichever is lower

* chore: address feedbacks

* fix: use constant

* chore: fix all warns in `cargo check --tests --workspace`

* chore: simplify fmt/asserts

* Add Changelog for 2.0.11.2.0 (#2760)

* changelog for 2.0.11.2.0

* fixed spelling error

* fixed grammar error in changelog

* fix: issue 2771

* fix: tests::neon_integrations::bitcoind_forking_test

* fix: move log

* fix: move comment

* feat(docs): Add to "Non-Consensus Breaking Release Process" (#2766)

* changelog for 2.0.11.2.0

* start to discuss the version number

* changelog section

* fixed the wording around conensus breaking change

* updates to the changelog section

* added to release timing.

* added to timing section

* fix: test + patch

* chore: cargo fmt

* fix: edge case

* fix: restore timeout

* chore: add comments

* fix: revert patch

* chore: cargo fmt

* Update testnet/stacks-node/src/tests/neon_integrations.rs

* Update testnet/stacks-node/src/tests/neon_integrations.rs

* Update testnet/stacks-node/src/tests/neon_integrations.rs

* fix: bitcoind_forking_test assertions added

* fix: bitcoind_forking_test assertions added

* Update src/burnchains/burnchain.rs

* fix: only consider target block if relevant

* chore: cargo fmt

* chore: add log when ignoring target

* Update src/burnchains/burnchain.rs

* Update src/burnchains/burnchain.rs

* fix: log

* fix: switched all occurrences of max_value/min_value to MAX/MIN because it will deprecated in a future version of Rust

* feat(Changelog) Add some PR's that got missed for 2.0.11.2.0 (#2789)

* added micro-blocks PR to the changelog

* add PR 2647

* removed a space

* added some notes about the reset of the testnet

* "master -> develop" ahead of Release 2.0.11.2.0 (#2796)

* fix: typos in Clarity docs

* docs: rupdate testnet information and run lint

* docs: add regtest name and address reviewer comments

Co-authored-by: Patrick Gray <pgray@hiro.so>
Co-authored-by: pavitthrap <paviusa23@gmail.com>

* feat(Changelog): Adds in two patches to the Changelog (#2795)

* Add Ludo's bug fixes to the change log.

* removed extra space

Co-authored-by: Aaron Blankstein <aaron@blockstack.com>
Co-authored-by: Matthew Little <zone117x@gmail.com>
Co-authored-by: Pavitthra Pandurangan <paviusa23@gmail.com>
Co-authored-by: Greg Coppola <greg@hiro.so>
Co-authored-by: Hank Stoever <hstove@gmail.com>
Co-authored-by: Reed Rosenbluth <331327+reedrosenbluth@users.noreply.github.com>
Co-authored-by: Jude Nelson <judecn@gmail.com>
Co-authored-by: CharlieC3 <2747302+CharlieC3@users.noreply.github.com>
Co-authored-by: Ludo Galabru <ludovic@blockstack.com>
Co-authored-by: Patrick Gray <pgray@hiro.so>
2021-08-02 10:45:03 -05:00