Skip to content

Commit 49bbb64

Browse files
committed
Merge branch 'develop' of https://github.com/stacks-network/stacks-core into feat/send-signer-state-updates
2 parents b1cdad5 + d944d16 commit 49bbb64

File tree

35 files changed

+3772
-884
lines changed

35 files changed

+3772
-884
lines changed

.gitattributes

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
legacy/* linguist-vendored
2-
* text=lf
2+
# Enforcing 'lf' eol mainly for:
3+
# - 'stx-genesis' package, where txt files need hash computation and comparison
4+
# - 'clarity' package, where clarity language is sensitive to line endings for .clar files
5+
# anyhow, setting eol for all text files to have a homogeneous management over the whole code base
6+
* text eol=lf

.github/workflows/bitcoin-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ jobs:
106106
- test-name: tests::epoch_24::verify_auto_unlock_behavior
107107
# Disable this flaky test. We don't need continue testing Epoch 2 -> 3 transition
108108
- test-name: tests::nakamoto_integrations::flash_blocks_on_epoch_3_FLAKY
109+
# These mempool tests take a long time to run, and are meant to be run manually
110+
- test-name: tests::nakamoto_integrations::large_mempool_original_constant_fee
111+
- test-name: tests::nakamoto_integrations::large_mempool_original_random_fee
112+
- test-name: tests::nakamoto_integrations::large_mempool_next_constant_fee
113+
- test-name: tests::nakamoto_integrations::large_mempool_next_random_fee
114+
- test-name: tests::nakamoto_integrations::larger_mempool
115+
- test-name: tests::signer::v0::larger_mempool
109116

110117
steps:
111118
## Setup test environment

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
},
88
"rust-analyzer.rustfmt.extraArgs": [
99
"+nightly"
10-
]
10+
],
11+
"files.eol": "\n"
1112
}

Cargo.lock

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ _Warning, this typically takes a few minutes_
7777
cargo nextest run
7878
```
7979

80+
_On Windows, many tests will fail, mainly due to parallelism. To mitigate the issue you may need to run the tests individually._
81+
8082
## Run the testnet
8183

8284
You can observe the state machine in action locally by running:
@@ -85,8 +87,6 @@ You can observe the state machine in action locally by running:
8587
cargo run --bin stacks-node -- start --config ./sample/conf/testnet-follower-conf.toml
8688
```
8789

88-
_On Windows, many tests will fail if the line endings aren't `LF`. Please ensure that you have git's `core.autocrlf` set to `input` when you clone the repository to avoid any potential issues. This is due to the Clarity language currently being sensitive to line endings._
89-
9090
Additional testnet documentation is available [here](./docs/testnet.md) and [here](https://docs.stacks.co/docs/nodes-and-miners/miner-testnet)
9191

9292
## Release Process

stacks-common/Cargo.toml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
[package]
22
name = "stacks-common"
33
version = "0.0.1"
4-
authors = [ "Jude Nelson <[email protected]>",
5-
"Aaron Blankstein <[email protected]>",
6-
"Ludo Galabru <[email protected]>" ]
4+
authors = [
5+
"Jude Nelson <[email protected]>",
6+
"Aaron Blankstein <[email protected]>",
7+
"Ludo Galabru <[email protected]>",
8+
]
79
license = "GPLv3"
810
homepage = "https://github.com/blockstack/stacks-blockchain"
911
repository = "https://github.com/blockstack/stacks-blockchain"
1012
description = "Common modules for blockstack_lib, libclarity"
11-
keywords = [ "stacks", "stx", "bitcoin", "crypto", "blockstack", "decentralized", "dapps", "blockchain" ]
13+
keywords = [
14+
"stacks",
15+
"stx",
16+
"bitcoin",
17+
"crypto",
18+
"blockstack",
19+
"decentralized",
20+
"dapps",
21+
"blockchain",
22+
]
1223
readme = "README.md"
1324
resolver = "2"
1425
edition = "2021"
@@ -25,7 +36,7 @@ serde_derive = "1"
2536
sha3 = "0.10.1"
2637
ripemd = "0.1.1"
2738
lazy_static = "1.4.0"
28-
slog = { version = "2.5.2", features = [ "max_level_trace" ] }
39+
slog = { version = "2.5.2", features = ["max_level_trace"] }
2940
slog-term = "2.6.0"
3041
slog-json = { version = "2.3.0", optional = true }
3142
chrono = "0.4.19"
@@ -37,7 +48,12 @@ rusqlite = { workspace = true, optional = true }
3748
nix = "0.23"
3849

3950
[target.'cfg(windows)'.dependencies]
40-
winapi = { version = "0.3", features = ["consoleapi", "handleapi", "synchapi", "winbase"] }
51+
winapi = { version = "0.3", features = [
52+
"consoleapi",
53+
"handleapi",
54+
"synchapi",
55+
"winbase",
56+
] }
4157

4258
[target.'cfg(windows)'.dev-dependencies]
4359
winapi = { version = "0.3", features = ["fileapi", "processenv", "winnt"] }
@@ -65,6 +81,7 @@ libsecp256k1 = { version = "0.7.0" }
6581

6682
[dev-dependencies]
6783
rand_core = { workspace = true }
84+
proptest = "1.6.0"
6885

6986
[features]
7087
default = ["developer-mode"]

stacks-common/src/types/sqlite.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use rusqlite::types::{FromSql, FromSqlError, FromSqlResult, ToSql, ToSqlOutput, ValueRef};
1818

19-
use super::chainstate::VRFSeed;
19+
use super::chainstate::{StacksAddress, VRFSeed};
2020
use crate::deps_common::bitcoin::util::hash::Sha256dHash;
2121
use crate::types::chainstate::{
2222
BlockHeaderHash, BurnchainHeaderHash, ConsensusHash, SortitionId, StacksBlockId, TrieHash,
@@ -42,6 +42,13 @@ impl ToSql for Sha256dHash {
4242
}
4343
}
4444

45+
impl rusqlite::types::ToSql for StacksAddress {
46+
fn to_sql(&self) -> rusqlite::Result<rusqlite::types::ToSqlOutput> {
47+
let addr_str = self.to_string();
48+
Ok(addr_str.into())
49+
}
50+
}
51+
4552
// Implement rusqlite traits for a bunch of structs that used to be defined
4653
// in the chainstate code
4754
impl_byte_array_rusqlite_only!(ConsensusHash);

0 commit comments

Comments
 (0)