Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cosmos/ics23 into carlos/add-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-axner committed Oct 16, 2024
2 parents 4c1e4bf + 4fd3a5a commit 9d10be6
Show file tree
Hide file tree
Showing 48 changed files with 1,269 additions and 10,649 deletions.
8 changes: 0 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ updates:
commit-message:
prefix: "chore"

# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/js"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"

# Maintain dependencies for Composer
- package-ecosystem: "gomod"
directory: "/go"
Expand Down
44 changes: 44 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
queue_rules:
- name: default
conditions:
- "#approved-reviews-by>=1"
- base=master
- label=automerge

pull_request_rules:
- name: automerge to main with label automerge and branch protection passing
conditions:
- "#approved-reviews-by>=1"
- base=main
- label=automerge
actions:
queue:
name: default
method: squash
commit_message_template: |
{{ title }} (#{{ number }})
{{ body }}
- name: backport patches to release/v0.9.x branch
conditions:
- base=main
- label=backport:v0.9.x
actions:
backport:
branches:
- release/v0.9.x
- name: backport patches to release/v0.10.x branch
conditions:
- base=main
- label=backport:v0.10.x
actions:
backport:
branches:
- release/v0.10.x
- name: backport patches to release/v0.11.x branch
conditions:
- base=main
- label=backport:v0.11.x
actions:
backport:
branches:
- release/v0.11.x
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
go-version: "1.21"
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.54.2
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
fetch-depth: 0
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }}
uses: SonarSource/sonarcloud-github-action@v2.1.1
uses: SonarSource/sonarcloud-github-action@v3.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.4.0
- uses: amannn/action-semantic-pull-request@v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/proto-register.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.30.1
- uses: bufbuild/buf-setup-action@v1.45.0
- uses: bufbuild/buf-push-action@v1
with:
input: "proto"
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Protobuf
# Protobuf runs buf (https://buf.build/) lint and check-breakage
# This workflow is only run when a .proto file has been changed
on:
pull_request:
paths:
- "proto/**"


permissions:
contents: read

Expand All @@ -15,16 +12,17 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.30.1
- uses: bufbuild/buf-setup-action@v1.45.0
- uses: bufbuild/buf-lint-action@v1
with:
input: "proto"

break-check:
runs-on: ubuntu-latest
name: Protobuf break check
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.30.1
- uses: bufbuild/buf-setup-action@v1.45.0
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/typescript.yml

This file was deleted.

128 changes: 2 additions & 126 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,129 +1,5 @@
# Changelog
# 0.11.1

## Rust
For Rust, please check [here](./rust/CHANGELOG.md).

## Full changes

- chore(rust): Update `informalsystems-pbjson` to v0.7.0 ([#274](https://github.com/cosmos/ics23/pull/274))

# 0.11.0

## Rust

## Full changes

- chore(rust): update `prost` to v0.12 ([#202](https://github.com/cosmos/ics23/pull/202))

# 0.10.2

## Rust

This release re-enables `no_std` support for ProtoJSON `Serialize` and `Deserialize` instances,
by swapping out `pbjson` for the `no_std`-compatible fork `informalsystems-pbjson`.

## Full changes

- feat(rust): enable no_std support for pbjson ([#158](https://github.com/cosmos/ics23/pull/146))

# 0.10.1

## Rust

The only change in this release of the `ics23` crate is the addition of a `serde` feature
which adds ProtoJSON-compatible `Serialize` and `Deserialize` instances on all Protobuf definitions via
the [`pbjson-build`](https://docs.rs/pbjson-build/latest/pbjson_build/) crate.

## Full changes

- feat(rust): Add ProtoJSON-compatible `Serialize` and `Deserialize` instances on all Protobuf definitions via `pbjson` ([#146](https://github.com/cosmos/ics23/pull/146))

# 0.10.0

## Go / Rust / TypeScript

This release introduces one single boolean new parameter to the top-level `ProofSpec`: `prehash_compare_key`.
When set to `true`, this flag causes keys to be consistently compared lexicographically according to their hashes
within nonexistence proof verification, using the same hash function as specified by the already-extant `prehash_key` field.

This is a backwards-compatible change, as it requires opt-in via setting the `prehash_compare_key` flag to `true` in the `ProofSpec`.
All existing `ProofSpec`s will continue to behave identically.

Please note that the version of the TypeScript library has been bump from 0.6.8 to 0.10.0 to align it with
the Go and Rust implementations.

## Full changes

- feat: Add `prehash_compare_key` to allow proving nonexistence in sparse trees ([#136](https://github.com/cosmos/ics23/pull/136))
- chore: retract previous versions ([#131](https://github.com/cosmos/ics23/pull/131))
- fix: protobuf formatting using clang-format ([#129](https://github.com/cosmos/ics23/pull/129))
- fix: use /go suffix in go package option ([#127](https://github.com/cosmos/ics23/pull/127))
- add buf support to repo ([#126](https://github.com/cosmos/ics23/pull/126))
- chore: Add Cosmos, license and coverage badges to the README ([#122](https://github.com/cosmos/ics23/pull/122))
- ci: Enable code coverage for TypeScript version ([#123](https://github.com/cosmos/ics23/pull/123))
- ci: Add tags to codecov reports ([#121](https://github.com/cosmos/ics23/pull/121)) (4 months ago)
- ci: Refactor GitHub workflows and add code coverage job ([#120](https://github.com/cosmos/ics23/pull/120))

# 0.9.1

## Go

This release is a backport into the `release/v0.9.x` line of the feature that added the `prehash_compare_key` boolean parameter to the top-level `ProofSpec`.
When set to `true`, this flag causes keys to be consistently compared lexicographically according to their hashes
within nonexistence proof verification, using the same hash function as specified by the already-extant `prehash_key` field.

This is a backwards-compatible change, as it requires opt-in via setting the `prehash_compare_key` flag to `true` in the `ProofSpec`.
All existing `ProofSpec`s will continue to behave identically.

## Full changes

- feat(go): Add `prehash_compare_key` to allow proving nonexistence in sparse trees ([#136](https://github.com/cosmos/ics23/pull/136))

# 0.9.0

## Go

Release of ics23/go including changes made in the fork of ics23/go housed in the [Cosmos SDK](http://github.com/cosmos/cosmos-sdk).

## Rust

This release includes the same changes as its Go counterpart.

# 0.8.1

## Rust ([`ics23`](https://crates.io/crates/ics23))

- Fix no\_std compatibility and add check for this on CI ([#104](https://github.com/confio/ics23/pull/104))

# 0.8.0

## Rust ([`ics23`](https://crates.io/crates/ics23))

The following functions have been made generic over a new trait `HostFunctionProvider`:

- [x] `calculate_existence_root`
- [x] `verify_batch_membership`
- [x] `verify_batch_non_membership`
- [x] `verify_membership`
- [x] `verify_non_membership`

For `wasm32-unknown-unknown` environments this trait allows you to delegate hashing functions to a native implementation through host functions.

With the `host-functions` feature (enabled by default), you can simply use `ics23::HostFunctionManager` as this provides a default implementation of this trait.

# v0.7.0

This handles non-existence tests for empty branches properly. This
is needed for properly handling proofs on Tries, like the SMT being
integrated with the Cosmos SDK.

This is used in ibc-go v3

# 0.6.x

This handles proofs for normal merkle trees, where every branch is full.
This works for tendermint merkle hashes and iavl hashes, and should work
for merk (nomic's db) proofs.

This was used in the original ibc release (cosmos sdk v0.40) and up until
ibc-go v2.
For Go, please check [here](./go/CHANGELOG.md).
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
| ------------------ | ------------------------------------------------- | ---------------------------------------------- |
| [Go](./go) | [![Go Test][go-test-badge]][go-test-link] | [![Go Cov][go-cov-badge]][go-cov-link] |
| [Rust](./rust) | [![Rust Test][rust-test-badge]][rust-test-link] | [![Rust Cov][rust-cov-badge]][rust-cov-link] |
| [TypeScript](./js) | [![TypeScript Test][ts-test-badge]][ts-test-link] | [![TypeScript Cov][ts-cov-badge]][ts-cov-link] |

[cosmos-link]: https://cosmos.network
[go-test-link]: https://github.com/cosmos/ics23/actions/workflows/go.yml
Expand All @@ -17,10 +16,6 @@
[rust-test-badge]: https://github.com/cosmos/ics23/actions/workflows/rust.yml/badge.svg?branch=master
[rust-cov-link]: https://codecov.io/gh/cosmos/ics23/tree/master/rust
[rust-cov-badge]: https://codecov.io/github/cosmos/ics23/branch/master/graph/badge.svg?token=xlGriS907o&flag=rust
[ts-test-link]: https://github.com/cosmos/ics23/actions/workflows/typescript.yml
[ts-test-badge]: https://github.com/cosmos/ics23/actions/workflows/typescript.yml/badge.svg?branch=master
[ts-cov-link]: https://sonarcloud.io/project/configuration?id=ics23-js
[ts-cov-badge]: https://sonarcloud.io/api/project_badges/measure?project=ics23-js&metric=coverage
[license-link]: https://github.com/cosmos/ics23/blob/master/LICENSE
[license-badge]: https://img.shields.io/badge/license-Apache2.0-blue.svg

Expand Down Expand Up @@ -56,9 +51,10 @@ live alongside the various merkle tree representations (eg. not in this reposito
### Supported client languages

* [Go](./go)
* [TypeScript](./js)
* [Rust](./rust)

The repository used to have a TypeScript implementation, but due to lack of maintenance and usage, it was removed in [#353](https://github.com/cosmos/ics23/pull/353).

Anyone interested in adding support for Solidity could pick up where [#58](https://github.com/cosmos/ics23/pull/58) left off.

### Compatibility table
Expand Down
Loading

0 comments on commit 9d10be6

Please sign in to comment.