diff --git a/.github/workflows/slack-notify.yaml b/.github/workflows/slack-notify.yaml new file mode 100644 index 00000000000..e57ee00e701 --- /dev/null +++ b/.github/workflows/slack-notify.yaml @@ -0,0 +1,17 @@ +# This re-usable workflow file will trigger a Slack notification on the channel configure via the Webhook URL. +# It currently comments a number of fields, but you can add or remove them as you see fit. +# +# To configure a Slack Webhook URL, follow the instructions here: https://api.slack.com/messaging/webhooks +on: + workflow_call: + +jobs: + slack-notify: + runs-on: ubuntu-latest + steps: + - uses: 8398a7/action-slack@v3 + with: + status: 'failure' + fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file diff --git a/modules/core/02-client/keeper/grpc_query.go b/modules/core/02-client/keeper/grpc_query.go index 0d827c379ee..9ba5241fe57 100644 --- a/modules/core/02-client/keeper/grpc_query.go +++ b/modules/core/02-client/keeper/grpc_query.go @@ -383,7 +383,7 @@ func (k Keeper) VerifyMembership(c context.Context, req *types.QueryVerifyMember } if clientStatus := k.GetClientStatus(ctx, clientState, req.ClientId); clientStatus != exported.Active { - return nil, status.Errorf(codes.FailedPrecondition, errorsmod.Wrapf(types.ErrClientNotActive, "cannot verify membership using client (%s) with status %s", req.ClientId, clientStatus).Error()) + return nil, status.Error(codes.FailedPrecondition, errorsmod.Wrapf(types.ErrClientNotActive, "cannot verify membership using client (%s) with status %s", req.ClientId, clientStatus).Error()) } if err := clientState.VerifyMembership(cachedCtx, k.ClientStore(cachedCtx, req.ClientId), k.cdc, req.ProofHeight, req.TimeDelay, req.BlockDelay, req.Proof, req.MerklePath, req.Value); err != nil { diff --git a/testing/chain.go b/testing/chain.go index fff0a937302..cb695b5744b 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -472,7 +472,7 @@ func (chain *TestChain) CurrentTMClientHeader() *ibctm.Header { // be used to sign over the proposed header. func CommitHeader(proposedHeader cmttypes.Header, valSet *cmttypes.ValidatorSet, signers map[string]cmttypes.PrivValidator) (*cmtproto.SignedHeader, error) { hhash := proposedHeader.Hash() - blockID := MakeBlockID(hhash, 3, tmhash.Sum([]byte("part_set"))) + blockID := MakeBlockID(hhash, 3, unusedHash) voteSet := cmttypes.NewVoteSet(proposedHeader.ChainID, proposedHeader.Height, 1, cmtproto.PrecommitType, valSet) // MakeExtCommit expects a signer array in the same order as the validator array. @@ -512,13 +512,13 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, Time: timestamp, LastBlockID: MakeBlockID(make([]byte, tmhash.Size), 10_000, make([]byte, tmhash.Size)), LastCommitHash: chain.App.LastCommitID().Hash, - DataHash: tmhash.Sum([]byte("data_hash")), + DataHash: unusedHash, ValidatorsHash: cmtValSet.Hash(), NextValidatorsHash: nextVals.Hash(), - ConsensusHash: tmhash.Sum([]byte("consensus_hash")), + ConsensusHash: unusedHash, AppHash: chain.ProposedHeader.AppHash, - LastResultsHash: tmhash.Sum([]byte("last_results_hash")), - EvidenceHash: tmhash.Sum([]byte("evidence_hash")), + LastResultsHash: unusedHash, + EvidenceHash: unusedHash, ProposerAddress: cmtValSet.Proposer.Address, //nolint:staticcheck } diff --git a/testing/values.go b/testing/values.go index 115f3b39281..0f14f41a081 100644 --- a/testing/values.go +++ b/testing/values.go @@ -11,6 +11,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cometbft/cometbft/crypto/tmhash" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" commitmenttypes "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types" @@ -67,4 +69,6 @@ var ( MockRecvCanaryCapabilityName = mock.MockRecvCanaryCapabilityName prefix = commitmenttypes.NewMerklePrefix([]byte("ibc")) + // unusedHash is a placeholder hash used for testing. + unusedHash = tmhash.Sum([]byte{0x00}) )