Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Mutants next/7/source - more commits than expected #33

Open
wants to merge 328 commits into
base: mutants-next/7/base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
328 commits
Select commit Hold shift + click to select a range
ec289f3
tests: Check all fields in sortdb insertion tests
netrome Jan 23, 2023
69f73f6
fix: Use match instead of long if expression.
netrome Jan 24, 2023
789ceda
fix: Update LAST_SORTITION_DB_INDEX
netrome Jan 26, 2023
689f51d
test: Expand sortdb tests to cover same transactions in two different…
netrome Jan 26, 2023
672a5b5
refactor: Move `.../test_helpers.rs` to `.../test/mod.rs`
netrome Jan 26, 2023
ebfa55d
fix: Signature description update
netrome Jan 26, 2023
9507052
feat: Add memo for peg out request & peg out fulfillment ops
netrome Jan 26, 2023
7ba53b6
test: Test peg out ops with memo bytes
netrome Jan 26, 2023
2936350
fix: Add empty memo to integration test
netrome Jan 26, 2023
841347c
feat: Add peg_wallet_address and fulfillment_fee to PegOutRequestOp
netrome Feb 3, 2023
4b9776d
fix: Copyright notices & other nits
netrome Feb 6, 2023
74a504d
feat: PegOutFulfillOp must consume the third UTXO from the peg out re…
netrome Feb 7, 2023
28ef80b
feat: Integration test covering UTXO consumption in peg out fulfillment
netrome Feb 7, 2023
a5003a9
fix: Disambiguate conflicting test modules
netrome Feb 15, 2023
116dca8
fix: peg-out request UTXO output amount correction + docstrings for p…
netrome Feb 15, 2023
192c516
feat: Extend BurnchainOps RPC Enum to support PegOutRequestOp & PegOu…
netrome Feb 16, 2023
f9dd42b
feat: add PegOutRequest and PegOutFulfill to the GetBurnOps RPC
stjepangolemac Feb 16, 2023
3c6c104
doc: add examples to the get burn ops RPC open API definitions
stjepangolemac Feb 16, 2023
e6ead1d
test: extend the sbtc ops test to check peg out ops
stjepangolemac Feb 17, 2023
9960f27
refactor: simplify testing the peg in ops serialization
stjepangolemac Feb 21, 2023
cdf61b6
test: add serialization tests for peg out ops
stjepangolemac Feb 21, 2023
e98acce
doc: update API spec examples
stjepangolemac Feb 21, 2023
777c5b6
fix: Formatting
netrome Feb 21, 2023
bdd19ca
doc: Multiple response examples for burn_ops RPC endpoint
netrome Feb 22, 2023
8d7ce23
Merge pull request #3577 from stacks-network/3493-sbtc-peg-out-wire-f…
jcnelson Feb 23, 2023
0034645
Re-ordered imports
pavitthrap Feb 28, 2023
972f061
update CI, contributors file
pavitthrap Feb 7, 2023
5ce2b54
fix to contributing
pavitthrap Feb 28, 2023
dc1d931
Merge pull request #3556 from stacks-network/chore/reorder-imports
pavitthrap Feb 28, 2023
37b4895
feat: `stx_address()` method on `PegOutRequestOp` implemented
netrome Apr 6, 2023
3e910f0
test: Hard-coded fixture test for peg out request
netrome Apr 11, 2023
80983f7
test: Added test case for public key recovery failure
netrome Apr 12, 2023
5620634
fix: Make StacksAddress construction in `stx_address` infallible
netrome Apr 12, 2023
edb4b72
Merge pull request #3649 from stacks-network/3647-sbtc-add-sender-fie…
igorsyl Apr 13, 2023
e17f094
Merge branch 'chore/merge-master-to-develop' into next
obycode Sep 6, 2023
d714825
Merge pull request #3897 from stacks-network/chore/merge-develop-into…
obycode Sep 10, 2023
54e826c
Merge remote-tracking branch 'origin/develop' into next
kantai Sep 21, 2023
48a752b
initial NakamotoStacksBlock + append_block
kantai Sep 14, 2023
3b39566
feat: working simple unit test for nakamoto::append_block
kantai Sep 18, 2023
1c6357a
feat: working simple unit test for nakamoto::append_block
kantai Sep 18, 2023
052ff11
address PR feedback, implement nakamoto reward schedule
kantai Sep 20, 2023
6e87770
chore: cleanup rebase to develop
kantai Sep 21, 2023
46af549
chore: cleanup rebase to next
kantai Sep 21, 2023
df2a5ae
test: real append_block test, assert miner reward maturation
kantai Sep 26, 2023
9c491ed
feat: Add `TenureChange` transaction type
jbencin Sep 21, 2023
036153d
fix: Do not allow `TenureChange` transactions in mempool
jbencin Sep 26, 2023
e325a89
`tenure_change()` returns true if there is a `TenureChange` transaction
jbencin Sep 28, 2023
2481a49
Working on `tenure_changed()`...
jbencin Sep 28, 2023
aa19e89
address PR review comments
kantai Sep 29, 2023
c53dd0f
Merge branch 'feat/nakamoto-blocks' into feat/nakoordinator
kantai Oct 2, 2023
b966e95
feat: initial work on nakamoto_staging_blocks, miner pubkey hash trac…
kantai Oct 5, 2023
3c2093a
add initial test case for nakamoto_staging_blocks
kantai Oct 6, 2023
ccc9c58
fix sortdb migration test
kantai Oct 6, 2023
038def9
Merge branch 'develop' into next
jcnelson Oct 6, 2023
b5b56e8
chore: install libllvm16 and libclang1-16 so we can build p256k1
jcnelson Oct 8, 2023
3e0ba61
Merge pull request #3994 from stacks-network/chore/merge-develop-to-n…
jcnelson Oct 9, 2023
5f310ec
Merge branch 'next' into feat/nakamoto-blocks
jcnelson Oct 9, 2023
45dd615
Merge branch 'feat/nakamoto-blocks' into feat/nakoordinator
jcnelson Oct 9, 2023
5f6e6a4
address PR reviews
kantai Oct 10, 2023
fa8ec88
Merge changes from feat/nakamoto-blocks
kantai Oct 11, 2023
4e953df
feat: initial implementation of mockamoto stack-node mode
kantai Oct 17, 2023
7045a4d
chore: pull thru is_prepare_phase_start
jcnelson Oct 24, 2023
8b4fc43
feat: add is_prepare_phase_start to PoxConstants
jcnelson Oct 24, 2023
6479175
feat: track last processed reward cycle in sortition DB MARF
jcnelson Oct 24, 2023
35c0fd3
refactor: add support for both epoch2 and epoch3 processing to Chains…
jcnelson Oct 24, 2023
e7a17c3
chore: use StacksBlockEventData instead of StacksBlock for event handler
jcnelson Oct 24, 2023
9e02660
feat: only track consensus_hash and parent_block_id in Nakamoto block…
jcnelson Oct 24, 2023
5c55d04
chore: update Nakamoto block tests to reflect new structs
jcnelson Oct 24, 2023
0eed15a
feat: is_first_index_block_hash
jcnelson Oct 24, 2023
18de400
feat: remove get_stacks_chain_tip() in favor of new Nakamoto-aware ge…
jcnelson Oct 24, 2023
defd316
chore: document StacksHeaderInfo fields, and add accessor for nakamot…
jcnelson Oct 24, 2023
489f385
feat: capture event observer data in StacksBlockEventData, which is c…
jcnelson Oct 24, 2023
28eedab
chore: remove compiler warning
jcnelson Oct 24, 2023
0337f1e
chore: remove nakamoto acceptance period
jcnelson Oct 24, 2023
1895e45
chore: remove `analyze-fees` directive (since it's only compatible wi…
jcnelson Oct 24, 2023
30331a7
chore: use get_canonical_block_header
jcnelson Oct 24, 2023
e47ab75
chore: use get_canonical_block_header() and document test methods
jcnelson Oct 24, 2023
7e75e42
chore: use get_canonical_block_header
jcnelson Oct 24, 2023
144de2d
chore: use get_canonical_block_header
jcnelson Oct 24, 2023
a7ab086
feat: use get_canonical_block_header
jcnelson Oct 24, 2023
7705961
chore: use StacksBlockEventData
jcnelson Oct 24, 2023
d4b68a3
chore: use get_canonical_block_header
jcnelson Oct 24, 2023
11b2bb6
chore: use StacksBlockEventData
jcnelson Oct 24, 2023
85f925d
feat: WIP initial coordinator implementation for Nakamoto
jcnelson Oct 24, 2023
a32169d
Merge pull request #3933 from stacks-network/feat/nakamoto-blocks
kantai Oct 25, 2023
e985b17
address PR review
kantai Oct 30, 2023
d267ca6
Merge pull request #3992 from stacks-network/feat/nakoordinator
kantai Oct 31, 2023
a675e1f
Merge remote-tracking branch 'origin/next' into feat/mock-node
kantai Oct 31, 2023
060a29f
add comments to the mockamoto node
kantai Oct 31, 2023
487126a
fix merge error
kantai Oct 31, 2023
d044e1b
Merge pull request #4001 from stacks-network/feat/mock-node
kantai Nov 1, 2023
b59e27b
chore: run stacker dkg test as part of integration test battery
jcnelson Nov 2, 2023
e4d8bed
chore: add Epoch25
jcnelson Nov 2, 2023
97ed00d
chore: Epoch25
jcnelson Nov 2, 2023
c55e217
feat: add pox-3 unlock and pox-4 activation
jcnelson Nov 2, 2023
db59dcd
feat: add pox-4 unlock
jcnelson Nov 2, 2023
f10b817
chore: add v3 unlock and pox-4 activation
jcnelson Nov 2, 2023
d04fa76
chore: add Epoch25, pox-3 unlock, and pox-4 activation
jcnelson Nov 2, 2023
e98fe51
chore: add v3 unlock and pox-4 activation
jcnelson Nov 2, 2023
b25e422
chore: add Epoch25
jcnelson Nov 2, 2023
2995451
chore: Epoch25
jcnelson Nov 2, 2023
467e893
chore: add pox-3 unlock and pox-4 activation height to pox constants
jcnelson Nov 2, 2023
e2e9413
chore: mock pox-3 unlock and pox-4 activation
jcnelson Nov 2, 2023
d8074ed
feat: add nakamoto miner hash160 to leader block commits and refactor…
jcnelson Nov 2, 2023
afc54fe
feat: store the serialized PoX reward set information as JSON, paired…
jcnelson Nov 2, 2023
b7000b0
feat: add epoch 2.5 marker and add converstion for block header hash …
jcnelson Nov 2, 2023
d7057b7
feat: add setter for nakamoto miner key hash160, and document where i…
jcnelson Nov 2, 2023
2fe7e8b
feat: store reward set info by first prepare-phase sortition so that …
jcnelson Nov 2, 2023
1a95fd1
chore: fill in mocked pox-3 unlock and pox-4 activation
jcnelson Nov 2, 2023
abb66ba
feat: store preprocessed reward set info from start of prepare phase,…
jcnelson Nov 2, 2023
66249f4
feat: MVP TestPeer test to create a single non-empty Nakamoto tenure,…
jcnelson Nov 2, 2023
e2313b3
feat: nakamoto block header constructors; verify the miner signature …
jcnelson Nov 2, 2023
eb028aa
feat: add Nakamoto features to TestBurnchainBlock, TestStacksNode, an…
jcnelson Nov 2, 2023
9512c7a
chore: create nakamoto/tests/ directory
jcnelson Nov 2, 2023
9b31de9
feat: static checks on Nakamoto coinbase and tenure change transactio…
jcnelson Nov 2, 2023
881b0a0
chore: add v3 unlock and pox-4 activation
jcnelson Nov 2, 2023
cad3de1
feat: stubbed pox-4 reward set handlers and testing stack-stx impleme…
jcnelson Nov 2, 2023
f9c8d09
chore: extend invariant tests for epoch 2.5, and add v3 unlock
jcnelson Nov 2, 2023
8baf2d3
chore: mock v3 unlock and pox-4 activation
jcnelson Nov 2, 2023
676dca2
feat: add pox-4 activation for epoch 2.5
jcnelson Nov 2, 2023
d30cb60
chore: epoch2.5
jcnelson Nov 2, 2023
f6ba0c1
chore: use v3 unlock and pox-4 activation
jcnelson Nov 2, 2023
28ad529
feat: add BlockBuilder trait for mining transactions so Nakamoto can …
jcnelson Nov 2, 2023
cb31648
feat: Nakamoto Coinbase contains the VRF proof, so add variants for i…
jcnelson Nov 2, 2023
f85d80b
chore: new coinbase variant
jcnelson Nov 2, 2023
89b4e5e
chore: v3 unlock height
jcnelson Nov 2, 2023
3355347
chore: add nakamoto state to TestStacksNode
jcnelson Nov 2, 2023
ed1b62b
feat: add new codec for Nakamoto coinbase
jcnelson Nov 2, 2023
664e09e
feat: add epoch 2.5 / pox-4 activation
jcnelson Nov 2, 2023
24e19f5
chore: add v3 unlock and pox-4 activation height
jcnelson Nov 2, 2023
49b44e7
feat: mined_naakmoto_block_event trait
jcnelson Nov 2, 2023
32e69a3
feat: epoch 2.5 definitions
jcnelson Nov 2, 2023
2fb821a
chore: new Coinbase variant
jcnelson Nov 2, 2023
e56f3e2
chore: new coinbase variant
jcnelson Nov 2, 2023
096b6dc
chore: mock pox-3 unlock and pox-4 activation
jcnelson Nov 2, 2023
4f7c8d3
chore: update TestPeer to use the right burn block handler (temporary)
jcnelson Nov 2, 2023
7f60bfa
feat: add handler for processing new nakamoto blocks
jcnelson Nov 2, 2023
61becfc
chore: report pox-4 in /v2/info
jcnelson Nov 2, 2023
e964784
feat: initial implementation of the Nakamoto miner
jcnelson Nov 2, 2023
3de4117
feat: pox-4 stub (just a copy of pox-3 for now)
jcnelson Nov 2, 2023
d4640a8
feat: plumb through nakamoto block-mined event handler
jcnelson Nov 2, 2023
8341cf4
chore: new coinbase variant
jcnelson Nov 2, 2023
5f3431f
chore: new coinbase variant
jcnelson Nov 2, 2023
4fcd30a
chore: mock v3 unlock and pox-4 activation
jcnelson Nov 2, 2023
ee535b5
chore: new coinbase variant
jcnelson Nov 2, 2023
fd2d51d
feat: event observer for mined nakamoto blocks
jcnelson Nov 2, 2023
11da1b6
Merge branch 'next' into feat/nakamoto-coordinator
jcnelson Nov 2, 2023
1a773bd
chore: cargo fmt
jcnelson Nov 7, 2023
9c9032c
chore: cargo fmt
jcnelson Nov 7, 2023
1821425
chore: cargo fmt
jcnelson Nov 7, 2023
64c9451
refactor: when generating a block-commit, take an optionally-given VR…
jcnelson Nov 7, 2023
53688a4
fix: track the canonical Stacks chain tips in a dedicated DB table, w…
jcnelson Nov 7, 2023
4de3440
fix: off-by-one error in loading the preprocessed reward cycle info (…
jcnelson Nov 7, 2023
1acaa22
chore: cargo fmt
jcnelson Nov 7, 2023
32f7377
feat: the Nakamoto anchor block is the *tenure-start* block of the *l…
jcnelson Nov 7, 2023
3c4a201
chore: add/fix tenure tests -- in particular, test that we can produc…
jcnelson Nov 7, 2023
9cc8415
chore: cargo fmt
jcnelson Nov 7, 2023
80f7217
feat: verify the VRF of a Nakamoto tenure and verify Nakamoto block-c…
jcnelson Nov 7, 2023
c165f80
refactor: move `get_account()` helper and API sync
jcnelson Nov 7, 2023
5030e9b
fix: update the way we generate Nakamoto tenure information. In parti…
jcnelson Nov 7, 2023
5c389eb
feat: get Stacks 2.x header by its sortition's consensus hash (which …
jcnelson Nov 7, 2023
79f9c06
fix: use NakamotoChainState::get_canonical_block_header() for perform…
jcnelson Nov 7, 2023
5c3e24d
chore: use NakamotoChainState::get_canonical_block_header() wherever …
jcnelson Nov 7, 2023
8e53e69
fix: process affirmation maps in epoch 3
jcnelson Nov 7, 2023
cacf191
fix: off-by-one error when checking for Nakamoto block acceptance (al…
jcnelson Nov 7, 2023
3acb3db
chore: API sync
jcnelson Nov 7, 2023
96a9ca6
refactor: accept @kantai's change
jcnelson Nov 7, 2023
e6df731
fix: `processed_block` should check that the `consensus_hash` is in t…
jcnelson Nov 7, 2023
97bfaa4
Address a couple comments from Jude
jbencin Oct 17, 2023
694b760
Add threshold signature to `TenureChange` message using types from `w…
jbencin Oct 17, 2023
f287648
Add tests for `TenureChangePayload` ser/deser
jbencin Nov 6, 2023
f98f013
Factor `signature` out of `TenureChangePayload`
jbencin Nov 7, 2023
34b07e8
Ignore `nakamoto_advance_tip_*` tests
jbencin Nov 10, 2023
e3208ac
chore: add first_mined() helper
jcnelson Nov 11, 2023
4da825a
chore: remove dead code (which was buggy)
jcnelson Nov 11, 2023
3a23919
feat: add prepare_phase_start() helper
jcnelson Nov 11, 2023
8062ac4
fix: only acknowledge the stackers' aggregate public key in a query i…
jcnelson Nov 11, 2023
c091471
chore: clean up unneeded indentations
jcnelson Nov 11, 2023
a9d0e24
fix: take block event struct by reference
jcnelson Nov 11, 2023
a51845b
fix: address PR feedback and fix a couple bugs -- (1) process the nex…
jcnelson Nov 11, 2023
cb5fa06
feat: test each tenure runs' chain tips, and test that we can replay …
jcnelson Nov 11, 2023
a7c13ad
chore: address PR feedback
jcnelson Nov 11, 2023
6a2b166
chore: add unit tests to most of the NakamotoChainState helpers and a…
jcnelson Nov 11, 2023
3b9009f
chore: always test that the chain tip advances if we accept and proce…
jcnelson Nov 11, 2023
c2696d4
chore: remove dead code
jcnelson Nov 11, 2023
d1a4705
chore: pass block event data by reference
jcnelson Nov 11, 2023
d799ce5
chore: add codec tests for nakamoto transactions
jcnelson Nov 11, 2023
58495fc
fix: deterministic microblock keypairs (so we can replay state from o…
jcnelson Nov 11, 2023
91d2ffb
fix: pass event data by reference
jcnelson Nov 11, 2023
a539d2f
Merge branch 'feat/nakamoto-coordinator' of https://github.com/stacks…
jcnelson Nov 11, 2023
bef3db0
chore: cargo fmt
jcnelson Nov 11, 2023
94ff8cd
fix: fix regression in static block validation check -- versioned sma…
jcnelson Nov 12, 2023
6bd1ca2
fix: special-case handling for choosing the parent block pointer in t…
jcnelson Nov 12, 2023
6d6e00b
fix: update comments in pox-4 to reflect that it is pox-4, not pox-3
jcnelson Nov 12, 2023
c436098
fix: cover epoch 2.4 and epoch 3.0
jcnelson Nov 12, 2023
a6e9b4c
fix: fix another test that explicitly panics on epochs 2.5 and 3.0
jcnelson Nov 13, 2023
7cf69c7
chore: address PR feedback; use explicit integer conversions (but thi…
jcnelson Nov 16, 2023
ae0f434
Merge pull request #4009 from stacks-network/feat/nakamoto-coordinator
jcnelson Nov 16, 2023
cef8f87
chore: cargo fmt --all -- --config group_imports=StdExternalCrate,imp…
jcnelson Nov 16, 2023
d47a9c4
Merge branch 'develop' into chore/merge-develop-to-next-20241113
jcnelson Nov 17, 2023
b918415
Merge branch 'develop' into chore/merge-develop-to-next-20241113
jcnelson Nov 17, 2023
2f84fae
chore: bump docker image to debian trixie
jcnelson Nov 17, 2023
f2c1a6d
fix: use rust:bullseye, since rust:trixie doesn't exist
jcnelson Nov 17, 2023
9f203c9
chore: log addrinuse
jcnelson Nov 17, 2023
f6902ba
fix: don't bind on designated ports; use port 0 and let the kernel as…
jcnelson Nov 17, 2023
543466f
chore: cargo fmt
jcnelson Nov 17, 2023
c15f8b7
Merge 'stacks/next' into feat/add-tenure-change
jbencin Nov 19, 2023
243e9c1
Merge pull request #4074 from stacks-network/chore/merge-develop-to-n…
jcnelson Nov 20, 2023
252b77f
Merge branch 'stacks/next' into feat/add-tenure-change
jbencin Nov 20, 2023
2980e17
Merge pull request #3974 from jbencin/feat/add-tenure-change
jbencin Nov 21, 2023
6ec90ef
BUG: fix find_prepare_phase_sortitions to not include one BEFORE prep…
jferrant Nov 22, 2023
eee3f20
BUG: fix reward cycle off by one error in get_reward_set_nakamoto
jferrant Nov 28, 2023
1bb5331
CI Fix: Replace Reclaim disk space with cleanup action
jferrant Nov 28, 2023
636cdea
Merge pull request #4095 from stacks-network/bugfix/nakamoto-coordina…
jcnelson Nov 28, 2023
0b88a92
Update `wsts` to `v5.0.0`
jbencin Nov 17, 2023
3169ae1
Clean up `use` statements
jbencin Nov 29, 2023
4cad8ba
Update wsts and p256k1 libs to latest
jferrant Nov 8, 2023
2e45ed8
Add wsts::common::Signature to and from SchnorrSignature conversion
jferrant Nov 8, 2023
1a45811
Add a test for schnorr signature serde
jferrant Nov 8, 2023
6ea4ddb
Add a stacker signature hash function that includes the miner signature
jferrant Nov 8, 2023
3ae5e37
Change stacker_signature type to a SchnorrSignature
jferrant Nov 14, 2023
b8c0335
Update expects_stacker_signature to accept the block signature hash a…
jferrant Nov 14, 2023
5ffb234
Add get_aggregate_public_key_pox_4 function implementaton
jferrant Nov 14, 2023
127d4a9
Retrieve aggregate public key in get_reward_set_nakamoto
jferrant Nov 14, 2023
dc811de
Add aggregate public key to reward set struct
jferrant Nov 14, 2023
3c93abd
Get the aggregate public key from the sortition db preprocessed rewar…
jferrant Nov 14, 2023
f30a39b
Add get-aggregate-public-key to pox-4.clar and fix typo in contract call
jferrant Nov 14, 2023
402826c
Replace stacker_signature with signer_signature
jferrant Nov 14, 2023
505e4b8
CRC: make sure to reattempt getting the reward cycle info if no DKG set
jferrant Nov 14, 2023
379cf1d
Search for the first sortition of the prepare phase of the parent rew…
jferrant Nov 20, 2023
8ff7222
Pox-4 activates with old block formats so update aggregate key even i…
jferrant Nov 20, 2023
f06ce03
Add set-aggregate-public-key and fix point deserialization from pox-4
jferrant Nov 20, 2023
521d20f
Boot nakamoto by simulating signer DKG rounds to set dkg in contract
jferrant Nov 20, 2023
217ca4d
Cleanup is_some check for bhh
jferrant Nov 20, 2023
c1465e1
Fix TestPeer to use the correct TestSigners
jferrant Nov 20, 2023
fef85a8
Only set the aggregate public key if in Pox 4
jferrant Nov 20, 2023
692d07c
Cleanup get_reard_cycle_aggregate_public_key and set aggregate key fo…
jferrant Nov 22, 2023
ab0debb
BUG: fix find_prepare_phase_sortitions to not include one BEFORE prep…
jferrant Nov 22, 2023
1cab88e
Always retrieve the aggregate public key from pox-4
jferrant Nov 28, 2023
3801d25
Update replay_reward_cycle to keep retrying failed blocks
jferrant Nov 28, 2023
de8129c
CRC: add clarifying comments and names
jferrant Nov 29, 2023
b2f0b39
CRC: add clarifying names and todo with issue 4109
jferrant Nov 30, 2023
0780d44
stashing demo changes
kantai Nov 14, 2023
30157d2
mockamoto mining working with merge
kantai Nov 17, 2023
352e73e
working integration with chains coordinator
kantai Nov 27, 2023
e3f3928
add test for mockamoto, cleanup implementation
kantai Nov 28, 2023
b447984
add transfer tx to mockamoto test, address PR feedback
kantai Nov 29, 2023
be3c28b
add stacker-self-signer to mockamoto, add boot receipts, add pox_v3_u…
kantai Nov 30, 2023
53c168d
Merge pull request #4098 from stacks-network/feat/mockamoto-mining-redux
kantai Dec 1, 2023
7ddea67
feat: ready source branch
ASuciuX Dec 20, 2023
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
4 changes: 3 additions & 1 deletion .github/actions/bitcoin-int-tests/Dockerfile.atlas-test
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM rust:bullseye
FROM rust:bookworm

WORKDIR /src

COPY . .

RUN apt-get -y install libllvm16 libclang1-16

RUN cargo test --no-run --workspace

RUN cd / && wget https://bitcoin.org/bin/bitcoin-core-25.0/bitcoin-25.0-x86_64-linux-gnu.tar.gz
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:bullseye
FROM rust:bookworm

WORKDIR /src/

Expand All @@ -12,6 +12,8 @@ RUN rustup component add llvm-tools-preview && \
ENV RUSTFLAGS="-Cinstrument-coverage" \
LLVM_PROFILE_FILE="stacks-blockchain-%p-%m.profraw"

RUN apt-get -y install libllvm16 libclang1-16

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

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/bitcoin-int-tests/Dockerfile.large-genesis
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:bullseye AS test
FROM rust:bookworm AS test

WORKDIR /src

Expand Down
4 changes: 2 additions & 2 deletions .github/actions/bitcoin-int-tests/Dockerfile.net-tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:bullseye
FROM rust:bookworm

WORKDIR /src

Expand All @@ -11,7 +11,7 @@ RUN ln -s /bitcoin-25.0/bin/bitcoind /bin/
RUN ln -s /bitcoin-25.0/bin/bitcoin-cli /bin/

RUN apt-get update
RUN apt-get install -y jq screen net-tools ncat sqlite3 xxd openssl curl
RUN apt-get install -y jq screen net-tools ncat sqlite3 xxd openssl curl libllvm16 libclang1-16

RUN cargo build --workspace

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/bitcoin-int-tests/Dockerfile.rustfmt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:bullseye
FROM rust:bookworm

WORKDIR /src

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/dockerfiles/Dockerfile.debian-binary
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ RUN case ${TARGETARCH} in \
&& wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip \
&& unzip ${BIN_ARCH}.zip -d /out

FROM --platform=${TARGETPLATFORM} debian:bullseye
FROM --platform=${TARGETPLATFORM} debian:bookworm
COPY --from=builder /out/stacks-node /bin/
CMD ["stacks-node", "mainnet"]
2 changes: 1 addition & 1 deletion .github/actions/dockerfiles/Dockerfile.debian-source
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ RUN target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
&& mkdir -p /out \
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out

FROM --platform=${TARGETPLATFORM} debian:bullseye
FROM --platform=${TARGETPLATFORM} debian:bookworm
COPY --from=build /out/stacks-node /bin/
CMD ["stacks-node", "mainnet"]
2 changes: 1 addition & 1 deletion .github/actions/docsgen/Dockerfile.docsgen
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:bullseye as build
FROM rust:bookworm as build

WORKDIR /src

Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,10 @@ jobs:
id: git_checkout
uses: actions/checkout@v3

- name: Reclaim disk space
id: cleanup
run: |
sudo apt-get update
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^mongodb-.*'
sudo apt-get remove -y '^mysql-.*'
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
sudo apt-get autoremove -y
sudo apt-get clean
docker system prune --force
## cleanup runner
- name: Cleanup Runner
id: runner_cleanup
uses: stacks-network/actions/cleanup/disk@main

- name: Build bitcoin integration testing image
id: build_docker_image
Expand Down Expand Up @@ -111,6 +102,7 @@ jobs:
- tests::neon_integrations::test_problematic_microblocks_are_not_mined
- tests::neon_integrations::test_problematic_microblocks_are_not_relayed_or_stored
- tests::neon_integrations::push_boot_receipts
- tests::neon_integrations::test_submit_and_observe_sbtc_ops
- tests::epoch_205::test_dynamic_db_method_costs
- tests::epoch_205::transition_empty_blocks
- tests::epoch_205::test_cost_limit_switch_version205
Expand Down Expand Up @@ -142,6 +134,7 @@ jobs:
- tests::signer::test_stackerdb_dkg
- tests::stackerdb::test_stackerdb_load_store
- tests::stackerdb::test_stackerdb_event_observer
- tests::signer::test_stackerdb_dkg
steps:
- name: Checkout the latest code
id: git_checkout
Expand Down
5 changes: 2 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
"request": "launch",
"name": "executable 'blockstack-core'",
"cargo": {
"args": ["build", "--bin=stacks-inspect", "--package=blockstack-core"],
"args": ["build", "--bin=stacks-node"],
"filter": {
"name": "stacks-inspect",
"kind": "bin"
}
},
"args": [],
"args": ["mockamoto"],
"cwd": "${workspaceFolder}"
},
{
Expand Down
23 changes: 15 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ members = [
"clarity",
"stx-genesis",
"libstackerdb",
"contrib/tools/relay-server",
"libsigner",
"stacks-signer",
"testnet/stacks-node"]

# Dependencies we want to keep the same between workspace members
[workspace.dependencies]
wsts = "5.0"

# Use a bit more than default optimization for
# dev builds to speed up test execution
[profile.dev]
Expand Down
2 changes: 1 addition & 1 deletion clarity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resolver = "2"

[lib]
name = "clarity"
path = "./src/libclarity.rs"
path = "./src/lib.rs"

[dependencies]
rand = "0.7.3"
Expand Down
24 changes: 6 additions & 18 deletions clarity/src/libclarity.rs → clarity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,14 @@
#![allow(non_upper_case_globals)]
#![cfg_attr(test, allow(unused_variables, unused_assignments))]

extern crate rand;
extern crate rand_chacha;
extern crate rusqlite;
extern crate serde;
#[macro_use]
extern crate lazy_static;
extern crate integer_sqrt;
extern crate regex;
extern crate time;

#[macro_use(o, slog_log, slog_trace, slog_debug, slog_info, slog_warn, slog_error)]
extern crate slog;

#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate serde_json;

#[cfg(test)]
#[macro_use]
extern crate assert_json_diff;
extern crate serde_json;

#[cfg(any(test, feature = "testing"))]
#[macro_use]
Expand All @@ -51,12 +38,13 @@ extern crate rstest;
#[macro_use]
pub extern crate rstest_reuse;

#[cfg(feature = "monitoring_prom")]
#[macro_use]
pub extern crate prometheus;
extern crate stacks_common;

#[macro_use]
pub extern crate stacks_common;
pub use stacks_common::{
codec, consts, impl_array_hexstring_fmt, impl_array_newtype, impl_byte_array_message_codec,
impl_byte_array_serde, types, util,
};

#[macro_use]
/// The Clarity virtual machine
Expand Down
4 changes: 3 additions & 1 deletion clarity/src/vm/analysis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ pub fn run_analysis(
StacksEpochId::Epoch21
| StacksEpochId::Epoch22
| StacksEpochId::Epoch23
| StacksEpochId::Epoch24 => {
| StacksEpochId::Epoch24
| StacksEpochId::Epoch25
| StacksEpochId::Epoch30 => {
TypeChecker2_1::run_pass(&epoch, &mut contract_analysis, db)
}
StacksEpochId::Epoch10 => unreachable!("Epoch 1.0 is not a valid epoch for analysis"),
Expand Down
8 changes: 6 additions & 2 deletions clarity/src/vm/analysis/type_checker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ impl FunctionType {
StacksEpochId::Epoch21
| StacksEpochId::Epoch22
| StacksEpochId::Epoch23
| StacksEpochId::Epoch24 => self.check_args_2_1(accounting, args, clarity_version),
| StacksEpochId::Epoch24
| StacksEpochId::Epoch25
| StacksEpochId::Epoch30 => self.check_args_2_1(accounting, args, clarity_version),
StacksEpochId::Epoch10 => unreachable!("Epoch10 is not supported"),
}
}
Expand All @@ -69,7 +71,9 @@ impl FunctionType {
StacksEpochId::Epoch21
| StacksEpochId::Epoch22
| StacksEpochId::Epoch23
| StacksEpochId::Epoch24 => {
| StacksEpochId::Epoch24
| StacksEpochId::Epoch25
| StacksEpochId::Epoch30 => {
self.check_args_by_allowing_trait_cast_2_1(db, clarity_version, func_args)
}
StacksEpochId::Epoch10 => unreachable!("Epoch10 is not supported"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use assert_json_diff::assert_json_eq;
use stacks_common::types::StacksEpochId;
use {assert_json_diff, serde_json};

Expand Down
3 changes: 2 additions & 1 deletion clarity/src/vm/analysis/type_checker/v2_1/tests/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
use std::convert::TryFrom;
use std::fs::read_to_string;

use assert_json_diff::assert_json_eq;
use serde_json;
use stacks_common::types::StacksEpochId;
use {assert_json_diff, serde_json};

use crate::vm::analysis::contract_interface_builder::build_contract_interface;
use crate::vm::analysis::errors::CheckErrors;
Expand Down
1 change: 1 addition & 0 deletions clarity/src/vm/ast/parser/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use std::cmp;
use std::convert::TryInto;

use lazy_static::lazy_static;
use regex::{Captures, Regex};
use stacks_common::address::c32::c32_address_decode;
use stacks_common::util::hash::hex_bytes;
Expand Down
1 change: 1 addition & 0 deletions clarity/src/vm/contexts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use std::fmt;
use std::mem::replace;

use serde::Serialize;
use serde_json::json;
use stacks_common::consts::CHAIN_ID_TESTNET;
use stacks_common::types::chainstate::StacksBlockId;
use stacks_common::types::StacksEpochId;
Expand Down
5 changes: 4 additions & 1 deletion clarity/src/vm/costs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use std::collections::{BTreeMap, HashMap};
use std::convert::{TryFrom, TryInto};
use std::{cmp, fmt};

use lazy_static::lazy_static;
use rusqlite::types::{FromSql, FromSqlResult, ToSql, ToSqlOutput, ValueRef};
use serde::{Deserialize, Serialize};
use stacks_common::types::StacksEpochId;
Expand Down Expand Up @@ -723,7 +724,9 @@ impl LimitedCostTracker {
StacksEpochId::Epoch21
| StacksEpochId::Epoch22
| StacksEpochId::Epoch23
| StacksEpochId::Epoch24 => COSTS_3_NAME.to_string(),
| StacksEpochId::Epoch24
| StacksEpochId::Epoch25
| StacksEpochId::Epoch30 => COSTS_3_NAME.to_string(),
}
}
}
Expand Down
Loading
Loading