Skip to content

Commit 4620135

Browse files
committed
Merge remote-tracking branch 'stacks-network/develop' into feat/shadow-marf
2 parents ffaf9e5 + 4747f97 commit 4620135

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+677
-209
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[alias]
22
stacks-node = "run --package stacks-node --"
33
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
4-
clippy-stacks = "clippy -p stx-genesis -p libstackerdb -p stacks-signer -p pox-locking -p clarity-serialization -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings"
4+
clippy-stacks = "clippy -p stx-genesis -p libstackerdb -p stacks-signer -p pox-locking -p clarity-types -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings"
55
clippy-stackslib = "clippy -p stackslib --no-deps -- -Aclippy::all -Wclippy::indexing_slicing -Wclippy::nonminimal_bool -Wclippy::clone_on_copy"
66

77
# Uncomment to improve performance slightly, at the cost of portability

.github/workflows/cargo-hack-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
run: |
9393
cargo hack check \
9494
-p clarity \
95-
-p clarity-serialization \
95+
-p clarity-types \
9696
-p stacks-common \
9797
--each-feature \
9898
--no-dev-deps \
@@ -102,7 +102,7 @@ jobs:
102102
- name: Run cargo hack check (WASM Deterministic)
103103
run: |
104104
cargo hack check \
105-
-p clarity-serialization \
105+
-p clarity-types \
106106
-p stacks-common \
107107
--each-feature \
108108
--no-dev-deps \

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
99

1010
### Added
1111

12+
- Renamed `clarity-serialization` to `clarity-types`.
1213
- Add `stackerdb_timeout_secs` to miner config for limiting duration of StackerDB HTTP requests.
1314
- When determining a global transaction replay set, the state evaluator now uses a longest-common-prefix algorithm to find a replay set in the case where a single replay set has less than 70% of signer weight.
1415
- New endpoint /v3/tenures/blocks/ allowing retrieving the list of stacks blocks from a burn block
1516
- Creates epoch 3.3 and costs-4 in preparation for a hardfork to activate Clarity 4
1617
- Adds support for new Clarity 4 builtins (not activated until epoch 3.3):
1718
- `contract-hash?`
19+
- `to-ascii?`
1820
- Added `contract_cost_limit_percentage` to the miner config file — sets the percentage of a block’s execution cost at which, if a large non-boot contract call would cause a BlockTooBigError, the miner will stop adding further non-boot contract calls and only include STX transfers and boot contract calls for the remainder of the block.
1921

2022
### Changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ members = [
44
"stackslib",
55
"stacks-common",
66
"pox-locking",
7-
"clarity-serialization",
7+
"clarity-types",
88
"clarity",
99
"stx-genesis",
1010
"libstackerdb",

clarity-serialization/Cargo.toml renamed to clarity-types/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
2-
name = "clarity-serialization"
2+
name = "clarity-types"
33
version = "0.0.1"
44
edition = "2024"
5-
description = "Serialization and deserialization for Stacks Clarity smart contract language types."
5+
description = "Canonical Rust representations for Clarity's core data types, error definitions, and serialization format."
66
license = "GPLv3"
77
homepage = "https://github.com/stacks-network/stacks-core"
88
repository = "https://github.com/stacks-network/stacks-core"

clarity-serialization/README.md renamed to clarity-types/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Clarity Serialization (`clarity-serialization`)
1+
# Clarity Types (`clarity-types`)
22

33
[![License: GPLv3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
44

5-
A Rust crate for representing, serializing, and deserializing data types from the Stacks Clarity smart contract language.
5+
A Rust crate for representing all core data types, errors, and serializable structures of the Stacks Clarity smart contract language.
66

77
## Overview
88

@@ -13,6 +13,7 @@ This crate provides the core components for working with Clarity data structures
1313
* **Canonical Data Structures**: Rust representations for all Clarity types, including `int`, `uint`, `bool`, `principal`, `optional`, `response`, `tuple`, `list`, `buffer`, and strings.
1414
* **Consensus-Compatible Binary Codec**: Implements the binary serialization and deserialization format required by the Stacks blockchain.
1515
* **Type Safety**: Includes type-checking logic (`admits`, `least_supertype`) for validating values against type signatures.
16+
* **Canonical Errors**: The definitive enums for all static analysis, runtime, and internal errors that can occur during Clarity execution.
1617

1718
## Quick Start: Usage Examples
1819

@@ -21,7 +22,7 @@ This crate provides the core components for working with Clarity data structures
2122
This example demonstrates how to construct a complex Clarity `(tuple)` and serialize it to its hexadecimal string representation, which is suitable for use as a transaction argument.
2223

2324
```rust
24-
use clarity_serialization::types::{PrincipalData, TupleData, Value};
25+
use clarity_types::types::{PrincipalData, TupleData, Value};
2526

2627
fn main() -> Result<(), Box<dyn std::error::Error>> {
2728
// 1. Construct the individual values that will go into our tuple.
@@ -64,7 +65,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
6465
This example shows the reverse process: taking a hex string and deserializing it into a structured `Value` object, while validating it against an expected type.
6566

6667
```rust
67-
use clarity_serialization::types::{TypeSignature, Value};
68+
use clarity_types::types::{TypeSignature, Value};
6869

6970
fn main() -> Result<(), Box<dyn std::error::Error>> {
7071
let hex_string = "0c000000030269640100000000000000000000000000000065086d657461646174610a0200000004deadbeef056f776e65720514a46ff88886c2ef9762d970b4d2c63678835bd39d";
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)