Skip to content

Commit

Permalink
Merge pull request #4917 from stacks-network/chore/merge-master-2.5.0…
Browse files Browse the repository at this point in the history
….0.4

Merge branch release/2.5.0.0.4 to master
  • Loading branch information
wileyj committed Jun 26, 2024
2 parents b7f7295 + d073cdb commit 35d0840
Show file tree
Hide file tree
Showing 236 changed files with 37,873 additions and 5,146 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,17 @@ jobs:
- tests::nakamoto_integrations::correct_burn_outs
- tests::nakamoto_integrations::vote_for_aggregate_key_burn_op
- tests::nakamoto_integrations::follower_bootup
- tests::nakamoto_integrations::forked_tenure_is_ignored
- tests::signer::stackerdb_dkg
- tests::signer::stackerdb_sign
- tests::signer::stackerdb_sign_request_rejected
- tests::signer::stackerdb_block_proposal
- tests::signer::stackerdb_filter_bad_transactions
- tests::signer::stackerdb_mine_2_nakamoto_reward_cycles
- tests::signer::stackerdb_sign_after_signer_reboot
# TODO: enable these once v1 signer is fixed
# - tests::signer::stackerdb_mine_2_nakamoto_reward_cycles
# - tests::signer::stackerdb_sign_after_signer_reboot
- tests::nakamoto_integrations::stack_stx_burn_op_integration_test
- tests::signer::stackerdb_delayed_dkg
- tests::nakamoto_integrations::check_block_heights
# Do not run this one until we figure out why it fails in CI
# - tests::neon_integrations::bitcoin_reorg_flap
# - tests::neon_integrations::bitcoin_reorg_flap_with_follower
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@ jobs:
name: Rust Format
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
id: git_checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Rust Toolchain
id: setup_rust_toolchain
uses: actions-rust-lang/setup-rust-toolchain@f3c84ee10bf5a86e7a5d607d487bf17d57670965 # v1.5.0
with:
components: rustfmt
cache: false

- name: Rustfmt
id: rustfmt
uses: stacks-network/actions/rustfmt@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clarity-js-sdk-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- name: Checkout latest clarity js sdk
id: git_checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
token: ${{ secrets.GH_TOKEN }}
repository: ${{ env.CLARITY_JS_SDK_REPOSITORY }}
Expand All @@ -46,7 +46,7 @@ jobs:

- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: "chore: update clarity-native-bin tag"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
steps:
- name: Checkout the latest code
id: git_checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Build docs
id: build_docs
Expand All @@ -46,7 +46,7 @@ jobs:

- name: Checkout latest docs
id: git_checkout_docs
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
token: ${{ secrets.DOCS_GITHUB_TOKEN }}
repository: ${{ env.TARGET_REPOSITORY }}
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Open PR
id: open_pr
if: ${{ steps.push.outputs.open_pr == '1' }}
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.DOCS_GITHUB_TOKEN }}
script: |
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,23 @@ jobs:
## Downloads the artifacts built in `create-source-binary.yml`
- name: Download Artifacts
id: download_artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: artifact
pattern: ${{ inputs.tag }}-binary-build-*
path: release
merge-multiple: true

## Generate a checksums file to be added to the release page
- name: Generate Checksums
id: generate_checksum
uses: stacks-network/actions/generate-checksum@main
with:
artifact_download_pattern: "${{ inputs.tag }}-binary-build-*"

## Upload the release archives with the checksums file
- name: Upload Release
id: upload_release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 #v0.1.15
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 #v2.0.5
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/image-build-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
## ex. debian will have this tag: `type=ref,event=tag,enable=${{ matrix.dist == 'debian' }}`
- name: Docker Metadata ( ${{matrix.dist}} )
id: docker_metadata
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 #v5.0.0
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 #v5.5.1
with:
## tag images with current repo name `stacks-core` as well as legacy `stacks-blockchain`
images: |
Expand All @@ -79,7 +79,7 @@ jobs:
## Build docker image for release
- name: Build and Push ( ${{matrix.dist}} )
id: docker_build
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
file: ./.github/actions/dockerfiles/Dockerfile.${{ matrix.dist }}-binary
platforms: ${{ env.docker_platforms }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/image-build-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
## Set docker metatdata
- name: Docker Metadata ( ${{matrix.dist}} )
id: docker_metadata
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 #v5.0.0
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 #v5.5.1
with:
images: |
${{env.docker-org}}/${{ github.event.repository.name }}
Expand All @@ -61,7 +61,7 @@ jobs:
## Build docker image
- name: Build and Push ( ${{matrix.dist}} )
id: docker_build
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
file: ./.github/actions/dockerfiles/Dockerfile.${{matrix.dist}}-source
platforms: ${{ env.docker_platforms }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/stacks-core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
## checkout the code
- name: Checkout the latest code
id: git_checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Run network relay tests
id: nettest
Expand All @@ -145,10 +145,10 @@ jobs:
steps:
- name: Checkout the latest code
id: git_checkout
uses: actions/checkout@v3
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Execute core contract unit tests with clarinet-sdk
id: clarinet_unit_test
uses: actions/setup-node@v3
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18.x
cache: "npm"
Expand All @@ -174,7 +174,7 @@ jobs:
steps:
- name: Checkout the latest code
id: git_checkout
uses: actions/checkout@v3
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Execute core contract unit tests in Clarinet
id: clarinet_unit_test_v1
uses: docker://hirosystems/clarinet:1.7.1
Expand Down
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to the versioning scheme outlined in the [README.md](README.md).

## [2.5.0.0.4]

### Added

- Adds the solo stacking scenarios to the stateful property-based testing strategy for PoX-4 (#4725)
- Add signer-key to synthetic stack-aggregation-increase event (#4728)
- Implement the assumed total commit with carry-over (ATC-C) strategy for denying opportunistic Bitcoin miners from mining Stacks at a discount (#4733)
- Adding support for stacks-block-height and tenure-height in Clarity 3 (#4745)
- Preserve PeerNetwork struct when transitioning to 3.0 (#4767)
- Implement singer monitor server error (#4773)
- Pull current stacks signer out into v1 implementation and create placeholder v0 mod (#4778)
- Create new block signature message type for v0 signer (#4787)
- Isolate the rusqlite dependency in stacks-common and clarity behind a cargo feature (#4791)
- Add next_initiative_delay config option to control how frequently the miner checks if a new burnchain block has been processed (#4795)
- Various performance improvements and cleanup

### Changed

- Downgraded log messages about transactions from warning to info (#4697)
- Fix race condition between the signer binary and the /v2/pox endpoint (#4738)
- Make node config mock_miner item hot-swappable (#4743)
- Mandates that a burnchain block header be resolved by a BurnchainHeaderReader, which will resolve a block height to at most one burnchain header (#4748)
- Optional config option to resolve DNS of bootstrap nodes (#4749)
- Limit inventory syncs with new peers (#4750)
- Update /v2/fees/transfer to report the median transaction fee estimate for a STX-transfer of 180 bytes (#4754)
- Reduce connection spamming in stackerdb (#4759)
- Remove deprecated signer cli commands (#4772)
- Extra pair of signer slots got introduced at the epoch 2.5 boundary (#4845, #4868, #4891)
- Never consider Stacks chain tips that are not on the canonical burn chain #4886 (#4893)


## [2.5.0.0.3]

This release fixes a regression in `2.5.0.0.0` from `2.4.0.1.0` caused by git merge
Expand Down
20 changes: 20 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @stacks-network/blockchain-team-codeowners will be requested for
# review when someone opens a pull request.
* @stacks-network/blockchain-team-codeowners

# Generic file extensions that shouldn't require much scrutiny. Anyone with write access to the repo may approve a PR
*.md @stacks-network/blockchain-team
*.yml @stacks-network/blockchain-team
*.yaml @stacks-network/blockchain-team
*.txt @stacks-network/blockchain-team
*.toml @stacks-network/blockchain-team

# Signer code
libsigner/**/*.rs @stacks-network/blockchain-team-signer
stacks-signer/**/*.rs @stacks-network/blockchain-team-signer

# CI workflows
./github/workflows/ @stacks-network/blockchain-team-ci
./github/actions/ @stacks-network/blockchain-team-ci
6 changes: 6 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apk add --no-cache musl-dev

RUN mkdir /out

RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json --release
RUN cargo build --features monitoring_prom,slog_json --release

RUN cp target/release/stacks-node /out

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY . .

RUN mkdir /out

RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json --release
RUN cargo build --features monitoring_prom,slog_json --release

RUN cp target/release/stacks-node /out

Expand Down
10 changes: 6 additions & 4 deletions clarity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ regex = "1"
lazy_static = "1.4.0"
integer-sqrt = "0.1.3"
slog = { version = "2.5.2", features = [ "max_level_trace" ] }
stacks_common = { package = "stacks-common", path = "../stacks-common" }
stacks_common = { package = "stacks-common", path = "../stacks-common", optional = true, default-features = false }
rstest = "0.17.0"
rstest_reuse = "0.5.0"
hashbrown = { workspace = true }
Expand All @@ -39,6 +39,7 @@ features = ["arbitrary_precision", "unbounded_depth"]

[dependencies.rusqlite]
version = "=0.24.2"
optional = true
features = ["blob", "serde_json", "i128_blob", "bundled", "trace"]

[dependencies.time]
Expand All @@ -52,8 +53,9 @@ assert-json-diff = "1.0.0"
# criterion = "0.3"

[features]
default = []
developer-mode = []
default = ["canonical"]
canonical = ["rusqlite", "stacks_common/canonical"]
developer-mode = ["stacks_common/developer-mode"]
slog_json = ["stacks_common/slog_json"]
testing = []
testing = ["canonical"]
devtools = []
2 changes: 1 addition & 1 deletion clarity/src/vm/analysis/arithmetic_checker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl<'a> ArithmeticOnlyChecker<'a> {
{
match native_var {
ContractCaller | TxSender | TotalLiquidMicroSTX | BlockHeight | BurnBlockHeight
| Regtest | TxSponsor | Mainnet | ChainId => {
| Regtest | TxSponsor | Mainnet | ChainId | StacksBlockHeight | TenureHeight => {
Err(Error::VariableForbidden(native_var))
}
NativeNone | NativeTrue | NativeFalse => Ok(()),
Expand Down
3 changes: 2 additions & 1 deletion clarity/src/vm/analysis/arithmetic_checker/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ use stacks_common::types::StacksEpochId;

use crate::vm::analysis::arithmetic_checker::Error::*;
use crate::vm::analysis::arithmetic_checker::{ArithmeticOnlyChecker, Error};
use crate::vm::analysis::{mem_type_check, ContractAnalysis};
use crate::vm::analysis::ContractAnalysis;
use crate::vm::ast::parse;
use crate::vm::costs::LimitedCostTracker;
use crate::vm::functions::define::DefineFunctions;
use crate::vm::functions::NativeFunctions;
use crate::vm::tests::test_clarity_versions;
use crate::vm::tooling::mem_type_check;
use crate::vm::types::QualifiedContractIdentifier;
use crate::vm::variables::NativeVariables;
use crate::vm::ClarityVersion;
Expand Down
2 changes: 2 additions & 0 deletions clarity/src/vm/analysis/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ pub enum CheckErrors {
GetBurnBlockInfoExpectPropertyName,

NameAlreadyUsed(String),
ReservedWord(String),

// expect a function, or applying a function to a list
NonFunctionApplication,
Expand Down Expand Up @@ -408,6 +409,7 @@ impl DiagnosableError for CheckErrors {
CheckErrors::GetBlockInfoExpectPropertyName => "missing property name for block info introspection".into(),
CheckErrors::GetBurnBlockInfoExpectPropertyName => "missing property name for burn block info introspection".into(),
CheckErrors::NameAlreadyUsed(name) => format!("defining '{}' conflicts with previous value", name),
CheckErrors::ReservedWord(name) => format!("{name} is a reserved word"),
CheckErrors::NonFunctionApplication => "expecting expression of type function".into(),
CheckErrors::ExpectedListApplication => "expecting expression of type list".into(),
CheckErrors::ExpectedSequence(found_type) => format!("expecting expression of type 'list', 'buff', 'string-ascii' or 'string-utf8' - found '{}'", found_type),
Expand Down
5 changes: 4 additions & 1 deletion clarity/src/vm/analysis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ use self::type_checker::v2_1::TypeChecker as TypeChecker2_1;
pub use self::types::{AnalysisPass, ContractAnalysis};
use crate::vm::ast::{build_ast_with_rules, ASTRules};
use crate::vm::costs::LimitedCostTracker;
use crate::vm::database::{MemoryBackingStore, STORE_CONTRACT_SRC_INTERFACE};
#[cfg(feature = "canonical")]
use crate::vm::database::MemoryBackingStore;
use crate::vm::database::STORE_CONTRACT_SRC_INTERFACE;
use crate::vm::representations::SymbolicExpression;
use crate::vm::types::{QualifiedContractIdentifier, TypeSignature};
use crate::vm::ClarityVersion;

/// Used by CLI tools like the docs generator. Not used in production
#[cfg(feature = "canonical")]
pub fn mem_type_check(
snippet: &str,
version: ClarityVersion,
Expand Down
2 changes: 1 addition & 1 deletion clarity/src/vm/analysis/trait_checker/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ fn test_dynamic_dispatch_pass_bound_principal_as_trait_in_user_defined_functions
_ => panic!("{:?}", err),
};
}
Ok(_) if version == ClarityVersion::Clarity2 => (),
Ok(_) if version >= ClarityVersion::Clarity2 => (),
_ => panic!("got {:?}", result),
}
}
Expand Down
Loading

0 comments on commit 35d0840

Please sign in to comment.