Skip to content

Commit

Permalink
update v2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rebaz88 committed Oct 20, 2023
1 parent 9e8ec44 commit a8abb98
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:latest as build
FROM golang:1.18 as build

WORKDIR /app

Expand Down
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ go 1.18

replace (
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
github.com/cosmos/cosmos-sdk => github.com/shentufoundation/cosmos-sdk v0.45.11-3
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4
google.golang.org/grpc => google.golang.org/grpc v1.33.2
)

require (
github.com/cosmos/cosmos-sdk v0.45.11
github.com/cosmos/ibc-go/v4 v4.2.0
github.com/cosmos/ibc-go/v4 v4.2.1
github.com/gogo/protobuf v1.3.3
github.com/shentufoundation/shentu/v2 v2.7.0
github.com/shentufoundation/shentu/v2 v2.8.0
github.com/streadway/amqp v1.0.0
github.com/stretchr/testify v1.8.2
github.com/tendermint/go-amino v0.16.0
Expand Down Expand Up @@ -129,7 +130,7 @@ require (
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
Expand Down
15 changes: 8 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44=
github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU=
github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o=
github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I=
github.com/cosmos/cosmos-sdk v0.45.11 h1:Pc44fFEkai0KXFND5Ys/2ZJkfVdstMIBzKBN8MY7Ll0=
github.com/cosmos/cosmos-sdk v0.45.11/go.mod h1:45z8Q1Ah4iypFycu2Kl4kBPIsQKUiND8G2CUX+HTtPM=
github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 h1:iKclrn3YEOwk4jQHT2ulgzuXyxmzmPczUalMwW4XH9k=
github.com/cosmos/cosmos-sdk/ics23/go v0.8.0/go.mod h1:2a4dBq88TUoqoWAU5eu0lGvpFP3wWDPgdHPargtyw30=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
Expand All @@ -228,8 +226,8 @@ github.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7u
github.com/cosmos/iavl v0.15.3/go.mod h1:OLjQiAQ4fGD2KDZooyJG9yz+p2ao2IAYSbke8mVvSA4=
github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok=
github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw=
github.com/cosmos/ibc-go/v4 v4.2.0 h1:Fx/kKq/uvawrAxk6ZrQ6sEIgffLRU5Cs/AUnvpPBrHI=
github.com/cosmos/ibc-go/v4 v4.2.0/go.mod h1:57qWScDtfCx3FOMLYmBIKPbOLE6xiVhrgxHAQmbWYXM=
github.com/cosmos/ibc-go/v4 v4.2.1 h1:AlP2YGktkbkKOeN0bEVMKNKsfCQJrjF+dTWxERNRkRU=
github.com/cosmos/ibc-go/v4 v4.2.1/go.mod h1:EFFqkrJHQPHWUlw155QUxGuis4Ett4lvewAT5nvX0yU=
github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA=
github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
Expand Down Expand Up @@ -584,8 +582,9 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs=
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
Expand Down Expand Up @@ -987,8 +986,10 @@ github.com/securego/gosec/v2 v2.13.1/go.mod h1:EO1sImBMBWFjOTFzMWfTRrZW6M15gm60l
github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU=
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs=
github.com/shentufoundation/shentu/v2 v2.7.0 h1:GOmaaGbXxGYx8eoP69zs0EIqwZS8OPkl9NYlGXFzpu8=
github.com/shentufoundation/shentu/v2 v2.7.0/go.mod h1:qwmgyNdZAbPep247rGX5PAotVHdgt6jU6mZ59t3KXnw=
github.com/shentufoundation/cosmos-sdk v0.45.11-3 h1:c3x/2g02HVE36OkHCC7WHqxEvvdZaeMrPTXYTiqQDew=
github.com/shentufoundation/cosmos-sdk v0.45.11-3/go.mod h1:45z8Q1Ah4iypFycu2Kl4kBPIsQKUiND8G2CUX+HTtPM=
github.com/shentufoundation/shentu/v2 v2.8.0 h1:evLMc9IV30r2xAHPVLQ3NGsZ4lxPSdrOzgeWVY30nwk=
github.com/shentufoundation/shentu/v2 v2.8.0/go.mod h1:9nle4y1ERF9x2M+bf/OFoJSOPtK87ohN03XvdGElr+s=
github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
Expand Down
2 changes: 1 addition & 1 deletion pkg/codec/protobuf_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

const (
AccountAddressPrefix = "certik"
AccountAddressPrefix = "shentu"
)

var (
Expand Down
63 changes: 43 additions & 20 deletions pkg/cosmos_sdk/block/parsing/msg_parsing_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cosmos

import (
"testing"

connectiontypes "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types"
"github.com/stretchr/testify/assert"
types6 "github.com/tendermint/tendermint/abci/types"
"testing"
)

func TestParseIDsFromResults(t *testing.T) {
Expand Down Expand Up @@ -40,10 +41,16 @@ func TestParseIDsFromResults(t *testing.T) {
{
"single_result_id",
args{
&types6.ResponseDeliverTx{Events: []types6.Event{{
connectiontypes.EventTypeConnectionOpenInit,
[]types6.EventAttribute{{[]byte(connectiontypes.AttributeKeyConnectionID), []byte("myConnectionID"), true}},
}}},
&types6.ResponseDeliverTx{
Events: []types6.Event{{
Type: connectiontypes.EventTypeConnectionOpenInit,
Attributes: []types6.EventAttribute{{
Key: []byte(connectiontypes.AttributeKeyConnectionID),
Value: []byte("myConnectionID"),
Index: true,
}},
}},
},
[]string{connectiontypes.EventTypeConnectionOpenInit},
[]string{connectiontypes.AttributeKeyConnectionID},
},
Expand All @@ -52,24 +59,40 @@ func TestParseIDsFromResults(t *testing.T) {
{
"multiple_result_id",
args{
&types6.ResponseDeliverTx{Events: []types6.Event{
{
connectiontypes.EventTypeConnectionOpenInit,
[]types6.EventAttribute{
{[]byte(connectiontypes.AttributeKeyConnectionID), []byte("myConnectionID"), true},
{[]byte(connectiontypes.AttributeKeyClientID), []byte("myClientID"), true},
&types6.ResponseDeliverTx{
Events: []types6.Event{
{
Type: connectiontypes.EventTypeConnectionOpenInit,
Attributes: []types6.EventAttribute{
{
Key: []byte(connectiontypes.AttributeKeyConnectionID),
Value: []byte("myConnectionID"),
Index: true,
},
{
Key: []byte(connectiontypes.AttributeKeyClientID),
Value: []byte("myClientID"),
Index: true,
},
},
},
},
{
connectiontypes.EventTypeConnectionOpenTry,
[]types6.EventAttribute{
{[]byte(connectiontypes.AttributeKeyCounterpartyClientID), []byte("myCounterpartyClientID"), true},
{[]byte(connectiontypes.AttributeKeyCounterpartyConnectionID), []byte("myCounterpartyConnectionID"), true},
{
Type: connectiontypes.EventTypeConnectionOpenTry,
Attributes: []types6.EventAttribute{
{
Key: []byte(connectiontypes.AttributeKeyCounterpartyClientID),
Value: []byte("myCounterpartyClientID"),
Index: true,
},
{
Key: []byte(connectiontypes.AttributeKeyCounterpartyConnectionID),
Value: []byte("myCounterpartyConnectionID"),
Index: true,
},
},
},
},
}},
[]string{connectiontypes.EventTypeConnectionOpenInit, connectiontypes.EventTypeConnectionOpenTry},
[]string{connectiontypes.AttributeKeyConnectionID, connectiontypes.AttributeKeyCounterpartyConnectionID},
}, []string{connectiontypes.EventTypeConnectionOpenInit, connectiontypes.EventTypeConnectionOpenTry}, []string{connectiontypes.AttributeKeyConnectionID, connectiontypes.AttributeKeyCounterpartyConnectionID},
},
[]string{"myConnectionID", "myCounterpartyConnectionID"},
},
Expand Down

0 comments on commit a8abb98

Please sign in to comment.