Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/oven-sh/setup-bun-2
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat authored Jul 14, 2024
2 parents 93de5a9 + de7a37c commit 1551043
Show file tree
Hide file tree
Showing 37 changed files with 773 additions and 354 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ on:
branches:
- main
pull_request:
paths-ignore:
- web-ui
branches:
- develop
- main
paths-ignore:
- 'web-ui/**'
pull_request:
paths:
- 'icq-relayer/**'

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
Expand All @@ -30,9 +31,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.57.2
args: --timeout 15m
# Optional: working directory, useful for monorepos
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ And if you like the project, but just don't have time to contribute, that's fine
## Code of Conduct

This project and everyone participating in it is governed by the
[Quicksilver Protocol Code of Conduct](blob/main/CODE_OF_CONDUCT.md).
[Quicksilver Protocol Code of Conduct](./CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior
to .

Expand Down
8 changes: 4 additions & 4 deletions PAID_BOUNTIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ The evaluation of a change is the sole discretion of the Quicksilver maintainers
## Getting started

Please use these steps as a guide to get you started:
- [ ] Read through [CONTRIBUTING.md](./blob/main/CONTRIBUTING.md)
- [ ] Read and understand our [CODE OF CONDUCT](./blob/main/CODE_OF_CONDUCT.md)
- [ ] Read through [CONTRIBUTING.md](./CONTRIBUTING.md)
- [ ] Read and understand our [CODE OF CONDUCT](./CODE_OF_CONDUCT.md)
- [ ] Accept our Contributor License Agreement and agree to bring in only original changes that you have the correct rights to, please do not bring in contributions that contravene our license nor intellectual property not owned by you
- [ ] Read through [ROADMAP.md](./blob/main/ROADMAP.md)
- [ ] Read through the [Google Go style guide](https://google.github.io/styleguide/go/guide/)
- [ ] Read through [ROADMAP.md](./ROADMAP.md)
- [ ] Read through the [Google Go style guide](https://google.github.io/styleguide/go/guide)
- [ ] Read through the open issues
- [ ] Watch out for issues & pull requests that may be labelled "Eligible for Bounty"
- [ ] Read through open pull requests
Expand Down
1 change: 1 addition & 0 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ func (appKeepers *AppKeepers) InitKeepers(
appCodec,
appKeepers.keys[interchainstakingtypes.StoreKey],
appKeepers.AccountKeeper,
appKeepers.AuthzKeeper,
appKeepers.BankKeeper,
appKeepers.ICAControllerKeeper,
&scopedInterchainStakingKeeper,
Expand Down
3 changes: 2 additions & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const (
ProductionChainID = "quicksilver-2"
RhyeChainID = "rhye-2"
DevnetChainID = "magic-2"
TestChainID = "testnet1"
TestChainID = "testchain1"

// testnet upgrades
V010405rc6UpgradeName = "v1.4.5-rc6"
Expand Down Expand Up @@ -45,6 +45,7 @@ const (
V010504UpgradeName = "v1.5.4"
V010505UpgradeName = "v1.5.5"
V010601UpgradeName = "v1.6.1"
V010602UpgradeName = "v1.6.2"
)

// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal
Expand Down
1 change: 1 addition & 0 deletions app/upgrades/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func Upgrades() []Upgrade {
{UpgradeName: V010504UpgradeName, CreateUpgradeHandler: V010504UpgradeHandler},
{UpgradeName: V010505UpgradeName, CreateUpgradeHandler: V010505UpgradeHandler},
{UpgradeName: V010601UpgradeName, CreateUpgradeHandler: V010601UpgradeHandler},
{UpgradeName: V010602UpgradeName, CreateUpgradeHandler: NoOpHandler},
}
}

Expand Down
78 changes: 57 additions & 21 deletions app/upgrades/v1_6.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,32 +204,68 @@ func V010601UpgradeHandler(
appKeepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
updateBlockParams(ctx, appKeepers)
if isMainnet(ctx) || isTest(ctx) {
appKeepers.UpgradeKeeper.Logger(ctx).Info("migrating capabilities")
err := v6migration.MigrateICS27ChannelCapability(
ctx,
appKeepers.IBCKeeper.Codec(),
appKeepers.GetKey(capabilitytypes.StoreKey),
appKeepers.CapabilityKeeper,
icstypes.ModuleName,
)
if err != nil {
panic(err)
}

ctx.Logger().Info("Updating agoric-3 zone to set is_118 = false")
agoricZone, _ := appKeepers.InterchainstakingKeeper.GetZone(ctx, "agoric-3")
agoricZone.Is_118 = false
appKeepers.InterchainstakingKeeper.SetZone(ctx, &agoricZone)
updateBlockParams(ctx, appKeepers)

ctx.Logger().Info("Updating agoric-3 zone to set is_118 = false")
agoricZone, _ := appKeepers.InterchainstakingKeeper.GetZone(ctx, "agoric-3")
agoricZone.Is_118 = false
appKeepers.InterchainstakingKeeper.SetZone(ctx, &agoricZone)

enableIcaHost(ctx, appKeepers)

channels := map[string]string{
"osmosis-1": "channel-2",
"cosmoshub-4": "channel-1",
"stargaze-1": "channel-0",
"juno-1": "channel-86",
"sommelier-3": "channel-101",
"regen-1": "channel-17",
"umee-1": "channel-49",
"secret-4": "channel-52",
"dydx-mainnet-1": "channel-164",
"agoric-3": "channel-125",
"ssc-1": "channel-170",
}

enableIcaHost(ctx, appKeepers)
setTransferChannels(ctx, appKeepers, channels)

channels := map[string]string{
"osmosis-1": "channel-2",
"cosmoshub-4": "channel-1",
"stargaze-1": "channel-0",
"juno-1": "channel-86",
"sommelier-3": "channel-101",
"regen-1": "channel-17",
"umee-1": "channel-49",
"secret-4": "channel-52",
"dydx-mainnet-1": "channel-164",
"agoric-3": "channel-125",
"ssc-1": "channel-170",
}
removeIncorrectLiquidTokenProtocolDatas(ctx, appKeepers, channels)

setTransferChannels(ctx, appKeepers, channels)
appKeepers.InterchainstakingKeeper.Logger(ctx).Info("setting 5 unsent unbondings for epoch 172 to STATUS_UNBONDING to be picked up by the next end blocker...")
// remit epoch 172 unbondings that did not send due to channel timeout closure.
hashes := []string{
"0000000000000000000000000000000000000000000000000000000000000560", // 1137.426431
"068d2733ac95552fa0adc35cb1ae48dfaafa49ecb86a2fab0240f2fb600ff96e", // 0.186384
"0c23dddc51cf16671c0b95bd206980825d115baa2efa985184f543e708171f67", // 25.919839
"727428acc32d07e2754a2af6eafc949bea6c85de95cba9909e457d271d5dbb83", // 5.043558
"8c4d9e582303597968111fe06b4acd5fb8dc5ebbeaa1b0a0fc7fa7fd482b1a85", // 303.404702
}
for _, hash := range hashes {
record, found := appKeepers.InterchainstakingKeeper.GetWithdrawalRecord(ctx, "cosmoshub-4", hash, icstypes.WithdrawStatusSend)
if !found {
// do not panic, in case records were updated on previous epoch.
appKeepers.InterchainstakingKeeper.Logger(ctx).Error(fmt.Sprintf("1: unable to find record for hash %s", hash))
continue
}

removeIncorrectLiquidTokenProtocolDatas(ctx, appKeepers, channels)
// update the record so that it will re-trigger the send.
appKeepers.InterchainstakingKeeper.UpdateWithdrawalRecordStatus(ctx, &record, icstypes.WithdrawStatusUnbond)
appKeepers.InterchainstakingKeeper.Logger(ctx).Info("updated record to STATUS_UNBONDING", "hash", hash)
}
}

return mm.RunMigrations(ctx, configurator, fromVM)
}
Expand Down
20 changes: 16 additions & 4 deletions docs/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,10 @@ paths:
protobuf release, and it is not used for type URLs
beginning with
type.googleapis.com.
type.googleapis.com. As of May 2023, there are no widely
used type server
implementations and no plans to implement one.
Schemes other than `http`, `https` (or the empty scheme)
Expand Down Expand Up @@ -1708,6 +1711,10 @@ paths:
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
Expand Down Expand Up @@ -1747,7 +1754,6 @@ paths:
name "y.z".
JSON
====
Expand Down Expand Up @@ -1974,7 +1980,10 @@ paths:
protobuf release, and it is not used for type URLs
beginning with
type.googleapis.com.
type.googleapis.com. As of May 2023, there are no widely
used type server
implementations and no plans to implement one.
Schemes other than `http`, `https` (or the empty scheme)
Expand Down Expand Up @@ -2019,6 +2028,10 @@ paths:
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
Expand Down Expand Up @@ -2058,7 +2071,6 @@ paths:
name "y.z".
JSON
====
Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ require (
github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b
go.opencensus.io v0.24.0
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8
golang.org/x/tools v0.22.0
golang.org/x/tools v0.23.0
google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4
google.golang.org/grpc v1.64.0
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
Expand Down Expand Up @@ -186,7 +186,7 @@ require (
github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.4 // indirect
github.com/hashicorp/go-getter v1.7.5 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
Expand Down Expand Up @@ -318,14 +318,14 @@ require (
go.uber.org/mock v0.4.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20240613232115-7f521ea00fb8 //indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.185.0 // indirect
Expand Down
Loading

0 comments on commit 1551043

Please sign in to comment.