Skip to content

Commit

Permalink
Merge branch 'develop' into chore/3.1.0.0.2_changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
wileyj authored Dec 20, 2024
2 parents 97910c5 + 5f64d2d commit 3d0861f
Show file tree
Hide file tree
Showing 69 changed files with 1,969 additions and 1,468 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,18 @@ jobs:
- tests::signer::v0::signer_set_rollover
- tests::signer::v0::signing_in_0th_tenure_of_reward_cycle
- tests::signer::v0::continue_after_tenure_extend
- tests::signer::v0::tenure_extend_after_idle
- tests::signer::v0::tenure_extend_after_idle_signers
- tests::signer::v0::tenure_extend_after_idle_miner
- tests::signer::v0::tenure_extend_succeeds_after_rejected_attempt
- tests::signer::v0::stx_transfers_dont_effect_idle_timeout
- tests::signer::v0::idle_tenure_extend_active_mining
- tests::signer::v0::multiple_miners_with_custom_chain_id
- tests::signer::v0::block_commit_delay
- tests::signer::v0::continue_after_fast_block_no_sortition
- tests::signer::v0::block_validation_response_timeout
- tests::signer::v0::tenure_extend_after_bad_commit
- tests::signer::v0::block_proposal_max_age_rejections
- tests::signer::v0::global_acceptance_depends_on_block_announcement
- tests::nakamoto_integrations::burn_ops_integration_test
- tests::nakamoto_integrations::check_block_heights
- tests::nakamoto_integrations::clarity_burn_state
Expand All @@ -140,6 +144,7 @@ jobs:
- tests::nakamoto_integrations::mock_mining
- tests::nakamoto_integrations::multiple_miners
- tests::nakamoto_integrations::follower_bootup_across_multiple_cycles
- tests::nakamoto_integrations::nakamoto_lockup_events
- tests::nakamoto_integrations::utxo_check_on_startup_panic
- tests::nakamoto_integrations::utxo_check_on_startup_recover
- tests::nakamoto_integrations::v3_signer_api_endpoint
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Perform Clippy checks - currently set to defaults
## https://github.com/rust-lang/rust-clippy#usage
## https://rust-lang.github.io/rust-clippy/master/index.html
##
name: Clippy Checks

# Only run when:
# - PRs are (re)opened against develop branch
on:
pull_request:
branches:
- develop
types:
- opened
- reopened
- synchronize

jobs:
clippy_check:
name: Clippy Check
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
id: git_checkout
uses: actions/checkout@v3
- name: Define Rust Toolchain
id: define_rust_toolchain
run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV
- name: Setup Rust Toolchain
id: setup_rust_toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: clippy
- name: Clippy
id: clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -p libstackerdb -p stacks-signer -p pox-locking --no-deps --tests --all-features -- -D warnings
8 changes: 4 additions & 4 deletions .github/workflows/p2p-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
- net::tests::convergence::test_walk_star_15_org_biased
- net::tests::convergence::test_walk_inbound_line_15
- net::api::tests::postblock_proposal::test_try_make_response
- net::server::tests::test_http_10_threads_getinfo
- net::server::tests::test_http_10_threads_getblock
- net::server::tests::test_http_too_many_clients
- net::server::tests::test_http_slow_client
- net::server::test::test_http_10_threads_getinfo
- net::server::test::test_http_10_threads_getblock
- net::server::test::test_http_too_many_clients
- net::server::test::test_http_slow_client
steps:
## Setup test environment
- name: Setup Test Environment
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/stacks-core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,55 +18,6 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
# Full genesis test with code coverage
full-genesis:
name: Full Genesis Test
runs-on: ubuntu-latest
strategy:
## Continue with the test matrix even if we've had a failure
fail-fast: false
## Run a maximum of 2 concurrent tests from the test matrix
max-parallel: 2
matrix:
test-name:
- neon_integrations::bitcoind_integration_test
steps:
## Setup test environment
- name: Setup Test Environment
id: setup_tests
uses: stacks-network/actions/stacks-core/testenv@main
with:
genesis: true
btc-version: "25.0"

## Run test matrix using restored cache of archive file
## - Test will timeout after env.TEST_TIMEOUT minutes
- name: Run Tests
id: run_tests
timeout-minutes: ${{ fromJSON(env.TEST_TIMEOUT) }}
uses: stacks-network/actions/stacks-core/run-tests@main
with:
test-name: ${{ matrix.test-name }}
threads: 1
archive-file: ~/genesis_archive.tar.zst

## Upload code coverage file
- name: Code Coverage
id: codecov
uses: stacks-network/actions/codecov@main
with:
test-name: large_genesis
filename: ./lcov.info

- name: Status Output
run: |
echo "run_tests: ${{ steps.run_tests.outputs.status }}"
echo "codecov: ${{ steps.codecov.outputs.status }}"
- name: Check Failures
if: steps.run_tests.outputs.status == 'failure' || steps.codecov.outputs.status == 'failure'
run: exit 1

# Unit tests with code coverage
unit-tests:
name: Unit Tests
Expand Down Expand Up @@ -186,7 +137,6 @@ jobs:
runs-on: ubuntu-latest
if: always()
needs:
- full-genesis
- open-api-validation
- core-contracts-clarinet-test
steps:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
## [Unreleased]

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

### Changed

Expand Down
30 changes: 18 additions & 12 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ rand = "0.8"
rand_chacha = "0.3.1"
tikv-jemallocator = "0.5.4"
rusqlite = { version = "0.31.0", features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] }
thiserror = { version = "1.0.65" }
thiserror = "1.0.65"
toml = "0.5.6"

# Use a bit more than default optimization for
# dev builds to speed up test execution
Expand Down
12 changes: 6 additions & 6 deletions clarity/src/vm/contexts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ impl EventBatch {

impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
#[cfg(any(test, feature = "testing"))]
pub fn new(database: ClarityDatabase<'a>, epoch: StacksEpochId) -> OwnedEnvironment<'a, '_> {
pub fn new(database: ClarityDatabase<'a>, epoch: StacksEpochId) -> OwnedEnvironment<'a, 'a> {
OwnedEnvironment {
context: GlobalContext::new(
false,
Expand All @@ -513,7 +513,7 @@ impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
}

#[cfg(any(test, feature = "testing"))]
pub fn new_toplevel(mut database: ClarityDatabase<'a>) -> OwnedEnvironment<'a, '_> {
pub fn new_toplevel(mut database: ClarityDatabase<'a>) -> OwnedEnvironment<'a, 'a> {
database.begin();
let epoch = database.get_clarity_epoch_version().unwrap();
let version = ClarityVersion::default_for_epoch(epoch);
Expand All @@ -540,7 +540,7 @@ impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
mut database: ClarityDatabase<'a>,
epoch: StacksEpochId,
use_mainnet: bool,
) -> OwnedEnvironment<'a, '_> {
) -> OwnedEnvironment<'a, 'a> {
use crate::vm::tests::test_only_mainnet_to_chain_id;
let cost_track = LimitedCostTracker::new_max_limit(&mut database, epoch, use_mainnet)
.expect("FAIL: problem instantiating cost tracking");
Expand All @@ -557,7 +557,7 @@ impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
chain_id: u32,
database: ClarityDatabase<'a>,
epoch_id: StacksEpochId,
) -> OwnedEnvironment<'a, '_> {
) -> OwnedEnvironment<'a, 'a> {
OwnedEnvironment {
context: GlobalContext::new(
mainnet,
Expand All @@ -576,7 +576,7 @@ impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
database: ClarityDatabase<'a>,
cost_tracker: LimitedCostTracker,
epoch_id: StacksEpochId,
) -> OwnedEnvironment<'a, '_> {
) -> OwnedEnvironment<'a, 'a> {
OwnedEnvironment {
context: GlobalContext::new(mainnet, chain_id, database, cost_tracker, epoch_id),
call_stack: CallStack::new(),
Expand Down Expand Up @@ -1546,7 +1546,7 @@ impl<'a, 'hooks> GlobalContext<'a, 'hooks> {
database: ClarityDatabase<'a>,
cost_track: LimitedCostTracker,
epoch_id: StacksEpochId,
) -> GlobalContext {
) -> GlobalContext<'a, 'hooks> {
GlobalContext {
database,
cost_track,
Expand Down
4 changes: 2 additions & 2 deletions clarity/src/vm/database/key_value_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ where
}

impl<'a> RollbackWrapper<'a> {
pub fn new(store: &'a mut dyn ClarityBackingStore) -> RollbackWrapper {
pub fn new(store: &'a mut dyn ClarityBackingStore) -> RollbackWrapper<'a> {
RollbackWrapper {
store,
lookup_map: HashMap::new(),
Expand All @@ -218,7 +218,7 @@ impl<'a> RollbackWrapper<'a> {
pub fn from_persisted_log(
store: &'a mut dyn ClarityBackingStore,
log: RollbackWrapperPersistedLog,
) -> RollbackWrapper {
) -> RollbackWrapper<'a> {
RollbackWrapper {
store,
lookup_map: log.lookup_map,
Expand Down
Loading

0 comments on commit 3d0861f

Please sign in to comment.