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

merge: next-costs into next #2956

Merged
merged 560 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
560 commits
Select commit Hold shift + click to select a range
58fecc8
fix: some spot fixes for obtaining epoch and block limit from clarity…
kantai Nov 3, 2021
3409855
fix unit test errors, remove panics from net paths, use /v2/info to g…
kantai Nov 3, 2021
a948347
Merge remote-tracking branch 'origin/next-costs' into feat/dynamic-li…
kantai Nov 3, 2021
b90a5ba
fix: use UnitTest versions of Burnstate and Headers dbs, which return…
kantai Nov 3, 2021
85a42f0
use drop_unconfirmed_state directly rather than begin_unconfirmed->ro…
kantai Nov 3, 2021
2965762
Fix: single line in sortdb for each db config version
pavitthrap Nov 4, 2021
eff65dc
Merge branch 'next-costs' into feat/transition-sortdb
pavitthrap Nov 4, 2021
67c43f6
Merge pull request #2903 from blockstack/feat/transition-sortdb
pavitthrap Nov 4, 2021
9fa0625
Merge remote-tracking branch 'origin/next-costs' into feat/dynamic-li…
kantai Nov 4, 2021
7291c53
feat: use serialized_size() aggregation for cost inputs of linear fun…
kantai Nov 4, 2021
b18191d
Merge pull request #2902 from blockstack/feat/dynamic-limits
kantai Nov 5, 2021
b66e0b7
chore: remove unused CostInputHandle struct
kantai Nov 5, 2021
5d021a9
chore: prepare changelog for release
kantai Nov 8, 2021
fcc717d
Merge branch 'develop' into next-costs
kantai Nov 9, 2021
7abd0c2
chore: fix merge artifacts in unit tests
kantai Nov 9, 2021
f688e8c
test: start of testing for #2913. adds a mined_block event to the dis…
kantai Nov 9, 2021
9ee9101
fix: issue raised in #2913
kantai Nov 10, 2021
b1291da
docs: add reference for the event dispatcher changes
kantai Nov 10, 2021
c15b4bc
Merge pull request #2909 from blockstack/feat/2871-input-sizing
kantai Nov 10, 2021
4ef469b
fix: make burnchain test framework set the epoch marker in block-commits
jcnelson Nov 10, 2021
e7a567f
chore: improve documentation for getting the parent block snapshot an…
jcnelson Nov 10, 2021
3639aa3
feat: add has_microblock_parent() method to StacksBlockHeader and Sta…
jcnelson Nov 10, 2021
28f0dea
fix: implement #2904 -- make it so that if an anchored block straddle…
jcnelson Nov 10, 2021
bdeb4e5
feat: make it so the stacks anchored block miner will *not* confirm a…
jcnelson Nov 10, 2021
bfed987
feat: add a variant for processing a tenure in the test framework tha…
jcnelson Nov 10, 2021
342a498
test: fix the assertion in runtime_overflow_unconfirmed_microblocks_i…
kantai Nov 11, 2021
e9c6d49
ci: add new test to github workflow
kantai Nov 11, 2021
0b12ed0
Merge pull request #2916 from blockstack/test/exact-costs-2913
kantai Nov 12, 2021
451d181
feat: update costs-2 with latest benchmark results, expand unit test …
kantai Nov 12, 2021
25db5c9
test: expand coverage for analysis costs in 2.05
kantai Nov 12, 2021
6ff2f69
chore: refactoring with new API
jcnelson Nov 12, 2021
1d0e75d
fix: remember which blocks actually execute the epoch transition, so …
jcnelson Nov 12, 2021
a488109
fix: add a new table for stacks block IDs in which an epoch transitio…
jcnelson Nov 12, 2021
8c69c47
fix: update the miner test to verify that both the validate_anchor_bl…
jcnelson Nov 12, 2021
99f9fb2
fix: test code refactoring to always restore sortdb and node in the t…
jcnelson Nov 12, 2021
4c4bf3b
Merge branch 'next-costs' into fix/2904
jcnelson Nov 12, 2021
f56698a
chore: store network epoch in stacks epoch
jcnelson Nov 12, 2021
ab4b21f
chore: use network epoch in stacks epoch
jcnelson Nov 12, 2021
b7a6c18
chore: use network epoch in stacks epoch
jcnelson Nov 12, 2021
541b49e
chore: use network epoch in stacks epoch
jcnelson Nov 12, 2021
86cdde8
chore: use network epoch in stacks epoch
jcnelson Nov 12, 2021
0f84eb7
feat: require the last byte of peer_version to indicate the epoch of …
jcnelson Nov 12, 2021
b37c52a
feat: require a preamble's peer_version's epoch marker to be at least…
jcnelson Nov 12, 2021
7d54d29
refactor: pass along epochs
jcnelson Nov 12, 2021
d2404a5
refactor: pass along epochs to peer network
jcnelson Nov 12, 2021
25ce958
refactor: add network_epoch to stacks epoch
jcnelson Nov 12, 2021
d42b730
refactor: add network_epoch to stacks epoch
jcnelson Nov 12, 2021
ef94f07
refactor: add network_epoch to stacks epoch
jcnelson Nov 12, 2021
ca1f6fc
refactor: add network_epoch to stacks epoch
jcnelson Nov 12, 2021
f72cacf
refactor: pass epochs along to peer network
jcnelson Nov 12, 2021
c625164
refactor: pass along epochs to peer network
jcnelson Nov 12, 2021
7afc24e
refactor: add network_epoch to stacks epoch
jcnelson Nov 12, 2021
e4c34dd
refactor: add network epoch to stacks epoch
jcnelson Nov 12, 2021
85a1de4
Merge branch 'next-costs' into fix/2911
jcnelson Nov 12, 2021
610583a
chore: test-debug output for rejecting peers based on their peer_vers…
jcnelson Nov 12, 2021
307d62f
feat: e2e test to verify that nodes in different epochs can't talk to…
jcnelson Nov 12, 2021
5abd20b
chore: cargo fmt
jcnelson Nov 12, 2021
d8d25b8
fix: log the right hashes
jcnelson Nov 12, 2021
62d38bc
fix: add epoch_205 test to verify that the new code that tracks which…
jcnelson Nov 12, 2021
f59de66
feat: update costs-2, fixing the matching between various paired methods
kantai Nov 13, 2021
af2922d
feat: match nft transfer/burn/mint/get-owner
kantai Nov 13, 2021
57c711c
Stacks 2.05: Allow epochs to be specified in Toml for Testnet (#2910)
gregorycoppola Nov 15, 2021
0b3dd8e
Merge remote-tracking branch 'origin/next-costs' into feat/costs-2-cl…
kantai Nov 15, 2021
67f16bc
chore: split testnet and mainnet costs
kantai Nov 15, 2021
5117aaa
chore: select 2.05 xenon testnet start height, dead code elimination
kantai Nov 15, 2021
a750638
Merge pull request #2920 from blockstack/fix/2904
jcnelson Nov 15, 2021
8319165
fix: 2.0/1.0 epoch heights in testnet
kantai Nov 15, 2021
4d2baa4
chore: #2878 set 2.05 mainnet burn height
kantai Nov 15, 2021
879ebff
test: fix some test flakiness in epoch_205::exact
kantai Nov 15, 2021
8322db7
Merge branch 'next-costs' into chore/2889-testnet-2.05
kantai Nov 15, 2021
4972224
test: add assertion that the epoch switch is applied
kantai Nov 15, 2021
3d6cb3c
chore: cargo fmt
kantai Nov 15, 2021
01b1269
fix: attempt #2 on testnet block height - 2104380
kantai Nov 15, 2021
fd7fe74
Merge pull request #2928 from blockstack/chore/2889-testnet-2.05
kantai Nov 15, 2021
a1d967b
Merge remote-tracking branch 'origin/next-costs' into feat/costs-2-cl…
kantai Nov 15, 2021
2103e9f
test: add some comments for test changes
kantai Nov 15, 2021
783158f
Merge branch 'next-costs' into fix/2911
jcnelson Nov 16, 2021
ce6f6c4
fix: include network_epoch
jcnelson Nov 16, 2021
4b5cea1
fix: add back in network_epoch
jcnelson Nov 16, 2021
3fc0833
Merge pull request #2925 from blockstack/fix/2911
jcnelson Nov 16, 2021
f38fe32
fix typo (#2929)
gregorycoppola Nov 16, 2021
5f93f2c
fix: insert epochs on migration in SortitionDB::connect, error in Sor…
kantai Nov 16, 2021
cf8cef9
smooth similar runtimes to same value, bump cost_principal_of to hash…
kantai Nov 16, 2021
30fd6bb
Stacks 2.05: Add Epoch to Cost Estimate Key (#2923)
gregorycoppola Nov 16, 2021
3937570
address PR feedback
kantai Nov 16, 2021
4fdde14
add comment to validate_and_insert_epochs
kantai Nov 16, 2021
0b10997
Merge pull request #2924 from blockstack/feat/costs-2-clar-2894
kantai Nov 16, 2021
e50bf43
Merge remote-tracking branch 'origin/next-costs' into fix/existing-state
kantai Nov 16, 2021
c694612
Merge pull request #2930 from blockstack/fix/existing-state
kantai Nov 16, 2021
f6743d4
fix: invoke connect early to avoid race-to-connect
kantai Nov 16, 2021
97285d4
fix: move connect_dbs to *after* initial burnchain sync
kantai Nov 17, 2021
7400c34
Merge pull request #2931 from blockstack/fix/race-to-connect
kantai Nov 17, 2021
8ceb0c0
Ci/fix codecov (#2932)
CharlieC3 Nov 17, 2021
be1c6bd
feat: add methods to directly query database version information from…
jcnelson Nov 17, 2021
dcf0503
feat: add top-level method to check the sortition and chainstate data…
jcnelson Nov 17, 2021
1305b5b
chore: test for verifying that the database version check code works …
jcnelson Nov 17, 2021
8964793
chore: refactor the code for creating directories in the stacks chain…
jcnelson Nov 17, 2021
7b48264
chore: document find_epoch()
jcnelson Nov 17, 2021
02cd864
feat: add get_stacks_epochs() trait implementation
jcnelson Nov 17, 2021
2a43291
feat: add get_stacks_epochs trait implementation
jcnelson Nov 17, 2021
ee15334
feat: require a burnchain controller to be able to determine the sequ…
jcnelson Nov 17, 2021
5b2384b
feat: check the chainstate database versions (if they exist), and abo…
jcnelson Nov 17, 2021
e8b0517
fix: only return neighbors supported by the current epoch
jcnelson Nov 18, 2021
5ab5f11
fix: when querying neighbors, consider the peer version's epoch marke…
jcnelson Nov 18, 2021
4ba6df3
chore: api sync
jcnelson Nov 18, 2021
3ba3476
chore: add helper method to get the current epoch from the peer network
jcnelson Nov 18, 2021
e39c56c
chore: refactor /v2/neighbors to pass the current epoch marker
jcnelson Nov 18, 2021
6e794be
Ci/next costs coverage (#2934)
CharlieC3 Nov 18, 2021
b5c50a4
switch cost tests to use mainnet as well as testnet
gregorycoppola Nov 18, 2021
0af1337
Merge pull request #2937 from blockstack/fix/2936
jcnelson Nov 18, 2021
974a3be
chore: add CHANGELOG.md entry for 2.05
kantai Nov 18, 2021
677c6cc
fix: use indexer's get_stacks_epochs()
jcnelson Nov 18, 2021
653df6c
chore: use testnet chain ID constant
jcnelson Nov 18, 2021
75e307d
Merge branch 'next-costs' of https://github.com/blockstack/stacks-blo…
jcnelson Nov 18, 2021
07660b4
Merge branch 'next-costs' into fix/2899
jcnelson Nov 18, 2021
1a5164c
mainnet tests are failing
gregorycoppola Nov 18, 2021
c18b2aa
chore: sync costs-2.clar with sip-012
kantai Nov 19, 2021
a5a345f
still not passing
gregorycoppola Nov 19, 2021
44c282e
all but two tests passing
gregorycoppola Nov 19, 2021
cd4d814
fix run-on sentence
kantai Nov 19, 2021
cdcacdf
ok
gregorycoppola Nov 19, 2021
67c3468
changing the contract to be variable
gregorycoppola Nov 19, 2021
4439b1e
Merge branch 'feat/test2' into feat/test-mainnet
gregorycoppola Nov 19, 2021
37e8788
test_cost_contract_short_circuits passing for mainnet
gregorycoppola Nov 19, 2021
4974ea9
had to comment two things to get test to pass
gregorycoppola Nov 19, 2021
9875c5d
Revert "had to comment two things to get test to pass"
gregorycoppola Nov 19, 2021
15a3b6e
mainnet doesn't clone
gregorycoppola Nov 19, 2021
b92776f
add libclariy
gregorycoppola Nov 19, 2021
72dfe25
revert test_cost_voting_integration being rstest
gregorycoppola Nov 19, 2021
fa35d2b
Revert "mainnet doesn't clone"
gregorycoppola Nov 19, 2021
dacf667
remove rstest dependency
gregorycoppola Nov 19, 2021
a06d5d6
Merge branch 'feat/test-mainnet' of github.com:blockstack/stacks-bloc…
gregorycoppola Nov 19, 2021
6c2f199
rolling back rstest dependencies
Nov 19, 2021
f8ad654
remove clone again
Nov 19, 2021
2e50edd
Merge pull request #2942 from blockstack/chore/sync-to-sip12
kantai Nov 19, 2021
7fc6731
remove extra arguments for OE:new
Nov 19, 2021
75cb382
refactor the "analysis" cost tests
Nov 19, 2021
e112bb8
added test
Nov 19, 2021
51bab44
ok
Nov 19, 2021
93b6f77
Merge pull request #2935 from blockstack/fix/2899
jcnelson Nov 19, 2021
11a4b30
chore: refactor LimitedCostTracker into Free and Limited variants
kantai Nov 20, 2021
a2a76e6
use "Stacks boot address"
kantai Nov 20, 2021
b8430f9
Merge pull request #2945 from blockstack/chore/refactor-free-tracker
kantai Nov 20, 2021
1d741ad
Merge pull request #2941 from blockstack/feat/2.05-changelog
kantai Nov 20, 2021
d5ddfdf
Merge remote-tracking branch 'origin/develop' into next-costs
kantai Nov 22, 2021
ac6575c
Merge pull request #2940 from blockstack/feat/test-mainnet
kantai Nov 22, 2021
453c64b
Merge remote-tracking branch 'origin/next-costs' into merge/next-costs
Nov 23, 2021
b014164
removed some ??
Nov 23, 2021
e4333cc
Merge remote-tracking branch 'origin/next-costs' into merge/nc
Nov 29, 2021
e4156e5
Merge branch 'merge/next-costs' into merge/nc2
Nov 29, 2021
b04f0a5
small fixes
Nov 29, 2021
b433e2b
fixing double declares
Nov 29, 2021
a14a6f6
removed more duplicate includes/defs
Nov 29, 2021
693b0b4
removed more dpulicates
Nov 29, 2021
a9d6e50
cleaning up test code
Nov 29, 2021
260a57b
fixed the epochs
Nov 29, 2021
0d0e0af
fixed the epochs
Nov 29, 2021
19da702
clarityinstance::New
Nov 29, 2021
c2a1d6e
compiler errors
Nov 29, 2021
e2a220e
replace versions
Nov 29, 2021
fdb6489
added some limits
Nov 29, 2021
c60d4f4
removed blocklimit from ClarityInstance
Nov 29, 2021
8577900
clarity version hardcode
Nov 29, 2021
fa3b32c
eval_all fix
Nov 29, 2021
36eea82
tenure_with_txs
Nov 29, 2021
829edd3
error[E0592]: duplicate definitions with name `unit_test`
Nov 29, 2021
00329ba
error[E0063]: missing field `epochs` in initializer of `BitcoinIndexe…
Nov 29, 2021
50ac251
iremove duplicate calls to StacksChainState::process_epoch_transition
Nov 29, 2021
2500ee2
add arg to type_check
Nov 29, 2021
994eb91
back to execute in epoch
Nov 29, 2021
4a6d371
added execute_with_parameters
Nov 29, 2021
b004865
replaced many to execute_with_parameters
Nov 29, 2021
6e233f1
fix execute_with_parameters
Nov 29, 2021
1726dc8
default values in eval with params
Nov 29, 2021
581a102
ClarityInstance::new args
Nov 29, 2021
81c12b4
unused import
Nov 29, 2021
83ecc6b
initialize contract
Nov 29, 2021
b21c814
fix open_and_exec
Nov 29, 2021
e9a0df4
added easy "not covered" match cases
Nov 29, 2021
2a5bda8
final "not covered" case
Nov 29, 2021
e4dbcb0
Ok(ture) output
Nov 29, 2021
f476cd2
clarityersion
Nov 29, 2021
f185865
added clarity version args
Nov 29, 2021
faea432
refixed some clarityversion's
Nov 29, 2021
60d42d8
no field blocklimit on clarityinstance
Nov 29, 2021
363a848
no method StacksChainState::open_with_block_limit
Nov 29, 2021
3deb2be
test_burnstatedb_epoch arguments
Nov 29, 2021
334f8d1
remove bad import
Nov 29, 2021
48161b9
fix SortitionDB::connect
Nov 30, 2021
b988608
SortitionDB::open
Nov 30, 2021
6e5a97f
add pox constants
Nov 30, 2021
06bcf19
aded block limit and epoch
Nov 30, 2021
4e6423f
format
Nov 30, 2021
21c4780
clarity version reference
Nov 30, 2021
128e52a
iget_burn_start_height
Nov 30, 2021
bbef1be
iget_stacks_epoch_by_epoch_id
Nov 30, 2021
794255d
BlockLimitBurnStateDB
Nov 30, 2021
6f6accb
BlockLimitBurnStateDB
Nov 30, 2021
eec2dda
helper eecute
Nov 30, 2021
68a8bae
StacksEpoch::unit_test
Nov 30, 2021
a917786
PoxConstants::new
Nov 30, 2021
4e9cd21
compiles
Nov 30, 2021
f167589
fixed double epochs creation
Nov 30, 2021
1eaaf7e
wrong assert
Nov 30, 2021
62f6911
fixed some epoch stuff
Nov 30, 2021
591d667
set some epochs to 2.0
Nov 30, 2021
4a3e272
adding to execute changes
Nov 30, 2021
a278916
don't add block limit
Nov 30, 2021
6836bb2
no sortdb
Nov 30, 2021
3b9b6b8
moved epochs
Nov 30, 2021
9be3e8c
use clarityversion in tests
Nov 30, 2021
0626bef
add epochs
Nov 30, 2021
3bd187f
add epochs and pox constants
Nov 30, 2021
439a0d8
stacks-node compiles
Nov 30, 2021
7782e12
fix epochs
Nov 30, 2021
fdbb962
fixed epoch advacing
Dec 1, 2021
431be36
fix vm::tests::costs::test_all_mainnet
Dec 1, 2021
e0e3acb
format
Dec 1, 2021
d68f565
epoch_205_test_all_mainnet passing
Dec 2, 2021
7baec93
analysis/tests/costs passing
Dec 2, 2021
45903af
fixing pox tests
Dec 2, 2021
84c885d
gettig close
Dec 3, 2021
dafc7bc
test worked but other regressions
Dec 3, 2021
5a3ce46
tests passing
Dec 3, 2021
b2b98f9
trimmed out debug info
Dec 3, 2021
6dae27f
removed debug files
Dec 3, 2021
e969246
format
Dec 3, 2021
952e6ec
ivm::tests::events::test_emit_stx_transfer_memo_ok
Dec 3, 2021
7d59a4a
differentiate test_epoch_switch_2_05 test_epoch_switch_21
Dec 3, 2021
310d319
remove dns
Dec 3, 2021
72fb320
removed a warning
Dec 3, 2021
b671fe7
simplify key value pair
Dec 5, 2021
57be533
remove extra epochs defn
Dec 5, 2021
d6be262
reinstate the serialize/deserialize
Dec 5, 2021
398434c
adjusted comments
Dec 5, 2021
c1c555f
s/NullBurnStateDB/BlockLimitBurnStateDB/
Dec 9, 2021
bbb7b39
changed stacks 2.0 test names in tests/costs to say that they are 'ep…
Dec 9, 2021
e9e4d6d
reinstate panics in pox methods for NullBurnStateDB
Dec 9, 2021
64ebc4f
0x0a is 10, not 0x10
Dec 9, 2021
8790bb6
epoch21 gets its own key is pessimistic estimator
Dec 9, 2021
32be1a0
allow jump from epoch20 to epoch21
Dec 9, 2021
a9c3ac9
test each epoch separately in tests/costs, including epoch21
Dec 9, 2021
f219054
use >= for epoch condition
Dec 9, 2021
e852f97
Merge branch 'merge/nc2' of github.com:blockstack/stacks-blockchain i…
Dec 9, 2021
9760e8a
Merge branch 'merge/nc2' of github.com:blockstack/stacks-blockchain i…
Dec 9, 2021
e122b9c
reinstate epochs.sort(), to see what will break
Dec 9, 2021
b95f28d
revert to ClaritySerializable for u32
Dec 9, 2021
b2100e4
Merge branch 'merge/nc2' of github.com:blockstack/stacks-blockchain i…
Dec 9, 2021
aafaea6
fixed inadvertent build error
Dec 9, 2021
7db3f5f
chore: fix emit event tests
kantai Dec 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 9 additions & 29 deletions .github/actions/bitcoin-int-tests/Dockerfile.bitcoin-tests
Original file line number Diff line number Diff line change
@@ -1,32 +1,12 @@
FROM rust:bullseye
FROM stacks-node:integrations

WORKDIR /src/

COPY . .

WORKDIR /src/testnet/stacks-node
RUN cargo test --no-run

RUN cd / && wget https://bitcoin.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
RUN cd / && tar -xvzf bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
ARG test_name
ENV BITCOIND_TEST 1

RUN ln -s /bitcoin-0.20.0/bin/bitcoind /bin/
RUN cargo build && \
cargo test -- --test-threads 1 --ignored "$test_name"

ENV BITCOIND_TEST 1
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::microblock_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::size_check_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::cost_voting_integration
RUN cargo test -- --test-threads 1 --ignored tests::integrations::integration_test_get_info
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::bitcoind_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::liquid_ustx_integration
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::stx_transfer_btc_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::bitcoind_forking_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::should_fix_2771
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::pox_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::bitcoin_regtest::bitcoind_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::should_succeed_handling_malformed_and_valid_txs
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::size_overflow_unconfirmed_microblocks_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::size_overflow_unconfirmed_stream_microblocks_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::size_overflow_unconfirmed_invalid_stream_microblocks_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::runtime_overflow_unconfirmed_microblocks_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::antientropy_integration_test
RUN grcov . --binary-path ../../target/debug/ -s ../.. -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info && \
curl -Os https://uploader.codecov.io/latest/linux/codecov && \
chmod +x codecov && \
./codecov --name "$test_name"
4 changes: 3 additions & 1 deletion .github/actions/bitcoin-int-tests/Dockerfile.code-cov
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ RUN cargo build && \

# Generate coverage report and upload it to codecov
RUN grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info && \
bash -c "bash <(curl -s https://codecov.io/bash)"
curl -Os https://uploader.codecov.io/latest/linux/codecov && \
chmod +x codecov && \
./codecov --name "unit_tests"
24 changes: 24 additions & 0 deletions .github/actions/bitcoin-int-tests/Dockerfile.generic.bitcoin-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM rust:bullseye

WORKDIR /src/

COPY . .

WORKDIR /src/testnet/stacks-node

RUN rustup override set nightly && \
rustup component add llvm-tools-preview && \
cargo install grcov

ENV RUSTFLAGS="-Zinstrument-coverage" \
LLVM_PROFILE_FILE="stacks-blockchain-%p-%m.profraw"

RUN cargo test --no-run && \
cargo build

RUN cd / && wget https://bitcoin.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
RUN cd / && tar -xvzf bitcoin-0.20.0-x86_64-linux-gnu.tar.gz

RUN ln -s /bitcoin-0.20.0/bin/bitcoind /bin/

ENV BITCOIND_TEST 1
17 changes: 15 additions & 2 deletions .github/actions/bitcoin-int-tests/Dockerfile.large-genesis
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@ WORKDIR /src

COPY . .

RUN cargo test --no-run --workspace

RUN cd / && wget https://bitcoin.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
RUN cd / && tar -xvzf bitcoin-0.20.0-x86_64-linux-gnu.tar.gz

RUN ln -s /bitcoin-0.20.0/bin/bitcoind /bin/

RUN rustup override set nightly && \
rustup component add llvm-tools-preview && \
cargo install grcov

ENV RUSTFLAGS="-Zinstrument-coverage" \
LLVM_PROFILE_FILE="stacks-blockchain-%p-%m.profraw"

RUN cargo test --no-run --workspace && \
cargo build --workspace

ENV BITCOIND_TEST 1
RUN cd testnet/stacks-node && cargo test --release --features prod-genesis-chainstate -- --test-threads 1 --ignored neon_integrations::bitcoind_integration_test

RUN grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info && \
curl -Os https://uploader.codecov.io/latest/linux/codecov && \
chmod +x codecov && \
./codecov --name "large_genesis"
7 changes: 5 additions & 2 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 180
daysUntilStale: 365
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
daysUntilClose: 30
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- stacks-2.1
- consensus-critical
- clarity
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
Expand Down
81 changes: 76 additions & 5 deletions .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,93 @@ on:
pull_request:

jobs:
# Run sampled genesis tests
build-integration-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build bitcoin integration testing image
env:
DOCKER_BUILDKIT: 1
# Remove .dockerignore file so codecov has access to git info
run: |
rm .dockerignore
docker build -f ./.github/actions/bitcoin-int-tests/Dockerfile.generic.bitcoin-tests -t stacks-node:integrations .
- name: Export docker image as tarball
run: docker save -o integration-image.tar stacks-node:integrations
- name: Upload built docker image
uses: actions/upload-artifact@v2
with:
name: integration-image.tar
path: integration-image.tar
# Run integration tests using sampled genesis block
sampled-genesis:
runs-on: ubuntu-latest
needs:
- build-integration-image
strategy:
fail-fast: false
matrix:
test-name:
- tests::neon_integrations::microblock_integration_test
- tests::neon_integrations::size_check_integration_test
- tests::neon_integrations::cost_voting_integration
- tests::integrations::integration_test_get_info
- tests::neon_integrations::bitcoind_integration_test
- tests::neon_integrations::liquid_ustx_integration
- tests::neon_integrations::stx_transfer_btc_integration_test
- tests::neon_integrations::bitcoind_forking_test
- tests::neon_integrations::should_fix_2771
- tests::neon_integrations::pox_integration_test
- tests::bitcoin_regtest::bitcoind_integration_test
- tests::should_succeed_handling_malformed_and_valid_txs
- tests::neon_integrations::size_overflow_unconfirmed_microblocks_integration_test
- tests::neon_integrations::size_overflow_unconfirmed_stream_microblocks_integration_test
- tests::neon_integrations::size_overflow_unconfirmed_invalid_stream_microblocks_integration_test
- tests::neon_integrations::runtime_overflow_unconfirmed_microblocks_integration_test
- tests::neon_integrations::antientropy_integration_test
- tests::neon_integrations::filter_low_fee_tx_integration_test
- tests::neon_integrations::filter_long_runtime_tx_integration_test
- tests::neon_integrations::mining_transactions_is_fair
- tests::epoch_205::test_dynamic_db_method_costs
- tests::epoch_205::transition_empty_blocks
- tests::epoch_205::test_cost_limit_switch_version205
- tests::epoch_205::test_exact_block_costs
steps:
- uses: actions/checkout@v2
- name: Download docker image
uses: actions/download-artifact@v2
with:
name: integration-image.tar
- name: Load docker image
run: docker load -i integration-image.tar && rm integration-image.tar
- name: All integration tests with sampled genesis
timeout-minutes: 30
env:
DOCKER_BUILDKIT: 1
run: docker build -f ./.github/actions/bitcoin-int-tests/Dockerfile.bitcoin-tests .
TEST_NAME: ${{ matrix.test-name }}
run: docker build --build-arg test_name=${{ matrix.test-name }} -f ./.github/actions/bitcoin-int-tests/Dockerfile.bitcoin-tests .
atlas-test:
# disable this job/test for now, as the atlas endpoints are currently disabled.
if: ${{ true }}
runs-on: ubuntu-latest
needs:
- build-integration-image
strategy:
fail-fast: false
matrix:
test-name:
- tests::neon_integrations::atlas_integration_test
- tests::neon_integrations::atlas_stress_integration_test
steps:
- uses: actions/checkout@v2
- name: All integration tests with sampled genesis
- name: Download docker image
uses: actions/download-artifact@v2
with:
name: integration-image.tar
- name: Load docker image
run: docker load -i integration-image.tar && rm integration-image.tar
- name: Atlas integration tests
timeout-minutes: 40
env:
DOCKER_BUILDKIT: 1
run: docker build -f ./.github/actions/bitcoin-int-tests/Dockerfile.atlas-test .
TEST_NAME: ${{ matrix.test-name }}
run: docker build --build-arg test_name=${{ matrix.test-name }} -f ./.github/actions/bitcoin-int-tests/Dockerfile.bitcoin-tests .
12 changes: 9 additions & 3 deletions .github/workflows/stacks-blockchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ jobs:
- name: Single full genesis integration test
env:
DOCKER_BUILDKIT: 1
run: docker build -f ./.github/actions/bitcoin-int-tests/Dockerfile.large-genesis .
# Remove .dockerignore file so codecov has access to git info
run: |
rm .dockerignore
docker build -f ./.github/actions/bitcoin-int-tests/Dockerfile.large-genesis .

# Run unit tests with code coverage
unit-tests:
Expand All @@ -49,7 +52,10 @@ jobs:
- name: Run units tests (with coverage)
env:
DOCKER_BUILDKIT: 1
run: docker build -f ./.github/actions/bitcoin-int-tests/Dockerfile.code-cov .
# Remove .dockerignore file so codecov has access to git info
run: |
rm .dockerignore
docker build -f ./.github/actions/bitcoin-int-tests/Dockerfile.code-cov .

open-api-validation:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -218,7 +224,7 @@ jobs:
tag_name: ${{ github.event.inputs.tag || github.ref }}
release_name: Release ${{ github.event.inputs.tag || github.ref }}
draft: false
prerelease: false
prerelease: true

# Upload distributables to a new release if we're building a tag or a tag was passed in
upload-dist:
Expand Down
70 changes: 70 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,76 @@ This release will contain consensus-breaking changes.

- Clarity function `stx-transfer?` now takes a 4th optional argument, which is a memo.

## [2.05.0.0.0]

This software update is a consensus changing release and the
implementation of the proposed cost changes in SIP-012. This release's
chainstate directory is compatible with chainstate directories from
2.0.11.4.0. However, this release is only compatible with chainstate
directories before the 2.05 consensus changes activate (Bitcoin height
713,000). If you run a 2.00 stacks-node beyond this point, and wish to
run a 2.05 node afterwards, you must start from a new chainstate
directory.

## Added

- At height 713,000 a new `costs-2` contract will be launched by the
Stacks boot address.

## Changed

- Stacks blocks whose parents are mined >= 713,000 will use default costs
from the new `costs-2` contract.
- Stacks blocks whose parents are mined >= 713,000 will use the real
serialized length of Clarity values as the cost inputs to several methods
that previously used the maximum possible size for the associated types.
- Stacks blocks whose parents are mined >= 713,000 will use the new block
limit defined in SIP-012.

## Fixed

- Miners are now more aggressive in calculating their block limits
when confirming microblocks (#2916)

## [2.0.11.4.0]

This software update is a point-release to change the transaction
selection logic in the default miner to prioritize by an estimated fee
rate instead of raw fee. This release's chainstate directory is
compatible with chainstate directories from 2.0.11.3.0.

## Added

- FeeEstimator and CostEstimator interfaces. These can be controlled
via node configuration options. See the `README.md` for more
information on the configuration.
- New fee rate estimation endpoint `/v2/fees/transaction` (#2872). See
`docs/rpc/openapi.yaml` for more information.

## Changed

- Prioritize transaction inclusion in blocks by estimated fee rates (#2859).
- MARF sqlite connections will now use `mmap`'ed connections with up to 256MB
space (#2869).

## [2.0.11.3.0]

This software update is a point-release to change the transaction selection
logic in the default miner to prioritize by fee instead of nonce sequence. This
release's chainstate directory is compatible with chainstate directories from
2.0.11.2.0.

## Added

- The node will enforce a soft deadline for mining a block, so that a node
operator can control how frequently their node attempts to mine a block
regardless of how congested the mempool is. The timeout parameters are
controlled in the `[miner]` section of the node's config file (#2823).

## Changed

- Prioritize transaction inclusion in the mempool by transaction fee (#2823).

## [2.0.11.2.0]

NOTE: This change resets the `testnet`. Users running a testnet node will need
Expand Down