Skip to content

Commit 5783141

Browse files
committed
Merge branch 'develop' into chore/stacks-common-optional-requirements
2 parents 2ebf15e + c76743e commit 5783141

File tree

131 files changed

+4018
-1833
lines changed

Some content is hidden

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

131 files changed

+4018
-1833
lines changed

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
stacks-node = "run --package stacks-node --"
33
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
44
clippy-stacks = "clippy -p stx-genesis -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings -A clippy::uninlined-format-args"
5+
clippy-stackslib = "clippy -p stackslib --no-deps -- -Aclippy::all -Wclippy::indexing_slicing"
56

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

.github/CODEOWNERS

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
# These owners will be the default owners for everything in
22
# the repo. Unless a later match takes precedence,
33
#
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
4+
# require both blockchain-team-codeowners and blockchain-team-reviewers to review all PR's not specifically matched below
5+
* @stacks-network/blockchain-team-codeowners @stacks-network/blockchain-team-reviewers
126

137
# 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
8+
# require both blockchain-team-ci and blockchain-team-reviewers teams to review PR's modifying CI workflows
9+
/.github/workflows/ @stacks-network/blockchain-team-ci @stacks-network/blockchain-team-reviewers
10+
/.github/actions/ @stacks-network/blockchain-team-ci @stacks-network/blockchain-team-reviewers

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ 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-
# Unreleased
8+
## Unreleased
9+
10+
### Changed
11+
12+
- When a previous block commit is unable to be RBFed, the miner will now just wait for it to be confirmed instead of submitting a new block commit which breaks the miner's UTXO chain.
13+
14+
## [3.1.0.0.13]
915

1016
### Added
1117

clarity/src/vm/tests/assets.rs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,28 @@
1313
//
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/>.
16-
16+
#[cfg(test)]
1717
use stacks_common::types::StacksEpochId;
1818

19-
use crate::vm::ast::ASTRules;
20-
use crate::vm::contexts::{AssetMap, AssetMapEntry, OwnedEnvironment};
21-
use crate::vm::errors::{CheckErrors, Error, RuntimeErrorType};
19+
use crate::vm::contexts::{AssetMap, OwnedEnvironment};
20+
use crate::vm::errors::Error;
2221
use crate::vm::events::StacksTransactionEvent;
2322
use crate::vm::representations::SymbolicExpression;
24-
use crate::vm::tests::{
25-
execute, is_committed, is_err_code, symbols_from_values, test_clarity_versions, test_epochs,
26-
tl_env_factory as env_factory, TopLevelMemoryEnvironmentGenerator,
23+
use crate::vm::tests::{test_clarity_versions, test_epochs};
24+
use crate::vm::types::{PrincipalData, QualifiedContractIdentifier, Value};
25+
#[cfg(test)]
26+
use crate::vm::{
27+
ast::ASTRules,
28+
contexts::AssetMapEntry,
29+
errors::{CheckErrors, RuntimeErrorType},
30+
tests::{
31+
execute, is_committed, is_err_code, symbols_from_values, tl_env_factory as env_factory,
32+
TopLevelMemoryEnvironmentGenerator,
33+
},
34+
types::AssetIdentifier,
35+
version::ClarityVersion,
36+
ContractContext,
2737
};
28-
use crate::vm::types::{AssetIdentifier, PrincipalData, QualifiedContractIdentifier, Value};
29-
use crate::vm::version::ClarityVersion;
30-
use crate::vm::ContractContext;
3138

3239
const FIRST_CLASS_TOKENS: &str = "(define-fungible-token stackaroos)
3340
(define-read-only (my-ft-get-balance (account principal))

clarity/src/vm/tests/contracts.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@
1616

1717
#[cfg(any(test, feature = "testing"))]
1818
use rstest::rstest;
19-
use stacks_common::types::chainstate::BlockHeaderHash;
20-
use stacks_common::types::StacksEpochId;
19+
#[cfg(test)]
20+
use stacks_common::types::{chainstate::BlockHeaderHash, StacksEpochId};
2121

22-
use crate::vm::ast::errors::ParseErrors;
23-
use crate::vm::ast::ASTRules;
2422
use crate::vm::contexts::Environment;
25-
use crate::vm::errors::{CheckErrors, Error, RuntimeErrorType};
26-
use crate::vm::tests::{
27-
env_factory, execute, is_committed, is_err_code_i128 as is_err_code, symbols_from_values,
28-
test_clarity_versions, test_epochs, tl_env_factory, MemoryEnvironmentGenerator,
29-
TopLevelMemoryEnvironmentGenerator,
23+
use crate::vm::tests::{test_clarity_versions, test_epochs};
24+
use crate::vm::types::{PrincipalData, QualifiedContractIdentifier, StandardPrincipalData, Value};
25+
#[cfg(test)]
26+
use crate::vm::{
27+
ast::{errors::ParseErrors, ASTRules},
28+
errors::{CheckErrors, Error, RuntimeErrorType},
29+
tests::{
30+
env_factory, execute, is_committed, is_err_code_i128 as is_err_code, symbols_from_values,
31+
tl_env_factory, MemoryEnvironmentGenerator, TopLevelMemoryEnvironmentGenerator,
32+
},
33+
types::{OptionalData, ResponseData, TypeSignature},
34+
{execute as vm_execute, ClarityVersion, ContractContext},
3035
};
31-
use crate::vm::types::{
32-
OptionalData, PrincipalData, QualifiedContractIdentifier, ResponseData, StandardPrincipalData,
33-
TypeSignature, Value,
34-
};
35-
use crate::vm::{execute as vm_execute, ClarityVersion, ContractContext};
3636

3737
const FACTORIAL_CONTRACT: &str = "(define-map factorials { id: int } { current: int, index: int })
3838
(define-private (init-factorial (id int) (factorial int))

clarity/src/vm/tests/datamaps.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
//
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/>.
16-
17-
use crate::vm::errors::{CheckErrors, Error, ShortReturnType};
18-
use crate::vm::types::{
19-
ListData, SequenceData, TupleData, TupleTypeSignature, TypeSignature, Value,
16+
use crate::vm::errors::Error;
17+
use crate::vm::types::{TupleData, Value};
18+
#[cfg(test)]
19+
use crate::vm::{
20+
errors::{CheckErrors, ShortReturnType},
21+
types::{ListData, SequenceData, TupleTypeSignature, TypeSignature},
2022
};
2123
use crate::vm::{execute, ClarityName};
2224

clarity/src/vm/tests/defines.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,21 @@
1818
use rstest::rstest;
1919
#[cfg(test)]
2020
use rstest_reuse::{self, *};
21+
#[cfg(test)]
2122
use stacks_common::types::StacksEpochId;
2223

23-
use crate::vm::ast::build_ast;
24-
use crate::vm::ast::errors::{ParseError, ParseErrors};
25-
use crate::vm::errors::{CheckErrors, Error, RuntimeErrorType};
24+
use crate::vm::errors::{CheckErrors, Error};
2625
use crate::vm::tests::test_clarity_versions;
27-
use crate::vm::types::{QualifiedContractIdentifier, TypeSignature, Value};
28-
use crate::vm::{execute, ClarityVersion};
26+
#[cfg(test)]
27+
use crate::vm::{
28+
ast::{
29+
build_ast,
30+
errors::{ParseError, ParseErrors},
31+
},
32+
errors::RuntimeErrorType,
33+
types::{QualifiedContractIdentifier, TypeSignature, Value},
34+
{execute, ClarityVersion},
35+
};
2936

3037
fn assert_eq_err(e1: CheckErrors, e2: Error) {
3138
let e1: Error = e1.into();

clarity/src/vm/tests/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@
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)]
18-
1917
use stacks_common::consts::{CHAIN_ID_MAINNET, CHAIN_ID_TESTNET};
2018
use stacks_common::types::StacksEpochId;
2119

2220
pub use super::test_util::*;
21+
#[cfg(test)]
2322
use super::ClarityVersion;
2423
use crate::vm::contexts::OwnedEnvironment;
2524
pub use crate::vm::database::BurnStateDB;
2625
use crate::vm::database::MemoryBackingStore;
27-
use crate::vm::errors::Error;
28-
use crate::vm::types::Value;
26+
#[cfg(test)]
27+
use crate::{vm::errors::Error, vm::types::Value};
2928

3029
mod assets;
3130
mod contracts;

clarity/src/vm/tests/principals.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
use hashbrown::HashMap;
21
use stacks_common::types::StacksEpochId;
32
use stacks_common::util::hash::hex_bytes;
43

54
use crate::vm::ast::ASTRules;
6-
use crate::vm::errors::CheckErrors;
7-
use crate::vm::functions::principals::PrincipalConstructErrorCode;
8-
use crate::vm::types::TypeSignature::PrincipalType;
95
use crate::vm::types::{
106
ASCIIData, BuffData, CharType, OptionalData, PrincipalData, QualifiedContractIdentifier,
11-
ResponseData, SequenceData, StandardPrincipalData, TupleData, TypeSignature, Value, BUFF_1,
12-
BUFF_20,
7+
SequenceData, StandardPrincipalData, TupleData, Value,
8+
};
9+
#[cfg(test)]
10+
use crate::vm::{
11+
errors::CheckErrors,
12+
functions::principals::PrincipalConstructErrorCode,
13+
types::TypeSignature::PrincipalType,
14+
types::{ResponseData, TypeSignature, BUFF_1, BUFF_20},
1315
};
1416
use crate::vm::{execute_with_parameters, ClarityVersion};
1517

clarity/src/vm/tests/sequences.rs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,25 @@
1616

1717
use rstest::rstest;
1818
use rstest_reuse::{self, *};
19+
#[cfg(test)]
1920
use stacks_common::types::StacksEpochId;
2021

21-
use crate::vm::errors::{CheckErrors, Error, RuntimeErrorType};
2222
use crate::vm::tests::test_clarity_versions;
23-
use crate::vm::types::signatures::SequenceSubtype;
24-
use crate::vm::types::signatures::SequenceSubtype::{BufferType, StringType};
25-
use crate::vm::types::signatures::StringSubtype::ASCII;
26-
use crate::vm::types::TypeSignature::{BoolType, IntType, SequenceType, UIntType};
27-
use crate::vm::types::{BufferLength, StringSubtype, StringUTF8Length, TypeSignature, Value};
28-
use crate::vm::{execute, execute_v2, ClarityVersion};
23+
#[cfg(test)]
24+
use crate::vm::{
25+
errors::{CheckErrors, Error, RuntimeErrorType},
26+
execute, execute_v2,
27+
types::{
28+
signatures::{
29+
SequenceSubtype::{self, BufferType, StringType},
30+
StringSubtype::ASCII,
31+
},
32+
BufferLength, StringSubtype, StringUTF8Length,
33+
TypeSignature::{self, BoolType, IntType, SequenceType, UIntType},
34+
Value,
35+
},
36+
ClarityVersion,
37+
};
2938

3039
#[test]
3140
fn test_simple_list_admission() {

0 commit comments

Comments
 (0)