Skip to content

Commit

Permalink
Release/v1.1.0 (#272)
Browse files Browse the repository at this point in the history
* ics-escrow module account added
* fixed user withdraw test cases
* improved fix
* removed codecov secret
* fixes zero intent scenario (#267)
* docker gh-action and pr-template (#268)
* add tg-271 test script
* emit error on receipt of Acknowledgement_error
* remove pre v1.0.0 upgrade handlers
* remove burn permissions from pr and mint module accounts
* add more verbose errors to failed tx responses
* x/mint poolincentives should go to airdrop module account
* remove BurnCoins from x/pr expectedkeepers as this was only required during development
* add rr softcap
* add upgrade handler for chain restart at height 115000; removes cosmoshub-4 registered zone, closes ICA channels, defers epochs until 4/1
Co-authored-by: Ajaz Ahmed Ansari <[email protected]>
  • Loading branch information
Joe Bowman authored Jan 2, 2023
1 parent e167f63 commit 4180101
Show file tree
Hide file tree
Showing 24 changed files with 958 additions and 452 deletions.
1 change: 0 additions & 1 deletion .github/workflows/buildtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./coverage_nogen.txt
flags: unittests
fail_ci_if_error: true
Expand Down
25 changes: 17 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# Changelog

## Released
### v0.10.1
- Fix signal intents pass-by-value bug
- Refactor MsgSignalIntent to fix amino (un)marshal issue
- Fix off-by-one error in epoch end client update
- Bump Cosmos-SDK to v0.46.4
- Bump Tendermint to v0.34.23
- Bump ibc-go to v5.1.0
- Bump Wasmd

### v1.1.0

- Add escrow account to fix unbonding bug
- Filter zero intents
- Remove burn permissions from mint and participation reward accounts
- Remove pre-v1.0.0 upgrade handlers
- Improve error responses for failed redelegation/withdrawal callbacks
- Direct poolincentives to airdrop module account
- Replace redemption rate hard cap with soft cap
- Add chain restart migration to remove cosmoshub-4, close ICA channels and burn minted qAtoms

### v1.0.0

- First production release
- Bump ibc-go to v5.1.0
- Bump tendermint to v0.34.24
- Bump cosmos-sdk to v0.46.7
33 changes: 16 additions & 17 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,23 +206,22 @@ var (

// module account permissions
maccPerms = map[string][]string{
authtypes.FeeCollectorName: nil,
distrtypes.ModuleName: nil,
// TODO: Remove Burner from mint - for dev/test only;
minttypes.ModuleName: {authtypes.Minter, authtypes.Burner},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
icatypes.ModuleName: nil,
claimsmanagertypes.ModuleName: nil,
interchainstakingtypes.ModuleName: {authtypes.Minter, authtypes.Burner},
interchainquerytypes.ModuleName: nil,
// TODO: Remove Burner from participationrewards - for dev/test only;
participationrewardstypes.ModuleName: {authtypes.Burner},
airdroptypes.ModuleName: nil,
wasm.ModuleName: {authtypes.Burner},
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
authtypes.FeeCollectorName: nil,
distrtypes.ModuleName: nil,
minttypes.ModuleName: {authtypes.Minter},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
icatypes.ModuleName: nil,
claimsmanagertypes.ModuleName: nil,
interchainstakingtypes.ModuleName: {authtypes.Minter},
interchainstakingtypes.EscrowModuleAccount: {authtypes.Burner},
interchainquerytypes.ModuleName: nil,
participationrewardstypes.ModuleName: nil,
airdroptypes.ModuleName: nil,
wasm.ModuleName: {authtypes.Burner},
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
}

// module accounts that are allowed to receive tokens
Expand Down
350 changes: 10 additions & 340 deletions app/upgrades.go

Large diffs are not rendered by default.

416 changes: 416 additions & 0 deletions scripts/tg271/TG-271-onboarding.sh

Large diffs are not rendered by default.

87 changes: 87 additions & 0 deletions scripts/tg271/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
version: '3.8'
services:
quicksilver:
image: quicksilverzone/quicksilver:v1.0.0-10-gddbec29
hostname: quicksilver
volumes:
- ./data/qstest-1:/quicksilver/.quicksilverd
build:
context: .
dockerfile: Dockerfile
ports:
- 26657:26657
- 1317:1317
quicksilver2:
image: quicksilverzone/quicksilver:v1.0.0-10-gddbec29
hostname: quicksilver2
volumes:
- ./data/qstest-1a:/quicksilver/.quicksilverd
build:
context: .
dockerfile: Dockerfile
quicksilver3:
image: quicksilverzone/quicksilver:v1.0.0-10-gddbec29
hostname: quicksilver3
volumes:
- ./data/qstest-1b:/quicksilver/.quicksilverd
build:
context: .
dockerfile: Dockerfile
gaia:
image: quicksilverzone/gaia:v7.1.0-alpine
hostname: gaia
volumes:
- ./data/gaia-1:/gaia/.gaia
command:
- gaiad
- start
ports:
- 27657:26657
- 23137:1317
gaia2:
image: quicksilverzone/gaia:v7.1.0-alpine
hostname: gaia
volumes:
- ./data/gaia-1a:/gaia/.gaia
command:
- gaiad
- start
gaia3:
image: quicksilverzone/gaia:v7.1.0-alpine
hostname: gaia
volumes:
- ./data/gaia-1b:/gaia/.gaia
command:
- gaiad
- start

hermes:
image: quicksilverzone/hermes:v1.2.0
hostname: hermes
volumes:
- ./data/hermes:/hermes/.hermes
command:
- hermes
- start
restart: always
icq:
image: quicksilverzone/interchain-queries:v0.7.7
volumes:
- ./data/icq:/icq/.icq
command:
- interchain-queries
- run
restart: always
relayer:
image: quicksilverzone/relayer:v2.1.1
volumes:
- ./data/rly:/rly/.relayer
command:
- rly
- start
- demo
#- -p
#- events
#- -b
#- "100"
restart: always
68 changes: 68 additions & 0 deletions scripts/tg271/hermes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[mode]
[mode.clients]
enabled = true
refresh = true
misbehaviour = true

[mode.connections]
enabled = true

[mode.channels]
enabled = true

[mode.packets]
enabled = true
clear_interval = 100
clear_on_start = true

[rest]
enabled = true
host = '0.0.0.0'
port = 3000

[telemetry]
enabled = false
host = '0.0.0.0'
port = 3001

[[chains]]
id = 'qstest-1'
rpc_addr = 'http://quicksilver:26657'
grpc_addr = 'http://quicksilver:9090'
websocket_addr = 'ws://quicksilver:26657/websocket'
rpc_timeout = '10s'
account_prefix = 'quick'
key_name = 'testkey'
store_prefix = 'ibc'
default_gas = 100000
max_gas = 5000000
gas_price = { price = 0.000000, denom = 'uqck' }
gas_multiplier = 1.5
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
max_block_time = '10s'
trusting_period = '3minutes'
trust_threshold = { numerator = '1', denominator = '3' }
address_type = { derivation = 'cosmos' }

[[chains]]
id = 'gaia-1'
rpc_addr = 'http://gaia:26657'
grpc_addr = 'http://gaia:9090'
websocket_addr = 'ws://gaia:26657/websocket'
rpc_timeout = '10s'
account_prefix = 'cosmos'
key_name = 'testkey'
store_prefix = 'ibc'
default_gas = 100000
max_gas = 3000000
gas_price = { price = 0.000, denom = 'uatom' }
gas_multiplier = 1.5
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
max_block_time = '10s'
trusting_period = '3minutes'
trust_threshold = { numerator = '1', denominator = '3' }
address_type = { derivation = 'cosmos' }
19 changes: 19 additions & 0 deletions scripts/tg271/wallets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
VAL_ADDRESS_1=quick18hl5c9xn5dze2g50uaw0l2mr02ew57zkpdc37j
DEMO_ADDRESS_1=quick1m9l358xunhhwds0568za49mzhvuxx9uxgaye9l
RLY_ADDRESS_1=quick1mjk79fjjgpplak5wq838w0yd982gzkyfgjlvyf
VAL_ADDRESS_6=quick157m90t8f98xt0q7xnfax47lhnyxwmr30krjg9x
DEMO_ADDRESS_6=quick1ervxcpt8xfhjj72y6lweg9d8j4u9a23lakpz7t
VAL_ADDRESS_7=quick14lznr7kt0r2thcuv5qap9q5n6mkth7rw9nel4a
DEMO_ADDRESS_7=quick1nj0gl8ywa46zcpcuvvyu3ya9ht75rqjrct9pwp
VAL_ADDRESS_2=cosmos1qnk2n4nlkpw9xfqntladh74w6ujtulwn7j8za9
DEMO_ADDRESS_2=cosmos10h9stc5v6ntgeygf5xf945njqq5h32r53uquvw
RLY_ADDRESS_2=cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs
VAL_ADDRESS_3=cosmos1qn2vcjxk24tzsrvst2h2zj744ydaljd3ppsnph
DEMO_ADDRESS_3=cosmos1l3779e2g49ganyaqqhhuchfmhnq2e5rekwh5v4

VAL_ADDRESS_4=cosmos16pxh2v4hr28h2gkntgfk8qgh47pfmjfhfvfw6t
DEMO_ADDRESS_4=cosmos1wfwcegpsa3v47ht0cf3cg9q9f4h4vkk88w7hrn

VAL_VALOPER_2=cosmosvaloper1qnk2n4nlkpw9xfqntladh74w6ujtulwnmxnh3k
VAL_VALOPER_3=cosmosvaloper1qn2vcjxk24tzsrvst2h2zj744ydaljd3y4yxdy
VAL_VALOPER_4=cosmosvaloper16pxh2v4hr28h2gkntgfk8qgh47pfmjfhvcamkc
63 changes: 33 additions & 30 deletions scripts/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ else
TIME="$(date --date '-2 minutes' +%Y-%m-%dT%H:%M:00Z -u)"
fi

echo $SED
echo $TIME

QS_IMAGE=quicksilverzone/quicksilver
QS_VERSION=latest
TZ_IMAGE=quicksilverzone/testzone
Expand All @@ -35,35 +32,41 @@ CHAINID_0=qstest-1
CHAINID_1=lstest-1
CHAINID_2=lstest-2

QS1_RUN="docker-compose --ansi never run --rm -T quicksilver quicksilverd"
QS2_RUN="docker-compose --ansi never run --rm -T quicksilver2 quicksilverd"
QS3_RUN="docker-compose --ansi never run --rm -T quicksilver3 quicksilverd"
TZ1_1_RUN="docker-compose --ansi never run --rm -T testzone1-1 icad"
TZ1_2_RUN="docker-compose --ansi never run --rm -T testzone1-2 icad"
TZ1_3_RUN="docker-compose --ansi never run --rm -T testzone1-3 icad"
TZ1_4_RUN="docker-compose --ansi never run --rm -T testzone1-4 icad"
TZ2_1_RUN="docker-compose --ansi never run --rm -T testzone2-1 osmosisd"
TZ2_2_RUN="docker-compose --ansi never run --rm -T testzone2-2 osmosisd"
TZ2_3_RUN="docker-compose --ansi never run --rm -T testzone2-3 osmosisd"
TZ2_4_RUN="docker-compose --ansi never run --rm -T testzone2-4 osmosisd"
RLY_RUN="docker-compose --ansi never run --rm -T relayer rly"
HERMES_RUN="docker-compose --ansi never run --rm -T hermes hermes"
QS1_RUN="docker-compose $DC --ansi never run --rm -T quicksilver quicksilverd"
QS2_RUN="docker-compose $DC --ansi never run --rm -T quicksilver2 quicksilverd"
QS3_RUN="docker-compose $DC --ansi never run --rm -T quicksilver3 quicksilverd"
GAIA1_RUN="docker-compose $DC --ansi never run --rm -T gaia gaiad"
GAIA2_RUN="docker-compose $DC --ansi never run --rm -T gaia2 gaiad"
GAIA3_RUN="docker-compose $DC --ansi never run --rm -T gaia3 gaiad"
TZ1_1_RUN="docker-compose $DC --ansi never run --rm -T testzone1-1 icad"
TZ1_2_RUN="docker-compose $DC --ansi never run --rm -T testzone1-2 icad"
TZ1_3_RUN="docker-compose $DC --ansi never run --rm -T testzone1-3 icad"
TZ1_4_RUN="docker-compose $DC --ansi never run --rm -T testzone1-4 icad"
TZ2_1_RUN="docker-compose $DC --ansi never run --rm -T testzone2-1 osmosisd"
TZ2_2_RUN="docker-compose $DC --ansi never run --rm -T testzone2-2 osmosisd"
TZ2_3_RUN="docker-compose $DC --ansi never run --rm -T testzone2-3 osmosisd"
TZ2_4_RUN="docker-compose $DC --ansi never run --rm -T testzone2-4 osmosisd"
RLY_RUN="docker-compose $DC --ansi never run --rm -T relayer rly"
HERMES_RUN="docker-compose $DC --ansi never run --rm -T hermes hermes"

QS1_EXEC="docker-compose --ansi never exec -T quicksilver quicksilverd"
QS2_EXEC="docker-compose --ansi never exec -T quicksilver2 quicksilverd"
QS3_EXEC="docker-compose --ansi never exec -T quicksilver3 quicksilverd"
TZ1_1_EXEC="docker-compose --ansi never exec -T testzone1-1 icad"
TZ1_2_EXEC="docker-compose --ansi never exec -T testzone1-2 icad"
TZ1_3_EXEC="docker-compose --ansi never exec -T testzone1-3 icad"
TZ1_4_EXEC="docker-compose --ansi never exec -T testzone1-4 icad"
TZ2_1_EXEC="docker-compose --ansi never exec -T testzone2-1 osmosisd"
TZ2_2_EXEC="docker-compose --ansi never exec -T testzone2-2 osmosisd"
TZ2_3_EXEC="docker-compose --ansi never exec -T testzone2-3 osmosisd"
TZ2_4_EXEC="docker-compose --ansi never exec -T testzone2-4 osmosisd"
RLY_EXEC="docker-compose --ansi never exec -T relayer"
QS1_EXEC="docker-compose $DC --ansi never exec -T quicksilver quicksilverd"
QS2_EXEC="docker-compose $DC --ansi never exec -T quicksilver2 quicksilverd"
QS3_EXEC="docker-compose $DC --ansi never exec -T quicksilver3 quicksilverd"
GAIA1_EXEC="docker-compose $DC --ansi never exec -T gaia gaiad"
GAIA2_EXEC="docker-compose $DC --ansi never exec -T gaia2 gaiad"
GAIA3_EXEC="docker-compose $DC --ansi never exec -T gaia3 gaiad"
TZ1_1_EXEC="docker-compose $DC --ansi never exec -T testzone1-1 icad"
TZ1_2_EXEC="docker-compose $DC --ansi never exec -T testzone1-2 icad"
TZ1_3_EXEC="docker-compose $DC --ansi never exec -T testzone1-3 icad"
TZ1_4_EXEC="docker-compose $DC --ansi never exec -T testzone1-4 icad"
TZ2_1_EXEC="docker-compose $DC --ansi never exec -T testzone2-1 osmosisd"
TZ2_2_EXEC="docker-compose $DC --ansi never exec -T testzone2-2 osmosisd"
TZ2_3_EXEC="docker-compose $DC --ansi never exec -T testzone2-3 osmosisd"
TZ2_4_EXEC="docker-compose $DC --ansi never exec -T testzone2-4 osmosisd"
RLY_EXEC="docker-compose $DC --ansi never exec -T relayer"

ICQ_RUN="docker-compose --ansi never run --rm -T icq interchain-queries"
ICQ2_RUN="docker-compose --ansi never run --rm -T icq2 interchain-queries"
ICQ_RUN="docker-compose $DC --ansi never run --rm -T icq interchain-queries"
ICQ2_RUN="docker-compose $DC --ansi never run --rm -T icq2 interchain-queries"

VAL_MNEMONIC_1="clock post desk civil pottery foster expand merit dash seminar song memory figure uniform spice circle try happy obvious trash crime hybrid hood cushion"
VAL_MNEMONIC_2="angry twist harsh drastic left brass behave host shove marriage fall update business leg direct reward object ugly security warm tuna model broccoli choice"
Expand Down
6 changes: 6 additions & 0 deletions x/interchainstaking/keeper/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ type zoneItrFn func(index int64, zoneInfo types.Zone) (stop bool)
// BeginBlocker of interchainstaking module
func (k Keeper) BeginBlocker(ctx sdk.Context) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)

if ctx.ChainID() == "quicksilver-1" && ctx.BlockHeight() == 115001 {
// trigger one time function in lieu of upgrade handler that will trigger on chain resumption.
V010100UpgradeHandler(ctx, &k)
}

if ctx.BlockHeight()%30 == 0 {
if err := k.GCCompletedRedelegations(ctx); err != nil {
k.Logger(ctx).Error("error in GCCompletedRedelegations", "error", err)
Expand Down
11 changes: 10 additions & 1 deletion x/interchainstaking/keeper/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@ import (
"github.com/ingenuity-build/quicksilver/x/interchainstaking/types"
)

// we do not wish to process epoch boundaries that occurred during the chain halt.
func skipProductionEpoch(ctx sdk.Context, epochNumber int64) bool {
if ctx.ChainID() != "quicksilver-1" {
return false
}

return epochNumber < 7 // epoch 7 will start on 4th Jan 2023.
}

func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) {
}

func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) {
// every epoch
if epochIdentifier == "epoch" {
if epochIdentifier == "epoch" && !skipProductionEpoch(ctx, epochNumber) {
k.Logger(ctx).Info("handling epoch end")

k.IterateZones(ctx, func(index int64, zoneInfo types.Zone) (stop bool) {
Expand Down
Loading

0 comments on commit 4180101

Please sign in to comment.