Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
b573b0b
fix clippy result_large_err
Jiloc Aug 7, 2025
763483e
Merge branch 'feat/clarity-depend-on-clarity-serialization' into fix/…
Jiloc Aug 7, 2025
708b099
Merge branch 'feat/clarity-depend-on-clarity-serialization' into fix/…
Jiloc Aug 7, 2025
237bbe5
Add contract_cost_limit_percentage to MempoolWalkSettings
jferrant Aug 19, 2025
3823074
Add contract_limit_percentage_mempool_strategy test
jferrant Aug 19, 2025
c76ab10
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Aug 26, 2025
39f94b1
CRC: add more explicit tests to both a low and high contract_cost_lim…
jferrant Aug 27, 2025
17304dd
CRC: fix typo and enable contract_cost_limit_percentage of 0
jferrant Aug 27, 2025
904eb16
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 3, 2025
c30ff99
CRC: mine a BTC block to reset the tenure limits
jferrant Sep 3, 2025
2e99e7c
CRC: mine one small and one big contract call to make cost estimate a…
jferrant Sep 3, 2025
cf3be67
CRC: remove accidental debugging log
jferrant Sep 3, 2025
a299e27
Cleanup tests
jferrant Sep 4, 2025
cb798c2
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 4, 2025
56fa7c0
Add back accidental removal of reset on loop
jferrant Sep 4, 2025
fe530ff
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 5, 2025
2a3da9d
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 5, 2025
1f79ecd
CRC: use make_big_read_count_contract
jferrant Sep 5, 2025
018811b
refactor: review send_transaction and using new rpc send_raw_transact…
fdefelici Sep 8, 2025
e9715e4
chore: remove unused BitcoinRPCRequest::send_raw_transaction, #6387
fdefelici Sep 8, 2025
9f57ef1
chore: use tx reference in send_transaction, #6387
fdefelici Sep 8, 2025
933fe1e
refactor: replace SerializeTx with serialize(..) func, #6387
fdefelici Sep 8, 2025
cd3cdb8
chore: remove unused SerializedTx, #6387
fdefelici Sep 8, 2025
65f0e40
added nonce variation check for signers
rdeioris Sep 8, 2025
926d709
Merge branch 'chore/fix-unused-import-warn' into refactor/btc-rpc-rol…
fdefelici Sep 8, 2025
fd1e379
chore: remove unused imports
fdefelici Sep 8, 2025
632db84
refactor: remove custom Txid-Sha256dHash conversion using built-in on…
fdefelici Sep 8, 2025
ff397bc
Fix tenure extend logic by adding in a new error type
jferrant Sep 8, 2025
5a1bdb4
Fix changelog
jferrant Sep 8, 2025
75e656e
Merge branch 'develop' into refactor/btc-rpc-rollout-step6-6387
fdefelici Sep 9, 2025
a088c5b
added /v3/tenures/blocks/hash/ endpoint
rdeioris Sep 8, 2025
7cf0f53
added gettenureblocksbyhash.rs
rdeioris Sep 8, 2025
86fa433
added tests for querying by block hash
rdeioris Sep 9, 2025
88a7438
test file
rdeioris Sep 9, 2025
eb1223f
added query by bitcoin block height
rdeioris Sep 9, 2025
b9b1791
fixed openapi
rdeioris Sep 9, 2025
cf9f067
fixed formatting
rdeioris Sep 9, 2025
f6d5f22
set nonce functions to be test only
rdeioris Sep 9, 2025
80f8b9c
Merge branch 'develop' into fix/clarity-result_large_err
Jiloc Sep 9, 2025
d78b991
crc: restore error log, #6387
fdefelici Sep 9, 2025
0506804
crc: fix doc, #6387
fdefelici Sep 9, 2025
1cc3e37
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 9, 2025
5fe1bc3
Fix tests::signer::v0::tx_replay_btc_on_stx_invalidation
jferrant Sep 9, 2025
5a51194
CRC: fix typo
jferrant Sep 9, 2025
6653f4c
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 9, 2025
2eec312
feat: early exit for top-level undefined errors
hstove Sep 9, 2025
090cb65
fixed copyright
rdeioris Sep 10, 2025
595092a
fix for stacks-inspect
rdeioris Sep 10, 2025
30d244b
fix for stacks-inspect [2]
rdeioris Sep 10, 2025
6dbb596
chore: merge develop with conflicts
fdefelici Sep 10, 2025
83ae051
Merge branch 'develop' into feat/tenureblocks_byhash_byheight_endpoints
rdeioris Sep 10, 2025
2692b5b
merged with develop
rdeioris Sep 10, 2025
090a6da
chore: move BitcoinRPCRequest::list_unspent in BitcoinRegtestControll…
fdefelici Sep 10, 2025
bc4fbc3
fixed test
rdeioris Sep 10, 2025
45f97fd
chore: move listunspent_max_utxos test from neon_integration to Bitco…
fdefelici Sep 10, 2025
7b6fbc6
chore: remove unused BitcoinRPCRequest::list_unspent, #6387
fdefelici Sep 10, 2025
6c9a2f7
feat: add Clarity4 keyword `current-contract`
obycode Sep 10, 2025
3b74c8a
feat: add `to-ascii?` builtin
obycode Sep 3, 2025
dda4af1
feat: initial setup for `block-time` keyword
obycode Sep 9, 2025
71a8638
refactor: convert list_unspent to use new rpc, #6387
fdefelici Sep 10, 2025
22ddb23
feat: add analysis_costs test for handling undefined variable
hstove Sep 10, 2025
42bcf09
refactor: replace list_unspent RPCResult with BitcoinRegtestControll…
fdefelici Sep 10, 2025
666f424
fix: print correct address version in `stacks-inspect decode-tx`
obycode Sep 10, 2025
4c93bdb
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 10, 2025
976d865
Rename ambiguous Result alias to CostResult
jferrant Sep 10, 2025
7c73433
Rename ambiguous Result alias to VmExecutionResult
jferrant Sep 10, 2025
ca0295b
Rename ambiguous Result alias to CheckResult
jferrant Sep 10, 2025
26afd25
remove duplicate CostOverflowingMath
Jiloc Sep 11, 2025
2b9e955
feat: implement `block-time`
obycode Sep 11, 2025
b8a7dad
fix: compile errors in tests
obycode Sep 11, 2025
d966da5
Merge pull request #6391 from jferrant/feat/add-contract-cost-limit-p…
jferrant Sep 11, 2025
1492574
refactor: improve address getter
obycode Sep 11, 2025
09fcd02
Merge branch 'develop' into feat/to-ascii
obycode Sep 11, 2025
63a79aa
Merge branch 'develop' into feat/current-contract
obycode Sep 11, 2025
5ce445b
chore: formatting
obycode Sep 11, 2025
3bcc724
refactor: use `CheckErrors::Expects` instead of `expect`
obycode Sep 11, 2025
863429f
Merge pull request #6480 from Jiloc/fix/remove-duplicate-CostOverflow…
Jiloc Sep 11, 2025
dea5355
revert arguments order
Jiloc Sep 12, 2025
0063ae2
refactor: make get_all_utxos reuse list_unspent, #6387
fdefelici Sep 12, 2025
b8cd905
chore: rename list_unspent method and add documentation, #6387
fdefelici Sep 12, 2025
0c33c99
fix: add epoch gating and fix tests
obycode Sep 12, 2025
5d126ed
chore: return error in other test-only timestamp method
obycode Sep 12, 2025
f1f28d0
Merge branch 'develop' into feat/block-time
obycode Sep 12, 2025
6dc5086
Merge branch 'develop' into feat/signing_different_nonces
rdeioris Sep 12, 2025
3865bc5
updated Cargo.lock
rdeioris Sep 12, 2025
b64df1e
fixed non copyable signatures
rdeioris Sep 12, 2025
fe77676
fix: test block-time
obycode Sep 12, 2025
229e609
another clippy fix
rdeioris Sep 12, 2025
c4da214
feat: add compat test with hard-coded expected cost
hstove Sep 12, 2025
037b4f4
rename clarity-serialization -> clarity-types
Jiloc Sep 12, 2025
e864154
Merge pull request #6444 from fdefelici/refactor/btc-rpc-rollout-step…
jferrant Sep 12, 2025
d1e428d
refactor: remove unnecessary parameter from `tenure_begin`
obycode Sep 12, 2025
9440b0f
update fuzz crates cargo.locks
Jiloc Sep 13, 2025
8135970
refactored find_highest_known_block_header_in_tenure functions
rdeioris Sep 15, 2025
c6ce925
better regex
rdeioris Sep 15, 2025
e9c9cda
merged with develop
rdeioris Sep 15, 2025
85e8367
test: improve get_all_utxo, #6387
fdefelici Sep 15, 2025
08e639c
test: improve get_all_utxo, #6387
fdefelici Sep 15, 2025
a0ea978
remove unused InterpreterErrors
Jiloc Sep 15, 2025
bee78da
removed RuntimeErrorType unused variants
Jiloc Sep 15, 2025
624d3e0
refactor: introduce to_epoch_aware_pubkey, #6387
fdefelici Sep 15, 2025
4291feb
remove unused ParseErrors variants
Jiloc Sep 15, 2025
94774d2
test: add unit tests for get_miner_address, #6387
fdefelici Sep 15, 2025
b8e86f0
chore: remove unused BitcoinRPCRequest and ParsedUTXO, #6387
fdefelici Sep 15, 2025
ba3e236
refactor: improve retrieve_utxo_set, #6387
fdefelici Sep 15, 2025
c1a989f
Merge pull request #6488 from Jiloc/chore/rename-clarity-types
Jiloc Sep 15, 2025
dc3ec30
Merge branch 'develop' into refactor/btc-rpc-rollout-step7-6387
fdefelici Sep 15, 2025
a6caf1e
chore: merge conflicts develop
fdefelici Sep 15, 2025
ca41460
clarify nakamoto-only support in openapi
rdeioris Sep 15, 2025
860bf6c
clarify nakamoto-only support in related functions
rdeioris Sep 15, 2025
6268d22
fixed formatting
rdeioris Sep 15, 2025
c53322c
chore: move to_bitcoin_tx_hash in Txid, #6387
fdefelici Sep 15, 2025
424ec11
Merge remote-tracking branch 'core/develop' into fix/cost-error-undef…
hstove Sep 15, 2025
ce20639
Merge branch 'develop' into fix/clarity-result_large_err
Jiloc Sep 15, 2025
1a45565
box ExpectedContractPrincipalValue
Jiloc Sep 15, 2025
9258b7b
refactor: DRY up test code
obycode Sep 15, 2025
eb588c2
Merge branch 'develop' into feat/to-ascii
obycode Sep 15, 2025
75ae637
document cargo clippy-stackslib and add it to ci
Jiloc Sep 15, 2025
fd59fe0
Merge branch 'develop' into chore/remove-unused-interpreter-errors-va…
Jiloc Sep 15, 2025
5bb6e8a
Merge branch 'develop' into chore/remove-unused-runtime-errors-variants
Jiloc Sep 15, 2025
87b931b
Merge branch 'develop' into chore/remove-unused-parse-errors-variants
Jiloc Sep 15, 2025
c3c245c
Merge branch 'develop' into chore/revert-concretize-error-args
Jiloc Sep 15, 2025
4747f97
Merge pull request #6436 from obycode/feat/to-ascii
obycode Sep 15, 2025
61d4e57
CRC: remove CheckResult alias entirely and subsequently TypeResult as…
jferrant Sep 15, 2025
0858029
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 15, 2025
0aa2352
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 15, 2025
1198aea
CRC: remove result alias entirely
jferrant Sep 15, 2025
6ec8245
Merge branch 'develop' of https://github.com/stacks-network/stacks-co…
jferrant Sep 15, 2025
3ba766c
CRC: remove result alias entirely
jferrant Sep 15, 2025
60e26fc
Fix clippy
jferrant Sep 15, 2025
2d97c43
refactor: simplify `block-time` storage
obycode Sep 15, 2025
d1c4769
refactor: finish refactoring
obycode Sep 15, 2025
0751f7c
Merge branch 'develop' into feat/block-time
obycode Sep 16, 2025
a8aa32b
Merge pull request #6448 from hstove/fix/cost-error-undefined-var
hstove Sep 16, 2025
7e19845
Merge pull request #6489 from Jiloc/chore/remove-unused-interpreter-e…
Jiloc Sep 16, 2025
f349368
Merge pull request #6490 from Jiloc/chore/remove-unused-runtime-error…
Jiloc Sep 16, 2025
c285469
Merge pull request #6491 from Jiloc/chore/remove-unused-parse-errors-…
Jiloc Sep 16, 2025
86f5e97
Merge pull request #6484 from Jiloc/chore/revert-concretize-error-args
Jiloc Sep 16, 2025
f0e6042
Merge pull request #6477 from jferrant/chore/aac-rename-alias-to-chec…
Jiloc Sep 16, 2025
06a01b5
Merge pull request #6476 from jferrant/chore/aac-rename-alias-to-vmex…
Jiloc Sep 16, 2025
0288c84
chore: clean retrieve_utox_set, #6387
fdefelici Sep 16, 2025
df0a7c9
Merge branch 'develop' into fix/clarity-result_large_err
Jiloc Sep 16, 2025
d66c041
update least_supertype docstring
Jiloc Sep 16, 2025
bcf0f4b
Merge pull request #6447 from rdeioris/feat/tenureblocks_byhash_byhei…
rdeioris Sep 16, 2025
2e9bc5c
Cargo.lock update
rdeioris Sep 16, 2025
c564024
Cargo.lock update
rdeioris Sep 16, 2025
308b3b0
Merge branch 'develop' into feat/signing_different_nonces
rdeioris Sep 16, 2025
68ab2bf
Merge pull request #6358 from Jiloc/fix/clarity-result_large_err
Jiloc Sep 16, 2025
48770ee
Merge branch 'develop' into chore/remove-unused-check-errors-variants
Jiloc Sep 16, 2025
bc8ca17
remove unused CheckErrors' variants
Jiloc Sep 16, 2025
985bb03
Merge branch 'develop' into chore/remove-unused-check-errors-variants
Jiloc Sep 16, 2025
1470142
Merge branch 'develop' into feat/block-time
obycode Sep 16, 2025
e156f47
test: update check for `BlockTimeNotAvailable`
obycode Sep 16, 2025
cbacdf2
fix: merge conflict
obycode Sep 16, 2025
47c61e9
Merge pull request #6443 from rdeioris/feat/signing_different_nonces
rdeioris Sep 16, 2025
ae2d105
Merge pull request #6475 from jferrant/chore/aac-rename-alias-to-cost…
jferrant Sep 16, 2025
b1332a7
Merge pull request #6494 from Jiloc/chore/remove-unused-check-errors-…
Jiloc Sep 16, 2025
ef475cb
refactor: merge common code in `ClarityTestSim`
obycode Sep 16, 2025
f970554
refactor: remove unused `From` impls
obycode Sep 16, 2025
038f143
Merge branch 'develop' into fix/decode-tx-testnet
obycode Sep 16, 2025
9bc5be8
refactor: inline vars into format string
obycode Sep 16, 2025
7736da3
Merge branch 'develop' into feat/current-contract
obycode Sep 16, 2025
862e43c
chore: cleanup debugging print
obycode Sep 16, 2025
59608b4
fix: merge conflict errors
obycode Sep 16, 2025
725bbb9
chore: fix formatting after merge
obycode Sep 16, 2025
307d088
Merge pull request #6478 from obycode/feat/block-time
obycode Sep 16, 2025
6ea7ee9
Merge branch 'develop' into feat/current-contract
obycode Sep 16, 2025
f0be205
Merge pull request #6451 from fdefelici/refactor/btc-rpc-rollout-step…
fdefelici Sep 17, 2025
3271dad
Merge pull request #6452 from obycode/fix/decode-tx-testnet
kantai Sep 17, 2025
eb0f852
Merge pull request #6492 from Jiloc/chore/add-clippy-stackslib-to-ci
wileyj Sep 17, 2025
87c4373
Merge pull request #6450 from obycode/feat/current-contract
obycode Sep 17, 2025
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
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[alias]
stacks-node = "run --package stacks-node --"
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
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"
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"
clippy-stackslib = "clippy -p stackslib --no-deps -- -Aclippy::all -Wclippy::indexing_slicing -Wclippy::nonminimal_bool -Wclippy::clone_on_copy"

# Uncomment to improve performance slightly, at the cost of portability
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cargo-hack-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
run: |
cargo hack check \
-p clarity \
-p clarity-serialization \
-p clarity-types \
-p stacks-common \
--each-feature \
--no-dev-deps \
Expand All @@ -102,7 +102,7 @@ jobs:
- name: Run cargo hack check (WASM Deterministic)
run: |
cargo hack check \
-p clarity-serialization \
-p clarity-types \
-p stacks-common \
--each-feature \
--no-dev-deps \
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ jobs:
- name: Clippy
id: clippy
run: cargo clippy-stacks

- name: Clippy Stackslib
id: clippy-stackslib
run: cargo clippy-stackslib
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,29 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE

### Added

- Renamed `clarity-serialization` to `clarity-types`.
- Add `stackerdb_timeout_secs` to miner config for limiting duration of StackerDB HTTP requests.
- 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.
- New endpoint /v3/tenures/blocks/ allowing retrieving the list of stacks blocks from a burn block
- New endpoints /v3/tenures/blocks/, /v3/tenures/blocks/hash, /v3/tenures/blocks/height allowing retrieving the list of stacks blocks from a burn block
- Creates epoch 3.3 and costs-4 in preparation for a hardfork to activate Clarity 4
- Adds support for new Clarity 4 builtins (not activated until epoch 3.3):
- `contract-hash?`
- `current-contract`
- `block-time`
- `to-ascii?`
- 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.

### Changed

- Clarity errors pertaining to syntax binding errors have been made more
expressive (#6337)
- Removed affirmation maps logic throughout, upgrading chainstate DB schema to 11 and burnchain DB schema to 3 (#6314)

### Fixed

- When running `stacks-inspect decode-tx`, print the correct version of the address (mainnet or testnet) based on the transaction passed in
- When a contract deploy is analyzed, it will no longer throw a `CostError` when the contract contains an undefined top-level variable. Instead, it will throw a `UndefinedVariable` error.

## [3.2.0.0.1]

### Added
Expand Down
26 changes: 18 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ For an example of this process, see PRs
test, module, function, etc.), each should be documented according
to our [coding guidelines](#Coding-Guidelines).

> [*] The Changelog focuses on product changes. A "major change" refers to updates that have a direct impact on the end user, such as introducing new features, modifying existing functionality, or optimizing runtime performance.
> [*] The Changelog focuses on product changes. A "major change" refers to updates that have a direct impact on the end user, such as introducing new features, modifying existing functionality, or optimizing runtime performance.
On the other hand, changes that do not need to be reflected in the Changelog include code refactoring, writing tests, or automating processes, as these do not directly affect the user experience.

## Git Commit Messages
Expand Down Expand Up @@ -374,10 +374,10 @@ A test should be marked `#[ignore]` if:
- **Integration tests need to be properly tagged** using [pinny-rs](https://github.com/BitcoinL2-Labs/pinny-rs/) crate. Tagging requires two fundamental steps:
1. Define allowed tags in the package `Cargo.toml` file (if needed).
2. Apply relevant tags to the tests, picking from the allowed set.

Then it will be possible to run tests with filtering based on the tags using `cargo test` and `cargo nextest` runner.
> For more information and examples on how tagging works, refer to the [pinny-rs](https://github.com/BitcoinL2-Labs/pinny-rs/) readme.

Below the tag set currently defined with related purpose:

| Tag | Description |
Expand Down Expand Up @@ -406,16 +406,26 @@ cargo fmt-stacks

## Clippy Warnings

PRs will be checked against `clippy` and will _fail_ if any clippy warnings are generated.
Unfortunately, not all existing clippy warnings have been addressed throughout stacks-core, so arguments must be passed via the command line.
Therefore, we handle `clippy` configurations using a Cargo alias: `cargo clippy-stacks`
All PRs are checked with `clippy`, and the CI will **fail** if any warnings are raised.
Because not all existing clippy warnings in `stacks-core` have been addressed, we use Cargo aliases to standardize how clippy is run across different parts of the codebase.

Two commands are available:

You can check what warnings need to be addressed locally via:
- `cargo clippy-stacks`
Runs clippy across the core packages of the repository (e.g. `stx-genesis`, `clarity`, `stacks-signer`, etc.).

- `cargo clippy-stackslib`
Runs clippy specifically on the `stackslib` package, with a different configuration.

To check warnings locally, run:

```bash
cargo clippy-stacks
cargo clippy-stackslib
```

Make sure both commands pass before opening a pull request.

## Comments

Comments are very important for the readability and correctness of the codebase. The purpose of comments is:
Expand Down Expand Up @@ -491,7 +501,7 @@ impl<'a, 'b> ReadOnlyChecker<'a, 'b> {
/// - Returns CheckErrors::WriteAttemptedInReadOnly if there is a read-only
/// violation, i.e. if some function marked read-only attempts to modify
/// the chainstate.
pub fn run(&mut self, contract_analysis: &ContractAnalysis) -> CheckResult<()>
pub fn run(&mut self, contract_analysis: &ContractAnalysis) -> Result<(), CheckError>
```

This comment is considered positive because it explains the contract of the function in pseudo-code. Someone who understands the constructs mentioned could, e.g., write a test for this method from this description.
Expand Down
17 changes: 12 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = [
"stackslib",
"stacks-common",
"pox-locking",
"clarity-serialization",
"clarity-types",
"clarity",
"stx-genesis",
"libstackerdb",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "clarity-serialization"
name = "clarity-types"
version = "0.0.1"
edition = "2024"
description = "Serialization and deserialization for Stacks Clarity smart contract language types."
description = "Canonical Rust representations for Clarity's core data types, error definitions, and serialization format."
license = "GPLv3"
homepage = "https://github.com/stacks-network/stacks-core"
repository = "https://github.com/stacks-network/stacks-core"
Expand All @@ -14,7 +14,7 @@ lazy_static = { workspace = true }
regex = { version = "1", default-features = false }
rusqlite = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false, optional = true }
serde_derive = { workspace = true }
slog = { workspace = true }
stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false }
Expand All @@ -28,7 +28,7 @@ default = []
testing = []
developer-mode = ["stacks_common/developer-mode"]
slog_json = ["stacks_common/slog_json"]
rusqlite = ["stacks_common/rusqlite", "dep:rusqlite"]
rusqlite = ["stacks_common/rusqlite", "dep:rusqlite", "dep:serde_json"]

# Wasm-specific features for easier configuration
wasm-web = ["stacks_common/wasm-web"]
Expand Down
9 changes: 5 additions & 4 deletions clarity-serialization/README.md → clarity-types/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Clarity Serialization (`clarity-serialization`)
# Clarity Types (`clarity-types`)

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

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

## Overview

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

## Quick Start: Usage Examples

Expand All @@ -21,7 +22,7 @@ This crate provides the core components for working with Clarity data structures
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.

```rust
use clarity_serialization::types::{PrincipalData, TupleData, Value};
use clarity_types::types::{PrincipalData, TupleData, Value};

fn main() -> Result<(), Box<dyn std::error::Error>> {
// 1. Construct the individual values that will go into our tuple.
Expand Down Expand Up @@ -64,7 +65,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
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.

```rust
use clarity_serialization::types::{TypeSignature, Value};
use clarity_types::types::{TypeSignature, Value};

fn main() -> Result<(), Box<dyn std::error::Error>> {
let hex_string = "0c000000030269640100000000000000000000000000000065086d657461646174610a0200000004deadbeef056f776e65720514a46ff88886c2ef9762d970b4d2c63678835bd39d";
Expand Down
Loading