Skip to content

Commit 3d0861f

Browse files
authored
Merge branch 'develop' into chore/3.1.0.0.2_changelog
2 parents 97910c5 + 5f64d2d commit 3d0861f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1969
-1468
lines changed

.github/workflows/bitcoin-tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,18 @@ jobs:
122122
- tests::signer::v0::signer_set_rollover
123123
- tests::signer::v0::signing_in_0th_tenure_of_reward_cycle
124124
- tests::signer::v0::continue_after_tenure_extend
125-
- tests::signer::v0::tenure_extend_after_idle
125+
- tests::signer::v0::tenure_extend_after_idle_signers
126+
- tests::signer::v0::tenure_extend_after_idle_miner
127+
- tests::signer::v0::tenure_extend_succeeds_after_rejected_attempt
126128
- tests::signer::v0::stx_transfers_dont_effect_idle_timeout
127129
- tests::signer::v0::idle_tenure_extend_active_mining
128130
- tests::signer::v0::multiple_miners_with_custom_chain_id
129131
- tests::signer::v0::block_commit_delay
130132
- tests::signer::v0::continue_after_fast_block_no_sortition
131133
- tests::signer::v0::block_validation_response_timeout
132134
- tests::signer::v0::tenure_extend_after_bad_commit
135+
- tests::signer::v0::block_proposal_max_age_rejections
136+
- tests::signer::v0::global_acceptance_depends_on_block_announcement
133137
- tests::nakamoto_integrations::burn_ops_integration_test
134138
- tests::nakamoto_integrations::check_block_heights
135139
- tests::nakamoto_integrations::clarity_burn_state
@@ -140,6 +144,7 @@ jobs:
140144
- tests::nakamoto_integrations::mock_mining
141145
- tests::nakamoto_integrations::multiple_miners
142146
- tests::nakamoto_integrations::follower_bootup_across_multiple_cycles
147+
- tests::nakamoto_integrations::nakamoto_lockup_events
143148
- tests::nakamoto_integrations::utxo_check_on_startup_panic
144149
- tests::nakamoto_integrations::utxo_check_on_startup_recover
145150
- tests::nakamoto_integrations::v3_signer_api_endpoint

.github/workflows/clippy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Perform Clippy checks - currently set to defaults
2+
## https://github.com/rust-lang/rust-clippy#usage
3+
## https://rust-lang.github.io/rust-clippy/master/index.html
4+
##
5+
name: Clippy Checks
6+
7+
# Only run when:
8+
# - PRs are (re)opened against develop branch
9+
on:
10+
pull_request:
11+
branches:
12+
- develop
13+
types:
14+
- opened
15+
- reopened
16+
- synchronize
17+
18+
jobs:
19+
clippy_check:
20+
name: Clippy Check
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout the latest code
24+
id: git_checkout
25+
uses: actions/checkout@v3
26+
- name: Define Rust Toolchain
27+
id: define_rust_toolchain
28+
run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV
29+
- name: Setup Rust Toolchain
30+
id: setup_rust_toolchain
31+
uses: actions-rust-lang/setup-rust-toolchain@v1
32+
with:
33+
toolchain: ${{ env.RUST_TOOLCHAIN }}
34+
components: clippy
35+
- name: Clippy
36+
id: clippy
37+
uses: actions-rs/clippy-check@v1
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
args: -p libstackerdb -p stacks-signer -p pox-locking --no-deps --tests --all-features -- -D warnings

.github/workflows/p2p-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ jobs:
4343
- net::tests::convergence::test_walk_star_15_org_biased
4444
- net::tests::convergence::test_walk_inbound_line_15
4545
- net::api::tests::postblock_proposal::test_try_make_response
46-
- net::server::tests::test_http_10_threads_getinfo
47-
- net::server::tests::test_http_10_threads_getblock
48-
- net::server::tests::test_http_too_many_clients
49-
- net::server::tests::test_http_slow_client
46+
- net::server::test::test_http_10_threads_getinfo
47+
- net::server::test::test_http_10_threads_getblock
48+
- net::server::test::test_http_too_many_clients
49+
- net::server::test::test_http_slow_client
5050
steps:
5151
## Setup test environment
5252
- name: Setup Test Environment

.github/workflows/stacks-core-tests.yml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,55 +18,6 @@ concurrency:
1818
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1919

2020
jobs:
21-
# Full genesis test with code coverage
22-
full-genesis:
23-
name: Full Genesis Test
24-
runs-on: ubuntu-latest
25-
strategy:
26-
## Continue with the test matrix even if we've had a failure
27-
fail-fast: false
28-
## Run a maximum of 2 concurrent tests from the test matrix
29-
max-parallel: 2
30-
matrix:
31-
test-name:
32-
- neon_integrations::bitcoind_integration_test
33-
steps:
34-
## Setup test environment
35-
- name: Setup Test Environment
36-
id: setup_tests
37-
uses: stacks-network/actions/stacks-core/testenv@main
38-
with:
39-
genesis: true
40-
btc-version: "25.0"
41-
42-
## Run test matrix using restored cache of archive file
43-
## - Test will timeout after env.TEST_TIMEOUT minutes
44-
- name: Run Tests
45-
id: run_tests
46-
timeout-minutes: ${{ fromJSON(env.TEST_TIMEOUT) }}
47-
uses: stacks-network/actions/stacks-core/run-tests@main
48-
with:
49-
test-name: ${{ matrix.test-name }}
50-
threads: 1
51-
archive-file: ~/genesis_archive.tar.zst
52-
53-
## Upload code coverage file
54-
- name: Code Coverage
55-
id: codecov
56-
uses: stacks-network/actions/codecov@main
57-
with:
58-
test-name: large_genesis
59-
filename: ./lcov.info
60-
61-
- name: Status Output
62-
run: |
63-
echo "run_tests: ${{ steps.run_tests.outputs.status }}"
64-
echo "codecov: ${{ steps.codecov.outputs.status }}"
65-
66-
- name: Check Failures
67-
if: steps.run_tests.outputs.status == 'failure' || steps.codecov.outputs.status == 'failure'
68-
run: exit 1
69-
7021
# Unit tests with code coverage
7122
unit-tests:
7223
name: Unit Tests
@@ -186,7 +137,6 @@ jobs:
186137
runs-on: ubuntu-latest
187138
if: always()
188139
needs:
189-
- full-genesis
190140
- open-api-validation
191141
- core-contracts-clarinet-test
192142
steps:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
88
## [Unreleased]
99

1010
### Added
11+
- Add `tenure_timeout_secs` to the miner for determining when a time-based tenure extend should be attempted.
1112

1213
### Changed
1314

Cargo.lock

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ rand = "0.8"
2121
rand_chacha = "0.3.1"
2222
tikv-jemallocator = "0.5.4"
2323
rusqlite = { version = "0.31.0", features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] }
24-
thiserror = { version = "1.0.65" }
24+
thiserror = "1.0.65"
25+
toml = "0.5.6"
2526

2627
# Use a bit more than default optimization for
2728
# dev builds to speed up test execution

clarity/src/vm/contexts.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ impl EventBatch {
499499

500500
impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
501501
#[cfg(any(test, feature = "testing"))]
502-
pub fn new(database: ClarityDatabase<'a>, epoch: StacksEpochId) -> OwnedEnvironment<'a, '_> {
502+
pub fn new(database: ClarityDatabase<'a>, epoch: StacksEpochId) -> OwnedEnvironment<'a, 'a> {
503503
OwnedEnvironment {
504504
context: GlobalContext::new(
505505
false,
@@ -513,7 +513,7 @@ impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
513513
}
514514

515515
#[cfg(any(test, feature = "testing"))]
516-
pub fn new_toplevel(mut database: ClarityDatabase<'a>) -> OwnedEnvironment<'a, '_> {
516+
pub fn new_toplevel(mut database: ClarityDatabase<'a>) -> OwnedEnvironment<'a, 'a> {
517517
database.begin();
518518
let epoch = database.get_clarity_epoch_version().unwrap();
519519
let version = ClarityVersion::default_for_epoch(epoch);
@@ -540,7 +540,7 @@ impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
540540
mut database: ClarityDatabase<'a>,
541541
epoch: StacksEpochId,
542542
use_mainnet: bool,
543-
) -> OwnedEnvironment<'a, '_> {
543+
) -> OwnedEnvironment<'a, 'a> {
544544
use crate::vm::tests::test_only_mainnet_to_chain_id;
545545
let cost_track = LimitedCostTracker::new_max_limit(&mut database, epoch, use_mainnet)
546546
.expect("FAIL: problem instantiating cost tracking");
@@ -557,7 +557,7 @@ impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
557557
chain_id: u32,
558558
database: ClarityDatabase<'a>,
559559
epoch_id: StacksEpochId,
560-
) -> OwnedEnvironment<'a, '_> {
560+
) -> OwnedEnvironment<'a, 'a> {
561561
OwnedEnvironment {
562562
context: GlobalContext::new(
563563
mainnet,
@@ -576,7 +576,7 @@ impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
576576
database: ClarityDatabase<'a>,
577577
cost_tracker: LimitedCostTracker,
578578
epoch_id: StacksEpochId,
579-
) -> OwnedEnvironment<'a, '_> {
579+
) -> OwnedEnvironment<'a, 'a> {
580580
OwnedEnvironment {
581581
context: GlobalContext::new(mainnet, chain_id, database, cost_tracker, epoch_id),
582582
call_stack: CallStack::new(),
@@ -1546,7 +1546,7 @@ impl<'a, 'hooks> GlobalContext<'a, 'hooks> {
15461546
database: ClarityDatabase<'a>,
15471547
cost_track: LimitedCostTracker,
15481548
epoch_id: StacksEpochId,
1549-
) -> GlobalContext {
1549+
) -> GlobalContext<'a, 'hooks> {
15501550
GlobalContext {
15511551
database,
15521552
cost_track,

clarity/src/vm/database/key_value_wrapper.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ where
205205
}
206206

207207
impl<'a> RollbackWrapper<'a> {
208-
pub fn new(store: &'a mut dyn ClarityBackingStore) -> RollbackWrapper {
208+
pub fn new(store: &'a mut dyn ClarityBackingStore) -> RollbackWrapper<'a> {
209209
RollbackWrapper {
210210
store,
211211
lookup_map: HashMap::new(),
@@ -218,7 +218,7 @@ impl<'a> RollbackWrapper<'a> {
218218
pub fn from_persisted_log(
219219
store: &'a mut dyn ClarityBackingStore,
220220
log: RollbackWrapperPersistedLog,
221-
) -> RollbackWrapper {
221+
) -> RollbackWrapper<'a> {
222222
RollbackWrapper {
223223
store,
224224
lookup_map: log.lookup_map,

0 commit comments

Comments
 (0)