Skip to content

Commit f54eed2

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feat/dry-run-signer
2 parents 652f9e3 + 36d49b0 commit f54eed2

File tree

314 files changed

+8841
-6936
lines changed

Some content is hidden

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

314 files changed

+8841
-6936
lines changed

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[alias]
22
stacks-node = "run --package stacks-node --"
33
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
4+
clippy-stacks = "clippy -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings"
45

56
# Uncomment to improve performance slightly, at the cost of portability
67
# * Note that native binaries may not run on CPUs that are different from the build machine

.github/workflows/bitcoin-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ jobs:
125125
- tests::signer::v0::continue_after_tenure_extend
126126
- tests::signer::v0::tenure_extend_after_idle_signers
127127
- tests::signer::v0::tenure_extend_after_idle_miner
128+
- tests::signer::v0::tenure_extend_after_failed_miner
128129
- tests::signer::v0::tenure_extend_succeeds_after_rejected_attempt
129130
- tests::signer::v0::stx_transfers_dont_effect_idle_timeout
130131
- tests::signer::v0::idle_tenure_extend_active_mining
@@ -141,8 +142,12 @@ jobs:
141142
- tests::signer::v0::incoming_signers_ignore_block_proposals
142143
- tests::signer::v0::outgoing_signers_ignore_block_proposals
143144
- tests::signer::v0::injected_signatures_are_ignored_across_boundaries
145+
- tests::signer::v0::fast_sortition
146+
- tests::signer::v0::single_miner_empty_sortition
147+
- tests::signer::v0::multiple_miners_empty_sortition
144148
- tests::signer::v0::block_proposal_timeout
145149
- tests::signer::v0::rejected_blocks_count_towards_miner_validity
150+
- tests::signer::v0::allow_reorg_within_first_proposal_burn_block_timing_secs
146151
- tests::nakamoto_integrations::burn_ops_integration_test
147152
- tests::nakamoto_integrations::check_block_heights
148153
- tests::nakamoto_integrations::clarity_burn_state
@@ -162,6 +167,8 @@ jobs:
162167
- tests::nakamoto_integrations::sip029_coinbase_change
163168
- tests::nakamoto_integrations::clarity_cost_spend_down
164169
- tests::nakamoto_integrations::v3_blockbyheight_api_endpoint
170+
- tests::nakamoto_integrations::mine_invalid_principal_from_consensus_buff
171+
- tests::nakamoto_integrations::test_tenure_extend_from_flashblocks
165172
# TODO: enable these once v1 signer is supported by a new nakamoto epoch
166173
# - tests::signer::v1::dkg
167174
# - tests::signer::v1::sign_request_rejected

.github/workflows/clippy.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,4 @@ jobs:
3434
components: clippy
3535
- name: Clippy
3636
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 -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings
37+
run: cargo clippy-stacks

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1414
behave normally (e.g., submitting validation requests, submitting finished blocks). A
1515
dry run signer will error out if the supplied key is actually a registered signer.
1616

17+
## [3.1.0.0.4]
18+
19+
### Added
20+
21+
- The stacks-node miner now performs accurate tenure-extensions in certain bitcoin block production
22+
cases: when a bitcoin block is produced before the previous bitcoin block's Stacks tenure started.
23+
Previously, the miner had difficulty restarting their missed tenure and extending into the new
24+
bitcoin block, leading to 1-2 bitcoin blocks of missed Stacks block production.
25+
- The event dispatcher now includes `consensus_hash` in the `/new_block` and `/new_burn_block` payloads. ([#5677](https://github.com/stacks-network/stacks-core/pull/5677))
26+
27+
## Changed
28+
29+
- When a miner reorgs the previous tenure due to a poorly timed block, it can now continue to build blocks on this new chain tip (#5691)
30+
1731
## [3.1.0.0.3]
1832

1933
### Added

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,18 @@ You can automatically reformat your commit via:
387387
cargo fmt-stacks
388388
```
389389

390+
## Clippy Warnings
391+
392+
PRs will be checked against `clippy` and will _fail_ if any clippy warnings are generated.
393+
Unfortunately, not all existing clippy warnings have been addressed throughout stacks-core, so arguments must be passed via the command line.
394+
Therefore, we handle `clippy` configurations using a Cargo alias: `cargo clippy-stacks`
395+
396+
You can check what warnings need to be addressed locally via:
397+
398+
```bash
399+
cargo clippy-stacks
400+
```
401+
390402
## Comments
391403

392404
Comments are very important for the readability and correctness of the codebase. The purpose of comments is:

Cargo.lock

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

clarity/src/libclarity.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
#![allow(unused_imports)]
1817
#![allow(dead_code)]
1918
#![allow(non_camel_case_types)]
2019
#![allow(non_snake_case)]
2120
#![allow(non_upper_case_globals)]
2221
#![cfg_attr(test, allow(unused_variables, unused_assignments))]
2322

23+
#[allow(unused_imports)]
2424
#[macro_use(o, slog_log, slog_trace, slog_debug, slog_info, slog_warn, slog_error)]
2525
extern crate slog;
2626

2727
#[macro_use]
2828
extern crate serde_derive;
2929

30-
#[macro_use]
3130
extern crate serde_json;
3231

3332
#[cfg(any(test, feature = "testing"))]

clarity/src/vm/analysis/analysis_db.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ use std::collections::{BTreeMap, BTreeSet};
1818

1919
use stacks_common::types::StacksEpochId;
2020

21-
use crate::vm::analysis::errors::{CheckError, CheckErrors, CheckResult};
21+
use crate::vm::analysis::errors::{CheckErrors, CheckResult};
2222
use crate::vm::analysis::type_checker::ContractAnalysis;
2323
use crate::vm::database::{
2424
ClarityBackingStore, ClarityDeserializable, ClaritySerializable, RollbackWrapper,
2525
};
2626
use crate::vm::representations::ClarityName;
2727
use crate::vm::types::signatures::FunctionSignature;
28-
use crate::vm::types::{FunctionType, QualifiedContractIdentifier, TraitIdentifier, TypeSignature};
28+
use crate::vm::types::{FunctionType, QualifiedContractIdentifier, TraitIdentifier};
2929
use crate::vm::ClarityVersion;
3030

3131
pub struct AnalysisDatabase<'a> {

clarity/src/vm/analysis/arithmetic_checker/mod.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,16 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
use hashbrown::HashMap;
18-
1917
pub use super::errors::{
2018
check_argument_count, check_arguments_at_least, CheckError, CheckErrors, CheckResult,
2119
};
22-
use super::AnalysisDatabase;
23-
use crate::vm::analysis::types::{AnalysisPass, ContractAnalysis};
20+
use crate::vm::analysis::types::ContractAnalysis;
2421
use crate::vm::functions::define::{DefineFunctions, DefineFunctionsParsed};
25-
use crate::vm::functions::{tuples, NativeFunctions};
22+
use crate::vm::functions::NativeFunctions;
2623
use crate::vm::representations::SymbolicExpressionType::{
2724
Atom, AtomValue, Field, List, LiteralValue, TraitReference,
2825
};
29-
use crate::vm::representations::{ClarityName, SymbolicExpression, SymbolicExpressionType};
30-
use crate::vm::types::{
31-
parse_name_type_pairs, PrincipalData, TupleTypeSignature, TypeSignature, Value,
32-
};
26+
use crate::vm::representations::{ClarityName, SymbolicExpression};
3327
use crate::vm::variables::NativeVariables;
3428
use crate::vm::ClarityVersion;
3529

clarity/src/vm/analysis/read_only_checker/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@ pub use super::errors::{
2323
use super::AnalysisDatabase;
2424
use crate::vm::analysis::types::{AnalysisPass, ContractAnalysis};
2525
use crate::vm::functions::define::DefineFunctionsParsed;
26-
use crate::vm::functions::{tuples, NativeFunctions};
26+
use crate::vm::functions::NativeFunctions;
2727
use crate::vm::representations::SymbolicExpressionType::{
2828
Atom, AtomValue, Field, List, LiteralValue, TraitReference,
2929
};
3030
use crate::vm::representations::{ClarityName, SymbolicExpression, SymbolicExpressionType};
31-
use crate::vm::types::{
32-
parse_name_type_pairs, PrincipalData, TupleTypeSignature, TypeSignature, Value,
33-
};
34-
use crate::vm::variables::NativeVariables;
31+
use crate::vm::types::{PrincipalData, Value};
3532
use crate::vm::ClarityVersion;
3633

3734
#[cfg(test)]

0 commit comments

Comments
 (0)