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

chore: upgrade clarinet and clarity dependencies #463

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,319 changes: 1,194 additions & 125 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions components/chainhook-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ redis = "0.21.5"
serde-redis = "0.12.0"
hex = "0.4.3"
rand = "0.8.5"
chainhook-sdk = { version = "0.11.0", default-features = false, features = [
chainhook-sdk = { version = "0.12.0", default-features = false, features = [
"zeromq",
], path = "../chainhook-sdk" }
hiro-system-kit = "0.3.1"
Expand Down Expand Up @@ -52,7 +52,6 @@ features = ["lz4", "snappy"]
[dev-dependencies]
criterion = "0.3"
redis = "0.21.5"
clarity-vm = "=2.1.1"
hex = "0.4.3"
test-case = "3.1.0"
serial_test = "2.0.0"
Expand Down
9 changes: 5 additions & 4 deletions components/chainhook-sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chainhook-sdk"
version = "0.11.0"
version = "0.12.0"
description = "Stateless Transaction Indexing Engine for Stacks and Bitcoin"
license = "GPL-3.0"
edition = "2021"
Expand All @@ -12,13 +12,14 @@ serde = { version = "1", features = ["rc"] }
serde_json = { version = "1", features = ["arbitrary_precision"] }
serde-hex = "0.1.0"
serde_derive = "1"
stacks-rpc-client = "2"
stacks-rpc-client = { version = "2", git = "https://github.com/hirosystems/clarinet.git", branch = "chore/upgrade-clarity-vm" }
# stacks-rpc-client = "2"
# stacks-rpc-client = { version = "1", path = "../../../clarinet/components/stacks-rpc-client" }
clarinet-utils = "1.0.0"
hiro-system-kit = { version = "0.3.1", optional = true }
# stacks-rpc-client = { version = "1", path = "../../../clarinet/components/stacks-rpc-client" }
# clarinet-utils = { version = "1", path = "../../../clarinet/components/clarinet-utils" }
# hiro-system-kit = { version = "0.1.0", path = "../../../clarinet/components/hiro-system-kit" }
chainhook-types = { version = "1.2.0", path = "../chainhook-types-rs" }
chainhook-types = { version = "1.3.0", path = "../chainhook-types-rs" }
rocket = { version = "=0.5.0-rc.3", features = ["json"] }
bitcoincore-rpc = "0.16.0"
bitcoincore-rpc-json = "0.16.0"
Expand Down
2 changes: 1 addition & 1 deletion components/chainhook-sdk/src/chainhooks/stacks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use hiro_system_kit::slog;
use regex::Regex;
use reqwest::{Client, Method};
use serde_json::Value as JsonValue;
use stacks_rpc_client::clarity::stacks_common::codec::StacksMessageCodec;
use stacks_rpc_client::clarity::codec::StacksMessageCodec;
use stacks_rpc_client::clarity::vm::types::{CharType, SequenceData, Value as ClarityValue};
use std::collections::{BTreeMap, HashMap};
use std::io::Cursor;
Expand Down
12 changes: 9 additions & 3 deletions components/chainhook-sdk/src/indexer/stacks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use chainhook_types::*;
use hiro_system_kit::slog;
use rocket::serde::json::Value as JsonValue;
use rocket::serde::Deserialize;
use stacks_rpc_client::clarity::codec::StacksMessageCodec;
use stacks_rpc_client::clarity::codec::{StacksTransaction, TransactionAuth, TransactionPayload};
use stacks_rpc_client::clarity::stacks_common::codec::StacksMessageCodec;
use stacks_rpc_client::clarity::vm::types::{SequenceData, Value as ClarityValue};
use std::collections::{BTreeMap, HashMap, HashSet};
use std::convert::TryInto;
Expand Down Expand Up @@ -741,10 +741,16 @@ pub fn get_tx_description(
StacksTransactionKind::ContractDeployment(data),
)
}
TransactionPayload::Coinbase(_, _) => {
TransactionPayload::Coinbase(_, _, _) => {
(format!("coinbase"), StacksTransactionKind::Coinbase)
}
_ => (format!("other"), StacksTransactionKind::Unsupported),
TransactionPayload::TenureChange(_) => (
format!("tenure change"),
StacksTransactionKind::TenureChange,
),
TransactionPayload::PoisonMicroblock(_, _) => {
unimplemented!()
}
};
Ok((description, tx_type, fee, nonce, sender, sponsor))
}
Expand Down
2 changes: 1 addition & 1 deletion components/chainhook-types-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "chainhook-types"
description = "Bitcoin and Stacks data schemas, based on the Rosetta specification"
license = "MIT"
version = "1.2.0"
version = "1.3.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
1 change: 1 addition & 0 deletions components/chainhook-types-rs/src/rosetta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ pub enum StacksTransactionKind {
ContractDeployment(StacksContractDeploymentData),
NativeTokenTransfer,
Coinbase,
TenureChange,
BitcoinOp(BitcoinOpData),
Unsupported,
}
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/components/chainhook-node.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /src

RUN apt update && apt install -y ca-certificates pkg-config libssl-dev libclang-11-dev

RUN rustup update 1.70.0 && rustup default 1.70.0
RUN rustup update 1.73.0 && rustup default 1.73.0

COPY ./components/chainhook-cli /src/components/chainhook-cli

Expand All @@ -28,4 +28,4 @@ COPY --from=build /out/ /bin/

WORKDIR /workspace

ENTRYPOINT ["chainhook"]
ENTRYPOINT ["chainhook"]
Loading