Skip to content

Commit 571f55b

Browse files
authored
Merge branch 'develop' into feat/zerocost_readonly
2 parents 862f9a7 + bc58a1e commit 571f55b

File tree

148 files changed

+3519
-1933
lines changed

Some content is hidden

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

148 files changed

+3519
-1933
lines changed

.cargo/config.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
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 stx-genesis -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings"
4+
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

.vscode/settings.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"lldb.launch.sourceLanguages": [
3-
"rust"
4-
],
5-
"rust-analyzer.runnables.extraEnv": {
6-
"BITCOIND_TEST": "1"
7-
},
8-
"rust-analyzer.rustfmt.extraArgs": [
9-
"+nightly"
10-
],
11-
"files.eol": "\n"
12-
}
2+
"lldb.launch.sourceLanguages": ["rust"],
3+
"rust-analyzer.runnables.extraEnv": {
4+
"BITCOIND_TEST": "1"
5+
},
6+
"rust-analyzer.rustfmt.extraArgs": ["+nightly"],
7+
"files.eol": "\n"
8+
}

CHANGELOG.md

Lines changed: 8 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

@@ -14,6 +20,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1420
- `stacks_node_miner_stop_reason_total`: Counts the number of times the miner stopped mining due to various reasons.
1521
- Always report the number of transactions mined in the last attempt, even if there were 0
1622

23+
- Added a new option `--hex-file <file_path>` to `blockstack-cli contract-call` command, that allows to pass a serialized Clarity value by file.
1724
- Added a new option `--postcondition-mode [allow, deny]` to `blockstack-cli publish` command, to set the post-condition mode to allow or deny on the transaction (default is deny)
1825

1926
### Changed

Cargo.lock

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

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;

0 commit comments

Comments
 (0)