Skip to content

Commit

Permalink
Merge branch 'next' into draft/multisig-order-independence
Browse files Browse the repository at this point in the history
  • Loading branch information
jbencin authored Mar 26, 2024
2 parents 857be7f + aaab6bc commit 80a3565
Show file tree
Hide file tree
Showing 145 changed files with 17,971 additions and 3,882 deletions.
7 changes: 3 additions & 4 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
stacks-node = "run --package stacks-node --"
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"

# For x86_64 CPUs, default to `native` and override in CI for release builds
# This makes it slightly faster for users running locally built binaries.
# Default to `native`
# This makes it slightly faster for running tests and locally built binaries.
# This can cause trouble when building "portable" binaries, such as for docker,
# so disable it with the "portable" feature.
# TODO: Same for other targets?
[target.'cfg(all(target_arch = "x86_64", not(feature = portable))']
[target.'cfg(not(feature = "portable"))']
rustflags = ["-Ctarget-cpu=native"]

# Needed by perf to generate flamegraphs.
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/atlas-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,17 @@ jobs:
uses: stacks-network/actions/codecov@main
with:
test-name: ${{ matrix.test-name }}

check-tests:
name: Check Tests
runs-on: ubuntu-latest
if: always()
needs:
- atlas-tests
steps:
- name: Check Tests Status
id: check_tests_status
uses: stacks-network/actions/check-jobs-status@main
with:
jobs: ${{ toJson(needs) }}
summary_print: "true"
20 changes: 20 additions & 0 deletions .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- tests::neon_integrations::size_overflow_unconfirmed_stream_microblocks_integration_test
- tests::neon_integrations::stx_delegate_btc_integration_test
- tests::neon_integrations::stx_transfer_btc_integration_test
- tests::neon_integrations::stack_stx_burn_op_test
- tests::neon_integrations::test_chainwork_first_intervals
- tests::neon_integrations::test_chainwork_partial_interval
- tests::neon_integrations::test_flash_block_skip_tenure
Expand All @@ -71,18 +72,23 @@ jobs:
- tests::neon_integrations::confirm_unparsed_ongoing_ops
- tests::neon_integrations::min_txs
- tests::neon_integrations::vote_for_aggregate_key_burn_op_test
- tests::epoch_25::microblocks_disabled
- tests::should_succeed_handling_malformed_and_valid_txs
- tests::nakamoto_integrations::simple_neon_integration
- tests::nakamoto_integrations::mine_multiple_per_tenure_integration
- tests::nakamoto_integrations::block_proposal_api_endpoint
- tests::nakamoto_integrations::miner_writes_proposed_block_to_stackerdb
- tests::nakamoto_integrations::correct_burn_outs
- tests::nakamoto_integrations::vote_for_aggregate_key_burn_op
- tests::nakamoto_integrations::follower_bootup
- tests::signer::stackerdb_dkg
- tests::signer::stackerdb_sign
- tests::signer::stackerdb_block_proposal
- tests::signer::stackerdb_filter_bad_transactions
- tests::signer::stackerdb_mine_2_nakamoto_reward_cycles
- tests::nakamoto_integrations::stack_stx_burn_op_integration_test
# Do not run this one until we figure out why it fails in CI
# - tests::neon_integrations::bitcoin_reorg_flap
steps:
## Setup test environment
- name: Setup Test Environment
Expand All @@ -107,3 +113,17 @@ jobs:
uses: stacks-network/actions/codecov@main
with:
test-name: ${{ matrix.test-name }}

check-tests:
name: Check Tests
runs-on: ubuntu-latest
if: always()
needs:
- integration-tests
steps:
- name: Check Tests Status
id: check_tests_status
uses: stacks-network/actions/check-jobs-status@main
with:
jobs: ${{ toJson(needs) }}
summary_print: "true"
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,9 @@ jobs:
##
## Runs when the following is true:
## - tag is provided
## - workflow is building default branch (master)
create-release:
if: |
inputs.tag != '' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
inputs.tag != ''
name: Create Release
needs:
- rustfmt
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/create-source-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ concurrency:
jobs:
## Runs when the following is true:
## - tag is provided
## - workflow is building default branch (master)
artifact:
if: |
inputs.tag != '' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
inputs.tag != ''
name: Build Binaries
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -60,4 +58,3 @@ jobs:
arch: ${{ matrix.arch }}
cpu: ${{ matrix.cpu }}
tag: ${{ inputs.tag }}

14 changes: 14 additions & 0 deletions .github/workflows/epoch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,17 @@ jobs:
uses: stacks-network/actions/codecov@main
with:
test-name: ${{ matrix.test-name }}

check-tests:
name: Check Tests
runs-on: ubuntu-latest
if: always()
needs:
- epoch-tests
steps:
- name: Check Tests Status
id: check_tests_status
uses: stacks-network/actions/check-jobs-status@main
with:
jobs: ${{ toJson(needs) }}
summary_print: "true"
17 changes: 4 additions & 13 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ jobs:
##
## Runs when the following is true:
## - tag is provided
## - workflow is building default branch (master)
build-binaries:
if: |
inputs.tag != '' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
inputs.tag != ''
name: Build Binaries
uses: ./.github/workflows/create-source-binary.yml
with:
Expand All @@ -41,8 +39,7 @@ jobs:
## - workflow is building default branch (master)
create-release:
if: |
inputs.tag != '' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
inputs.tag != ''
name: Create Release
runs-on: ubuntu-latest
needs:
Expand All @@ -59,12 +56,7 @@ jobs:
## Generate a checksums file to be added to the release page
- name: Generate Checksums
id: generate_checksum
uses: jmgilman/actions-generate-checksum@24a35957fba81c6cbaefeb1e3d59ee56e3db5077 # v1.0.0
with:
method: sha512
output: CHECKSUMS.txt
patterns: |
release/*.zip
uses: stacks-network/actions/generate-checksum@main

## Upload the release archives with the checksums file
- name: Upload Release
Expand All @@ -89,8 +81,7 @@ jobs:
## - workflow is building default branch (master)
docker-image:
if: |
inputs.tag != '' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
inputs.tag != ''
name: Docker Image (Binary)
uses: ./.github/workflows/image-build-binary.yml
needs:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/image-build-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
## - workflow is building default branch (master)
image:
if: |
inputs.tag != '' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
inputs.tag != ''
name: Build Image
runs-on: ubuntu-latest
strategy:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/slow-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,17 @@ jobs:
uses: stacks-network/actions/codecov@main
with:
test-name: ${{ matrix.test-name }}

check-tests:
name: Check Tests
runs-on: ubuntu-latest
if: always()
needs:
- slow-tests
steps:
- name: Check Tests Status
id: check_tests_status
uses: stacks-network/actions/check-jobs-status@main
with:
jobs: ${{ toJson(needs) }}
summary_print: "true"
16 changes: 16 additions & 0 deletions .github/workflows/stacks-core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,19 @@ jobs:
with:
args: test --manifest-path=./contrib/core-contract-tests/Clarinet.toml contrib/core-contract-tests/tests/bns/name_register_test.ts

check-tests:
name: Check Tests
runs-on: ubuntu-latest
if: always()
needs:
- full-genesis
- unit-tests
- open-api-validation
- core-contracts-clarinet-test
steps:
- name: Check Tests Status
id: check_tests_status
uses: stacks-network/actions/check-jobs-status@main
with:
jobs: ${{ toJson(needs) }}
summary_print: "true"
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
- Functions that include a `signer-key` parameter also include a `signer-sig` parameter to demonstrate that the owner of `signer-key` is approving that particular Stacking operation. For more details, refer to the `verify-signer-key-sig` method in the `pox-4` contract.
- Signer key authorizations can be added via `set-signer-key-authorization` to omit the need for `signer-key` signatures
- A `max-amount` field is a field in signer key authorizations and defines the maximum amount of STX that can be locked in a single transaction.
- Added configuration parameters to customize the burn block at which to start processing Stacks blocks, when running on testnet or regtest.
```
[burnchain]
first_burn_block_height = 2582526
first_burn_block_timestamp = 1710780828
first_burn_block_hash = "000000000000001a17c68d43cb577d62074b63a09805e4a07e829ee717507f66"
```

### Modified

Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ is responsible for:
6. Merging the new PR.

For an example of this process, see PRs
[#3598](https://github.com/stacks-network/stacks-blockchain/pull/3598) and
[#3626](https://github.com/stacks-network/stacks-blockchain/pull/3626).
[#3598](https://github.com/stacks-network/stacks-core/pull/3598) and
[#3626](https://github.com/stacks-network/stacks-core/pull/3626).


### Documentation Updates
Expand Down Expand Up @@ -226,7 +226,7 @@ Contributions should not contain `unsafe` blocks if at all possible.
## Documentation

* Each file must have a **copyright statement**.
* Any new non-test modules should have **module-level documentation** explaining what the module does, and how it fits into the blockchain as a whole ([example](https://github.com/stacks-network/stacks-blockchain/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L17)).
* Any new non-test modules should have **module-level documentation** explaining what the module does, and how it fits into the blockchain as a whole ([example](https://github.com/stacks-network/stacks-core/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L17)).
* Any new files must have some **top-of-file documentation** that describes what the contained code does, and how it fits into the overall module.

Within the source files, the following **code documentation** standards are expected:
Expand All @@ -247,7 +247,7 @@ Within the source files, the following **code documentation** standards are expe
handle I/O reads and writes in an "outer" function. The "outer"
function only does the needful I/O and passes the data into the
"inner" function. The "inner" function is often private, whereas
the "outer" function is often public. For example, [`inner_try_mine_microblock` and `try_mine_microblock`](https://github.com/stacks-network/stacks-blockchain/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L1148-L1216).
the "outer" function is often public. For example, [`inner_try_mine_microblock` and `try_mine_microblock`](https://github.com/stacks-network/stacks-core/blob/4852d6439b473e24705f14b8af637aded33cb422/testnet/stacks-node/src/neon_node.rs#L1148-L1216).

## Refactoring

Expand Down Expand Up @@ -281,7 +281,7 @@ Within the source files, the following **code documentation** standards are expe
does not decode with the allotted resources, then no further
processing may be done and the data is discarded. For an example, see
how the parsing functions in the http module use `BoundReader` and
`MAX_PAYLOAD_LEN` in [http.rs](https://github.com/stacks-network/stacks-blockchain/blob/4852d6439b473e24705f14b8af637aded33cb422/src/net/http.rs#L2260-L2285).
`MAX_PAYLOAD_LEN` in [http.rs](https://github.com/stacks-network/stacks-core/blob/4852d6439b473e24705f14b8af637aded33cb422/src/net/http.rs#L2260-L2285).

* **All network input reception is time-bound.** Every piece of code that ingests data _from the network_ must impose a maximum amount of time that ingestion can take. If the data takes too long to arrive, then it must be discarded without any further processing. There is no time bound for data ingested from disk or passed as an argument; this requirement is meant by the space-bound requirement.

Expand All @@ -303,7 +303,7 @@ Changes to the peer network should be deployed incrementally and tested by multi

Any PRs that claim to improve performance **must ship with reproducible benchmarks** that accurately measure the improvement. This data must also be reported in the PR submission.

For an example, see [PR #3075](https://github.com/stacks-network/stacks-blockchain/pull/3075).
For an example, see [PR #3075](https://github.com/stacks-network/stacks-core/pull/3075).

## Error Handling

Expand Down Expand Up @@ -597,7 +597,7 @@ Keep in mind that better variable names can reduce the need for comments, e.g.:

# Licensing and contributor license agreement

`stacks-blockchain` is released under the terms of the GPL version 3. Contributions
`stacks-core` is released under the terms of the GPL version 3. Contributions
that are not licensed under compatible terms will be rejected. Moreover,
contributions will not be accepted unless _all_ authors accept the project's
contributor license agreement.
Expand Down
Loading

0 comments on commit 80a3565

Please sign in to comment.