Skip to content
Open
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to the versioning scheme outlined in the [README.md](README.md).

## Unreleased
## [Unreleased]

### Added

- Added support for new Clarity 4 builtin, `secp256r1-verify?` (not activated until epoch 3.3)

### Changed

- Renamed Clarity 4's new `block-time` to `stacks-block-time`
- Replaced `libsecp256k1` with `k256` and `p256` from RustCrypto and removed separate Wasm implementations.

## [3.2.0.0.2]

Expand Down
169 changes: 162 additions & 7 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions clarity/src/vm/analysis/arithmetic_checker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ impl ArithmeticOnlyChecker<'_> {
IntToAscii | IntToUtf8 | StringToInt | StringToUInt | ToAscii => {
Err(Error::FunctionNotPermitted(function))
}
Sha512 | Sha512Trunc256 | Secp256k1Recover | Secp256k1Verify | Hash160 | Sha256
| Keccak256 => Err(Error::FunctionNotPermitted(function)),
Sha512 | Sha512Trunc256 | Secp256k1Recover | Secp256k1Verify | Secp256r1Verify
| Hash160 | Sha256 | Keccak256 => Err(Error::FunctionNotPermitted(function)),
Add | Subtract | Divide | Multiply | CmpGeq | CmpLeq | CmpLess | CmpGreater
| Modulo | Power | Sqrti | Log2 | BitwiseXor | And | Or | Not | Equals | If
| ConsSome | ConsOkay | ConsError | DefaultTo | UnwrapRet | UnwrapErrRet | IsOkay
Expand Down
22 changes: 11 additions & 11 deletions clarity/src/vm/analysis/read_only_checker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,17 @@ impl<'a, 'b> ReadOnlyChecker<'a, 'b> {
Add | Subtract | Divide | Multiply | CmpGeq | CmpLeq | CmpLess | CmpGreater
| Modulo | Power | Sqrti | Log2 | BitwiseXor | And | Or | Not | Hash160 | Sha256
| Keccak256 | Equals | If | Sha512 | Sha512Trunc256 | Secp256k1Recover
| Secp256k1Verify | ConsSome | ConsOkay | ConsError | DefaultTo | UnwrapRet
| UnwrapErrRet | IsOkay | IsNone | Asserts | Unwrap | UnwrapErr | Match | IsErr
| IsSome | TryRet | ToUInt | ToInt | BuffToIntLe | BuffToUIntLe | BuffToIntBe
| BuffToUIntBe | IntToAscii | IntToUtf8 | StringToInt | StringToUInt | IsStandard
| ToConsensusBuff | PrincipalDestruct | PrincipalConstruct | Append | Concat
| AsMaxLen | ContractOf | PrincipalOf | ListCons | GetBlockInfo | GetBurnBlockInfo
| GetStacksBlockInfo | GetTenureInfo | TupleGet | TupleMerge | Len | Print
| AsContract | Begin | FetchVar | GetStxBalance | StxGetAccount | GetTokenBalance
| GetAssetOwner | GetTokenSupply | ElementAt | IndexOf | Slice | ReplaceAt
| BitwiseAnd | BitwiseOr | BitwiseNot | BitwiseLShift | BitwiseRShift | BitwiseXor2
| ElementAtAlias | IndexOfAlias | ContractHash | ToAscii => {
| Secp256k1Verify | Secp256r1Verify | ConsSome | ConsOkay | ConsError | DefaultTo
| UnwrapRet | UnwrapErrRet | IsOkay | IsNone | Asserts | Unwrap | UnwrapErr | Match
| IsErr | IsSome | TryRet | ToUInt | ToInt | BuffToIntLe | BuffToUIntLe
| BuffToIntBe | BuffToUIntBe | IntToAscii | IntToUtf8 | StringToInt | StringToUInt
| IsStandard | ToConsensusBuff | PrincipalDestruct | PrincipalConstruct | Append
| Concat | AsMaxLen | ContractOf | PrincipalOf | ListCons | GetBlockInfo
| GetBurnBlockInfo | GetStacksBlockInfo | GetTenureInfo | TupleGet | TupleMerge
| Len | Print | AsContract | Begin | FetchVar | GetStxBalance | StxGetAccount
| GetTokenBalance | GetAssetOwner | GetTokenSupply | ElementAt | IndexOf | Slice
| ReplaceAt | BitwiseAnd | BitwiseOr | BitwiseNot | BitwiseLShift | BitwiseRShift
| BitwiseXor2 | ElementAtAlias | IndexOfAlias | ContractHash | ToAscii => {
// Check all arguments.
self.check_each_expression_is_read_only(args)
}
Expand Down
3 changes: 2 additions & 1 deletion clarity/src/vm/analysis/type_checker/v2_05/natives/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,8 @@ impl TypedNativeFunction {
| StringToUInt | IntToAscii | IntToUtf8 | GetBurnBlockInfo | StxTransferMemo
| StxGetAccount | BitwiseAnd | BitwiseOr | BitwiseNot | BitwiseLShift
| BitwiseRShift | BitwiseXor2 | Slice | ToConsensusBuff | FromConsensusBuff
| ReplaceAt | GetStacksBlockInfo | GetTenureInfo | ContractHash | ToAscii => {
| ReplaceAt | GetStacksBlockInfo | GetTenureInfo | ContractHash | ToAscii
| Secp256r1Verify => {
return Err(CheckErrors::Expects(
"Clarity 2+ keywords should not show up in 2.05".into(),
));
Expand Down
Loading
Loading