Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/upgrade devnet #1384

Merged
merged 13 commits into from
Mar 22, 2024
523 changes: 409 additions & 114 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions components/clarinet-cli/src/generate/project.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use clarinet_files::{
DEFAULT_BITCOIN_EXPLORER_IMAGE, DEFAULT_BITCOIN_NODE_IMAGE, DEFAULT_DERIVATION_PATH,
DEFAULT_EPOCH_2_0, DEFAULT_EPOCH_2_05, DEFAULT_EPOCH_2_1, DEFAULT_EPOCH_2_2, DEFAULT_EPOCH_2_3,
DEFAULT_EPOCH_2_4, DEFAULT_EPOCH_2_5, DEFAULT_EPOCH_3_0, DEFAULT_FAUCET_MNEMONIC,
DEFAULT_POSTGRES_IMAGE, DEFAULT_STACKS_API_IMAGE, DEFAULT_STACKS_EXPLORER_IMAGE,
DEFAULT_STACKS_MINER_MNEMONIC, DEFAULT_STACKS_NODE_IMAGE, DEFAULT_SUBNET_API_IMAGE,
DEFAULT_SUBNET_CONTRACT_ID, DEFAULT_SUBNET_MNEMONIC, DEFAULT_SUBNET_NODE_IMAGE,
DEFAULT_EPOCH_2_4, DEFAULT_EPOCH_2_5, DEFAULT_FAUCET_MNEMONIC, DEFAULT_POSTGRES_IMAGE,
DEFAULT_STACKS_API_IMAGE, DEFAULT_STACKS_EXPLORER_IMAGE, DEFAULT_STACKS_MINER_MNEMONIC,
DEFAULT_STACKS_NODE_IMAGE, DEFAULT_SUBNET_API_IMAGE, DEFAULT_SUBNET_CONTRACT_ID,
DEFAULT_SUBNET_MNEMONIC, DEFAULT_SUBNET_NODE_IMAGE,
};

use super::changes::{Changes, DirectoryCreation, FileCreation};
Expand Down Expand Up @@ -410,7 +410,6 @@ disable_stacks_api = false
# epoch_2_3 = {DEFAULT_EPOCH_2_3}
# epoch_2_4 = {DEFAULT_EPOCH_2_4}
# epoch_2_5 = {DEFAULT_EPOCH_2_5}
# epoch_3_0 = {DEFAULT_EPOCH_3_0}


# Send some stacking orders
Expand Down
23 changes: 18 additions & 5 deletions components/clarinet-files/src/network_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ pub const DEFAULT_DERIVATION_PATH: &str = "m/44'/5757'/0'/0/0";
pub const DEFAULT_STACKS_NODE_IMAGE: &str = "quay.io/hirosystems/stacks-node:devnet-2.4.0.0.0";
pub const DEFAULT_STACKS_API_IMAGE: &str = "hirosystems/stacks-blockchain-api:latest";
// Nakamoto images overrides
pub const DEFAULT_STACKS_NODE_IMAGE_NAKA: &str = "blockstack/stacks-blockchain:devnet-next-stable";
pub const DEFAULT_STACKS_API_IMAGE_NAKA: &str =
"hirosystems/stacks-blockchain-api:7.9.0-nakamoto.1";
pub const DEFAULT_STACKS_NODE_IMAGE_NAKA: &str =
"quay.io/hirosystems/stacks-node:devnet-with-signer-beta4";
pub const DEFAULT_STACKS_API_IMAGE_NAKA: &str = "hirosystems/stacks-blockchain-api:7.10.0-beta.1";

pub const DEFAULT_BITCOIN_NODE_IMAGE: &str = "quay.io/hirosystems/bitcoind:26.0";
pub const DEFAULT_BITCOIN_EXPLORER_IMAGE: &str = "quay.io/hirosystems/bitcoin-explorer:devnet";
Expand All @@ -46,8 +46,9 @@ pub const DEFAULT_EPOCH_2_1: u64 = 101;
pub const DEFAULT_EPOCH_2_2: u64 = 102;
pub const DEFAULT_EPOCH_2_3: u64 = 103;
pub const DEFAULT_EPOCH_2_4: u64 = 104;
pub const DEFAULT_EPOCH_2_5: u64 = 105;
pub const DEFAULT_EPOCH_3_0: u64 = 121;
pub const DEFAULT_EPOCH_2_5: u64 = 108;
// Epoch 3.0 isn't stable for now, let's focus on running 2.5
pub const DEFAULT_EPOCH_3_0: u64 = 100001;

// Currently, the pox-4 contract has these values hardcoded:
// https://github.com/stacks-network/stacks-core/blob/e09ab931e2f15ff70f3bb5c2f4d7afb[…]42bd7bec6/stackslib/src/chainstate/stacks/boot/pox-testnet.clar
Expand Down Expand Up @@ -116,6 +117,7 @@ pub struct DevnetConfigFile {
pub bitcoin_node_image_url: Option<String>,
pub bitcoin_explorer_image_url: Option<String>,
pub stacks_node_image_url: Option<String>,
pub stacks_signer_image_url: Option<String>,
pub stacks_api_image_url: Option<String>,
pub stacks_explorer_image_url: Option<String>,
pub postgres_image_url: Option<String>,
Expand Down Expand Up @@ -275,6 +277,7 @@ pub struct DevnetConfig {
pub execute_script: Vec<ExecuteScript>,
pub bitcoin_node_image_url: String,
pub stacks_node_image_url: String,
pub stacks_signer_image_url: String,
pub stacks_api_image_url: String,
pub stacks_explorer_image_url: String,
pub postgres_image_url: String,
Expand Down Expand Up @@ -893,6 +896,16 @@ impl NetworkManifest {
}
},
),
stacks_signer_image_url: devnet_config
.stacks_signer_image_url
.take()
.unwrap_or_else(|| {
if devnet_config.use_nakamoto.unwrap_or(false) {
DEFAULT_STACKS_NODE_IMAGE_NAKA.to_string()
hugocaillard marked this conversation as resolved.
Show resolved Hide resolved
} else {
DEFAULT_STACKS_NODE_IMAGE.to_string()
}
}),
stacks_api_image_url: devnet_config.stacks_api_image_url.take().unwrap_or_else(
|| {
if devnet_config.use_nakamoto.unwrap_or(false) {
Expand Down
11 changes: 4 additions & 7 deletions components/clarity-jupyter-kernel/src/jupyter/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,10 @@ impl Server {
.send(&mut *self.iopub.lock().unwrap())?;
let mut has_error = false;
for code in split_code_and_command(src) {
match self.session.formatted_interpretation(
code.to_string(),
None,
false,
None,
None,
) {
match self
.session
.formatted_interpretation(code.to_string(), None, false, None)
{
Ok((result, _)) => {
let res = result.join("\n");
let mut data: HashMap<String, JsonValue> = HashMap::new();
Expand Down
10 changes: 6 additions & 4 deletions components/stacks-network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
atty = "0.2.14"
ansi_term = "0.12.1"
bollard = "0.15.0"
bollard = "0.16.0"
bytes = "1.4.0"
bitcoin = "0.29.2"
bitcoincore-rpc = "0.16.0"
Expand All @@ -31,18 +31,20 @@ chrono = "0.4.31"
futures = "0.3.12"
base58 = "0.2.0"
tokio = { version = "1.35.1", features = ["full"] }
dirs = { version = "4.0.0" }
clap = { version = "4.4.8", features = ["derive"] }
serde_yaml = "0.8.23"

stackslib = { git = "https://github.com/stacks-network/stacks-core.git", branch="feat/clarity-wasm-next", package = "stackslib" }
chainhook-sdk = { default-features = true, git = "https://github.com/hirosystems/chainhook.git", branch="chore/update-clarinet-and-clarity" }
# chainhook-sdk = { version = "=0.11", default-features = true }

stacks-rpc-client = { path = "../stacks-rpc-client" }
clarinet-files = { path = "../clarinet-files", features = ["cli"] }
clarinet-deployments = { path = "../clarinet-deployments", features = ["cli"] }
clarinet-utils = { path = "../clarinet-utils" }
hiro-system-kit = { path = "../hiro-system-kit", features = ["log"] }
clarity-repl = { path = "../clarity-repl", features = ["cli"] }
dirs = { version = "4.0.0" }
clap = { version = "4.4.8", features = ["derive"] }
serde_yaml = "0.8.23"

[lib]
name = "stacks_network"
Expand Down
Loading
Loading