Skip to content

Commit 233927f

Browse files
authored
Merge pull request #6131 from wileyj/fix/clippy_errors
Merge release/3.1.0.0.10 to master
2 parents da3ea6f + a9768c3 commit 233927f

Some content is hidden

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

67 files changed

+3767
-1370
lines changed

.github/CODEOWNERS

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# These owners will be the default owners for everything in
2+
# the repo. Unless a later match takes precedence,
3+
#
4+
# require both blockchain-team-codeowners and blockchain-team to review all PR's not specifically matched below
5+
* @stacks-network/blockchain-team-codeowners @stacks-network/blockchain-team
6+
7+
8+
# Signer code
9+
# require both blockchain-team-codeowners and blockchain-team-signer to review PR's for the signer folder(s)
10+
libsigner/**/*.rs @stacks-network/blockchain-team-codeowners @stacks-network/blockchain-team-signer
11+
stacks-signer/**/*.rs @stacks-network/blockchain-team-codeowners @stacks-network/blockchain-team-signer
12+
13+
# CI workflows
14+
# require both blockchain-team and blockchain-team-ci teams to review PR's modifying CI workflows
15+
/.github/workflows/ @stacks-network/blockchain-team @stacks-network/blockchain-team-ci
16+
/.github/actions/ @stacks-network/blockchain-team @stacks-network/blockchain-team-ci

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Build the binaries
2525
id: build
2626
run: |
27-
cargo build --bin stacks-inspect
27+
cargo build
2828
- name: Dump constants JSON
2929
id: consts-dump
3030
run: cargo run --bin stacks-inspect -- dump-consts | tee out.json

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to the versioning scheme outlined in the [README.md](README.md).
77

8+
## [3.1.0.0.10]
9+
10+
### Added
11+
- Persisted tracking of StackerDB slot versions for mining. This improves miner p2p performance.
12+
813
## [3.1.0.0.9]
914

1015
### Added
@@ -13,6 +18,8 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1318
- Added new `ValidateRejectCode` values to the `/v3/block_proposal` endpoint
1419
- Added `StateMachineUpdateContent::V1` to support a vector of `StacksTransaction` expected to be replayed in subsequent Stacks blocks
1520
- Include a reason string in the transaction receipt when a transaction is rolled back due to a post-condition. This should help users in understanding what went wrong.
21+
- Updated `StackerDBListener` to monitor signer state machine updates and store signer global state information, enabling miners to perform transaction replays.
22+
- Added a testnet `replay_transactions` flag to the miner configuration to feature-gate transaction replay. When enabled, the miner will construct a replay block if a threshold of signers signals that a transaction set requires replay.
1623

1724
### Changed
1825

CODEOWNERS

Lines changed: 0 additions & 20 deletions
This file was deleted.

clarity/src/vm/analysis/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@ use self::trait_checker::TraitChecker;
3434
use self::type_checker::v2_05::TypeChecker as TypeChecker2_05;
3535
use self::type_checker::v2_1::TypeChecker as TypeChecker2_1;
3636
pub use self::types::{AnalysisPass, ContractAnalysis};
37+
#[cfg(feature = "rusqlite")]
3738
use crate::vm::ast::{build_ast_with_rules, ASTRules};
3839
use crate::vm::costs::LimitedCostTracker;
3940
#[cfg(feature = "rusqlite")]
4041
use crate::vm::database::MemoryBackingStore;
4142
use crate::vm::database::STORE_CONTRACT_SRC_INTERFACE;
4243
use crate::vm::representations::SymbolicExpression;
43-
use crate::vm::types::{QualifiedContractIdentifier, TypeSignature};
44+
use crate::vm::types::QualifiedContractIdentifier;
45+
#[cfg(feature = "rusqlite")]
46+
use crate::vm::types::TypeSignature;
4447
use crate::vm::ClarityVersion;
4548

4649
/// Used by CLI tools like the docs generator. Not used in production

clarity/src/vm/analysis/type_checker/v2_05/natives/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ mod maps;
3434
mod options;
3535
mod sequences;
3636

37+
#[allow(clippy::large_enum_variant)]
3738
pub enum TypedNativeFunction {
3839
Special(SpecialNativeFunction),
3940
Simple(SimpleNativeFunction),

clarity/src/vm/analysis/type_checker/v2_1/natives/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ mod maps;
4242
mod options;
4343
mod sequences;
4444

45+
#[allow(clippy::large_enum_variant)]
4546
pub enum TypedNativeFunction {
4647
Special(SpecialNativeFunction),
4748
Simple(SimpleNativeFunction),

clarity/src/vm/callables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::vm::types::{
3535
};
3636
use crate::vm::{eval, Environment, LocalContext, Value};
3737

38-
#[allow(clippy::type_complexity)]
38+
#[allow(clippy::type_complexity, clippy::large_enum_variant)]
3939
pub enum CallableType {
4040
UserFunction(DefinedFunction),
4141
NativeFunction(&'static str, NativeHandle, ClarityCostFunction),

clarity/src/vm/docs/contracts.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@ use hashbrown::{HashMap, HashSet};
44
use stacks_common::consts::CHAIN_ID_TESTNET;
55
use stacks_common::types::StacksEpochId;
66

7-
#[cfg(feature = "rusqlite")]
8-
use crate::vm::analysis::mem_type_check;
9-
use crate::vm::analysis::ContractAnalysis;
7+
use crate::vm::analysis::{mem_type_check, ContractAnalysis};
108
use crate::vm::ast::{build_ast_with_rules, ASTRules};
119
use crate::vm::contexts::GlobalContext;
1210
use crate::vm::costs::LimitedCostTracker;
13-
#[cfg(feature = "rusqlite")]
1411
use crate::vm::database::MemoryBackingStore;
1512
use crate::vm::docs::{get_input_type_string, get_output_type_string, get_signature};
1613
use crate::vm::types::{FunctionType, QualifiedContractIdentifier, Value};
@@ -63,7 +60,6 @@ fn make_func_ref(func_name: &str, func_type: &FunctionType, description: &str) -
6360
}
6461
}
6562

66-
#[cfg(feature = "rusqlite")]
6763
#[allow(clippy::expect_used)]
6864
fn get_constant_value(var_name: &str, contract_content: &str) -> Value {
6965
let to_eval = format!("{}\n{}", contract_content, var_name);
@@ -72,7 +68,6 @@ fn get_constant_value(var_name: &str, contract_content: &str) -> Value {
7268
.expect("BUG: failed to return constant value")
7369
}
7470

75-
#[cfg(feature = "rusqlite")]
7671
fn doc_execute(program: &str) -> Result<Option<Value>, vm::Error> {
7772
let contract_id = QualifiedContractIdentifier::transient();
7873
let mut contract_context = ContractContext::new(contract_id.clone(), ClarityVersion::Clarity2);
@@ -99,7 +94,6 @@ fn doc_execute(program: &str) -> Result<Option<Value>, vm::Error> {
9994
})
10095
}
10196

102-
#[cfg(feature = "rusqlite")]
10397
#[allow(clippy::expect_used)]
10498
pub fn make_docs(
10599
content: &str,
@@ -185,7 +179,6 @@ pub fn make_docs(
185179

186180
/// Produce a set of documents for multiple contracts, supplied as a list of `(contract_name, contract_content)` pairs,
187181
/// and a map from `contract_name` to corresponding `ContractSupportDocs`
188-
#[cfg(feature = "rusqlite")]
189182
pub fn produce_docs_refs<A: AsRef<str>, B: AsRef<str>>(
190183
contracts: &[(A, B)],
191184
support_docs: &HashMap<&str, ContractSupportDocs>,

clarity/src/vm/docs/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use crate::vm::types::{FixedFunction, FunctionType};
2323
use crate::vm::variables::NativeVariables;
2424
use crate::vm::ClarityVersion;
2525

26+
#[cfg(feature = "rusqlite")]
2627
pub mod contracts;
2728

2829
#[derive(Serialize)]

0 commit comments

Comments
 (0)