Skip to content

Commit

Permalink
Merge branch 'main' into sainoe/pss-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Mar 18, 2024
2 parents ef56ccf + cd0d075 commit a4ecead
Show file tree
Hide file tree
Showing 23 changed files with 156 additions and 455 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 #v5.1.0
uses: docker/build-push-action@af5a7ed5ba88268d5278f7203fb52cd833f66d6e #v5.2.0
with:
context: .
file: ./Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proto-registry.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.29.0
- uses: bufbuild/buf-setup-action@v1.30.0
- uses: bufbuild/buf-push-action@v1
with:
input: "proto"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.29.0
- uses: bufbuild/buf-setup-action@v1.30.0
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
Expand Down
2 changes: 1 addition & 1 deletion app/consumer/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ func TestConsumerGenesisTransformationV4ToV33(t *testing.T) {
targetVersion := "v3.3.x"
result, err := transformConsumerGenesis(filePath, &targetVersion)
require.NoError(t, err)

resultGenesis := consumerTypes.GenesisState{} //Only difference to v33 is no RetryDelayPeriod
err = ctx.Codec.UnmarshalJSON(result, &resultGenesis)
require.NoError(t, err)

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/cosmos/ibc-go/v7 v7.3.2
github.com/cosmos/ics23/go v0.10.0
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.3
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/kylelemons/godebug v1.1.0
Expand All @@ -29,8 +29,8 @@ require (
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/grpc v1.62.0
google.golang.org/protobuf v1.32.0
google.golang.org/protobuf v1.33.0
google.golang.org/grpc v1.62.1
gopkg.in/yaml.v2 v2.4.0
)

Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
Expand Down Expand Up @@ -1644,8 +1644,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu
google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk=
google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk=
google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
Expand All @@ -1662,8 +1662,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
19 changes: 7 additions & 12 deletions tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1038,12 +1038,13 @@ func (tr TestConfig) addIbcConnection(
if !tr.useGorelayer {
tr.addIbcConnectionHermes(action, target, verbose)
} else {
tr.addIbcConnectionGorelayer(action, verbose)
tr.addIbcConnectionGorelayer(action, target, verbose)
}
}

func (tr TestConfig) addIbcConnectionGorelayer(
action AddIbcConnectionAction,
target ExecutionTarget,
verbose bool,
) {
pathName := tr.GetPathNameForGorelayer(action.ChainA, action.ChainB)
Expand All @@ -1053,13 +1054,13 @@ func (tr TestConfig) addIbcConnectionGorelayer(
pathConfigFileName := fmt.Sprintf("/root/%s_config.json", pathName)

bashCommand := fmt.Sprintf(`echo '%s' >> %s`, pathConfig, pathConfigFileName)

//#nosec G204 -- Bypass linter warning for spawning subprocess with cmd arguments.
pathConfigCommand := exec.Command("docker", "exec", tr.containerConfig.InstanceName, "bash", "-c",
bashCommand)
pathConfigCommand := target.ExecCommand("bash", "-c", bashCommand)
executeCommand(pathConfigCommand, "add path config")

//#nosec G204 -- Bypass linter warning for spawning subprocess with cmd arguments.
newPathCommand := exec.Command("docker", "exec", tr.containerConfig.InstanceName, "rly",
newPathCommand := target.ExecCommand("rly",
"paths", "add",
string(tr.chainConfigs[action.ChainA].ChainId),
string(tr.chainConfigs[action.ChainB].ChainId),
Expand All @@ -1070,21 +1071,15 @@ func (tr TestConfig) addIbcConnectionGorelayer(
executeCommand(newPathCommand, "new path")

//#nosec G204 -- Bypass linter warning for spawning subprocess with cmd arguments.
newClientsCommand := exec.Command("docker", "exec", tr.containerConfig.InstanceName, "rly",
"transact", "clients",
pathName,
)
newClientsCommand := target.ExecCommand("rly", "transact", "clients", pathName)

executeCommand(newClientsCommand, "new clients")

tr.waitBlocks(action.ChainA, 1, 10*time.Second)
tr.waitBlocks(action.ChainB, 1, 10*time.Second)

//#nosec G204 -- Bypass linter warning for spawning subprocess with cmd arguments.
newConnectionCommand := exec.Command("docker", "exec", tr.containerConfig.InstanceName, "rly",
"transact", "connection",
pathName,
)
newConnectionCommand := target.ExecCommand("rly", "transact", "connection", pathName)

executeCommand(newConnectionCommand, "new connection")

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func pullDockerImage(tag string, targetConfig TargetConfig) (string, error) {
// bootstrapSDK in workspace to use custom SDK setup if required
func bootstrapSDK(workSpace string, targetCfg TargetConfig) error {
sdkPath := strings.Join([]string{workSpace, "cosmos-sdk"}, string(os.PathSeparator))

err := os.RemoveAll(sdkPath) //delete old SDK directory
if err != nil {
return fmt.Errorf("error deleting SDK directory from workspace: %v", err)
}
Expand Down
21 changes: 12 additions & 9 deletions tests/e2e/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ func getIcsVersion(reference string) string {
log.Printf("error identifying config version to use '%v': %s", err, string(out))
return ""
}

}
}
return semver.Canonical(icsVersion)
Expand All @@ -248,26 +247,30 @@ func GetTestConfig(cfgType TestConfigType, providerVersion, consumerVersion stri
cv := getIcsVersion(consumerVersion)
fmt.Println("Config version for provider :", pv)
fmt.Println("Config version for consumer :", cv)
var testCfg TestConfig
switch cfgType {
case DefaultTestCfg:
return DefaultTestConfig()
testCfg = DefaultTestConfig()
case ChangeoverTestCfg:
return ChangeoverTestConfig()
testCfg = ChangeoverTestConfig()
case DemocracyTestCfg:
return DemocracyTestConfig(false)
testCfg = DemocracyTestConfig(false)
case DemocracyRewardTestCfg:
return DemocracyTestConfig(true)
testCfg = DemocracyTestConfig(true)
case SlashThrottleTestCfg:
return SlashThrottleTestConfig()
testCfg = SlashThrottleTestConfig()
case MulticonsumerTestCfg:
return MultiConsumerTestConfig()
testCfg = MultiConsumerTestConfig()
case ConsumerMisbehaviourTestCfg:
return ConsumerMisbehaviourTestConfig()
testCfg = ConsumerMisbehaviourTestConfig()
case CompatibilityTestCfg:
return CompatibilityTestConfig(pv, cv)
testCfg = CompatibilityTestConfig(pv, cv)
default:
panic(fmt.Sprintf("Invalid test config: %s", cfgType))
}
testCfg.consumerVersion = consumerVersion
testCfg.providerVersion = providerVersion
return testCfg
}

func getDefaultValidators() map[ValidatorID]ValidatorConfig {
Expand Down
Loading

0 comments on commit a4ecead

Please sign in to comment.