Skip to content

Commit fda87cf

Browse files
authored
Merge pull request #779 from CosmWasm/crypto-api-package
Adds secp256k1_verify API
2 parents 980e9c4 + d4ee117 commit fda87cf

Some content is hidden

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

44 files changed

+4579
-16
lines changed

.circleci/config.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ workflows:
1010
- package_vm
1111
- package_vm_cranelift
1212
- contract_burner
13+
- contract_crypto_verify
1314
- contract_hackatom
1415
- contract_ibc_reflect
1516
- contract_ibc_reflect_send
@@ -284,6 +285,59 @@ jobs:
284285
- target/wasm32-unknown-unknown/release/deps
285286
key: cargocache-v2-contract_burner-rust:1.47.0-{{ checksum "Cargo.lock" }}
286287

288+
contract_crypto_verify:
289+
docker:
290+
- image: rust:1.47.0
291+
environment:
292+
RUST_BACKTRACE: 1
293+
working_directory: ~/cosmwasm/contracts/crypto-verify
294+
steps:
295+
- checkout:
296+
path: ~/cosmwasm
297+
- run:
298+
name: Version information
299+
command: rustc --version; cargo --version; rustup --version
300+
- restore_cache:
301+
keys:
302+
- cargocache-v2-contract_crypto_verify-rust:1.47.0-{{ checksum "Cargo.lock" }}
303+
- run:
304+
name: Add wasm32 target
305+
command: rustup target add wasm32-unknown-unknown && rustup target list --installed
306+
- run:
307+
name: Build wasm binary
308+
command: cargo wasm --locked
309+
- run:
310+
name: Unit tests
311+
command: cargo unit-test --locked
312+
- run:
313+
name: Integration tests (cranelift backend)
314+
command: cargo integration-test --locked
315+
- run:
316+
name: Integration tests (singlepass backend)
317+
command: cargo integration-test --locked --no-default-features
318+
- run:
319+
name: Build and run schema generator
320+
command: cargo schema --locked
321+
- run:
322+
name: Ensure schemas are up-to-date
323+
command: |
324+
CHANGES_IN_REPO=$(git status --porcelain)
325+
if [[ -n "$CHANGES_IN_REPO" ]]; then
326+
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
327+
git status && git --no-pager diff
328+
exit 1
329+
fi
330+
- save_cache:
331+
paths:
332+
- /usr/local/cargo/registry
333+
- target/debug/.fingerprint
334+
- target/debug/build
335+
- target/debug/deps
336+
- target/wasm32-unknown-unknown/release/.fingerprint
337+
- target/wasm32-unknown-unknown/release/build
338+
- target/wasm32-unknown-unknown/release/deps
339+
key: cargocache-v2-contract_crypto_verify-rust:1.47.0-{{ checksum "Cargo.lock" }}
340+
287341
contract_hackatom:
288342
docker:
289343
- image: rust:1.47.0
@@ -624,6 +678,10 @@ jobs:
624678
name: Check formatting of contract burner
625679
working_directory: ~/project/contracts/burner
626680
command: cargo fmt -- --check
681+
- run:
682+
name: Check formatting of contract crypto-verify
683+
working_directory: ~/project/contracts/crypto-verify
684+
command: cargo fmt -- --check
627685
- run:
628686
name: Check formatting of contract hackatom
629687
working_directory: ~/project/contracts/hackatom
@@ -702,6 +760,10 @@ jobs:
702760
name: Clippy linting on burner
703761
working_directory: ~/project/contracts/burner
704762
command: cargo clippy -- -D warnings
763+
- run:
764+
name: Clippy linting on crypto-verify
765+
working_directory: ~/project/contracts/crypto-verify
766+
command: cargo clippy -- -D warnings
705767
- run:
706768
name: Clippy linting on hackatom
707769
working_directory: ~/project/contracts/hackatom
@@ -735,6 +797,9 @@ jobs:
735797
- contracts/burner/target/debug/.fingerprint
736798
- contracts/burner/target/debug/build
737799
- contracts/burner/target/debug/deps
800+
- contracts/crypto_verify/target/debug/.fingerprint
801+
- contracts/crypto_verify/target/debug/build
802+
- contracts/crypto_verify/target/debug/deps
738803
- contracts/hackatom/target/debug/.fingerprint
739804
- contracts/hackatom/target/debug/build
740805
- contracts/hackatom/target/debug/deps

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to
88

99
### Added
1010

11+
- cosmwasm-crypto: Add new crypto-related crate. Add `secp256k1_verify`, ECDSA
12+
secp256k1 signature verification scheme for Cosmos signature formats. ([#780])
1113
- cosmwasm-vm: Add PinnedMemoryCache. ([#696])
1214
- cosmwasm-vm: The new `Cache::analyze` provides a static analyzis of the Wasm
1315
bytecode. This is used to tell the caller if the contract exposes IBC entry

0 commit comments

Comments
 (0)