Skip to content

Commit

Permalink
Merge branch 'main' into akhil/evidence-integration-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilkumarpilli committed Dec 3, 2024
2 parents b649b94 + 6a52694 commit 434c66d
Show file tree
Hide file tree
Showing 156 changed files with 2,553 additions and 3,411 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ jobs:
- name: Build with rocksdb backend
if: matrix.go-arch == 'amd64'
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="rocksdb" make build
- name: Build with BLS12381
if: matrix.go-arch == 'amd64'
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="bls12381" make build
- name: Build with Secp_cgo
if: matrix.go-arch == 'amd64'
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="secp" make build
###################
## Build Tooling ##
###################
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i

### Improvements

* RocksDB libraries have been upgraded to support RockDB v9 instead of v8.
* (testutil/integration) [#22616](https://github.com/cosmos/cosmos-sdk/pull/22616) Remove double context in integration tests v1.
* Use integrationApp.Context() instead of creating a context prior.

Expand Down
2 changes: 1 addition & 1 deletion CODING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Desired outcomes:

As a developer, you must help the QA team by providing instructions for User Experience (UX) and functional testing.

### QA Team to cross check Acceptance Tests
### QA Team to cross-check Acceptance Tests

Once the AT are defined, the QA team will have an overview of the behavior a user can expect and:

Expand Down
4 changes: 2 additions & 2 deletions RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ v1.0.0-beta1 → v1.0.0-beta2 → ... → v1.0.0-rc1 → v1.0.0-rc2 → ... →
* All links must point to their respective pull request.
* The `CHANGELOG.md` must contain only the changes of that specific released version. All other changelog entries must be deleted and linked to the `main` branch changelog ([example](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/CHANGELOG.md#previous-versions)).
* Create release notes, in `RELEASE_NOTES.md`, highlighting the new features and changes in the version. This is needed so the bot knows which entries to add to the release page on GitHub.
* Additionally verify that the `UPGRADING.md` file is up to date and contains all the necessary information for upgrading to the new version.
* Additionally verify that the `UPGRADING.md` file is up-to-date and contains all the necessary information for upgrading to the new version.
* Remove GitHub workflows that should not be in the release branch
* `test.yml`: All standalone go module tests should be removed (expect `./simapp`, and `./tests`, SDK and modules tests).
* These packages are tracked and tested directly on main.
Expand Down Expand Up @@ -57,7 +57,7 @@ A _patch release_ is an increment of the patch number (eg: `v1.2.0` → `v1.2.1`

**Patch release must not break API nor consensus.**

Updates to the release branch should come from `main` by backporting PRs (usually done by automatic cherry pick followed by a PRs to the release branch). The backports must be marked using `backport/Y` label in PR for main.
Updates to the release branch should come from `main` by backporting PRs (usually done by automatic cherry-pick followed by PRs to the release branch). The backports must be marked using `backport/Y` label in PR for main.
It is the PR author's responsibility to fix merge conflicts, update changelog entries, and
ensure CI passes. If a PR originates from an external contributor, a core team member assumes
responsibility to perform this process instead of the original author.
Expand Down
4 changes: 2 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Issue: https://github.com/cosmos/iavl/issues/548

* Toolkit/SDK ADR.
* Objective:
* Produce a RFC/ADR on how to make core composable
* Produce an RFC/ADR on how to make core composable
* Merge RFC/ADR into main
* Progress:
* on pause until abci 2.0 integration is completed
Expand Down Expand Up @@ -267,4 +267,4 @@ Issue: https://github.com/cosmos/iavl/issues/548



This document will be updated at the end of the quarter on what was achieved and what was not. Shortly before the quarter concludes a new section will be added for the next quarter. We are working on updating the complete one year roadmap and will be posting it here as well.
This document will be updated at the end of the quarter on what was achieved and what was not. Shortly before the quarter concludes a new section will be added for the next quarter. We are working on updating the complete one-year roadmap and will be posting it here as well.
10 changes: 9 additions & 1 deletion client/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ func CheckCometError(err error, tx cmttypes.Tx) *sdk.TxResponse {
txHash := fmt.Sprintf("%X", tx.Hash())

switch {
case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())):
case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())) ||
strings.Contains(errStr, strings.ToLower(sdkerrors.ErrTxInMempoolCache.Error())):
return &sdk.TxResponse{
Code: sdkerrors.ErrTxInMempoolCache.ABCICode(),
Codespace: sdkerrors.ErrTxInMempoolCache.Codespace(),
Expand All @@ -73,6 +74,13 @@ func CheckCometError(err error, tx cmttypes.Tx) *sdk.TxResponse {
TxHash: txHash,
}

case strings.Contains(errStr, "no signatures supplied"):
return &sdk.TxResponse{
Code: sdkerrors.ErrNoSignatures.ABCICode(),
Codespace: sdkerrors.ErrNoSignatures.Codespace(),
TxHash: txHash,
}

default:
return nil
}
Expand Down
44 changes: 23 additions & 21 deletions client/v2/broadcast/comet/comet.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,24 @@ func (c *CometBFTBroadcaster) Broadcast(ctx context.Context, txBytes []byte) ([]
func (c *CometBFTBroadcaster) broadcast(ctx context.Context, txBytes []byte,
fn func(ctx context.Context, tx cmttypes.Tx) (*coretypes.ResultBroadcastTx, error),
) (*apiacbci.TxResponse, error) {
bResult, err := fn(ctx, txBytes)
res, err := fn(ctx, txBytes)
if errRes := checkCometError(err, txBytes); errRes != nil {
return errRes, nil
}

return newResponseFormatBroadcastTx(bResult), err
if res == nil {
return nil, err
}

parsedLogs, _ := parseABCILogs(res.Log)
return &apiacbci.TxResponse{
Code: res.Code,
Codespace: res.Codespace,
Data: res.Data.String(),
RawLog: res.Log,
Logs: parsedLogs,
Txhash: res.Hash.String(),
}, err
}

// checkCometError checks for errors returned by the CometBFT network and returns an appropriate TxResponse.
Expand All @@ -145,7 +157,8 @@ func checkCometError(err error, tx cmttypes.Tx) *apiacbci.TxResponse {
txHash := fmt.Sprintf("%X", tx.Hash())

switch {
case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())):
case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())) ||
strings.Contains(errStr, strings.ToLower(sdkerrors.ErrTxInMempoolCache.Error())):
return &apiacbci.TxResponse{
Code: sdkerrors.ErrTxInMempoolCache.ABCICode(),
Codespace: sdkerrors.ErrTxInMempoolCache.Codespace(),
Expand All @@ -166,27 +179,16 @@ func checkCometError(err error, tx cmttypes.Tx) *apiacbci.TxResponse {
Txhash: txHash,
}

default:
return nil
}
}
case strings.Contains(errStr, "no signatures supplied"):
return &apiacbci.TxResponse{
Code: sdkerrors.ErrNoSignatures.ABCICode(),
Codespace: sdkerrors.ErrNoSignatures.Codespace(),
Txhash: txHash,
}

// newResponseFormatBroadcastTx returns a TxResponse given a ResultBroadcastTx from cometbft
func newResponseFormatBroadcastTx(res *coretypes.ResultBroadcastTx) *apiacbci.TxResponse {
if res == nil {
default:
return nil
}

parsedLogs, _ := parseABCILogs(res.Log)

return &apiacbci.TxResponse{
Code: res.Code,
Codespace: res.Codespace,
Data: res.Data.String(),
RawLog: res.Log,
Logs: parsedLogs,
Txhash: res.Hash.String(),
}
}

// parseABCILogs attempts to parse a stringified ABCI tx log into a slice of
Expand Down
26 changes: 12 additions & 14 deletions client/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ require (
github.com/bytedance/sonic/loader v0.2.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/dgraph-io/ristretto/v2 v2.0.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
golang.org/x/arch v0.12.0 // indirect
Expand All @@ -33,12 +34,12 @@ require (
require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 // indirect
cosmossdk.io/collections v0.4.1-0.20241104084251-838f1557af0a // indirect
cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b // indirect
cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e // indirect
cosmossdk.io/errors v1.0.1 // indirect
cosmossdk.io/log v1.5.0
cosmossdk.io/math v1.4.0
cosmossdk.io/schema v0.3.1-0.20241010135032-192601639cac // indirect
cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b // indirect
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
Expand All @@ -49,7 +50,6 @@ require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.2.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
Expand All @@ -58,30 +58,28 @@ require (
github.com/cockroachdb/pebble v1.1.2 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f
github.com/cometbft/cometbft-db v0.15.0 // indirect
github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9
github.com/cometbft/cometbft-db v1.0.1 // indirect
github.com/cometbft/cometbft/api v1.0.0-rc2 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22 // indirect
github.com/cosmos/cosmos-db v1.1.0 // indirect
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/gogoproto v1.7.0
github.com/cosmos/iavl v1.3.1 // indirect
github.com/cosmos/iavl v1.3.2 // indirect
github.com/cosmos/ics23/go v0.11.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
github.com/danieljoos/wincred v1.2.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/dgraph-io/badger/v4 v4.3.0 // indirect
github.com/dgraph-io/ristretto v0.1.2-0.20240116140435-c67e07994f91 // indirect
github.com/dgraph-io/badger/v4 v4.4.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/emicklei/dot v1.6.2 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/go-kit/kit v0.13.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
Expand All @@ -91,7 +89,7 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/flatbuffers v2.0.8+incompatible // indirect
github.com/google/flatbuffers v24.3.25+incompatible // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -114,7 +112,7 @@ require (
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.9 // indirect
Expand All @@ -139,7 +137,7 @@ require (
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/cors v1.11.0 // indirect
github.com/rs/cors v1.11.1 // indirect
github.com/rs/zerolog v1.33.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
Expand Down
Loading

0 comments on commit 434c66d

Please sign in to comment.