Skip to content

Commit

Permalink
Release/v1.2.13 (#438)
Browse files Browse the repository at this point in the history
* fix: remove branch logic introduced in v1.2.11

* fix: don't use events in deposits

* chain delegation flush and rr calculation

* lint

* tidy

* fix delegation flush test

* tidy

* comment out fmt.Printlns that make tests noisy

* add tests for HandleDepositTransaction

* use gaia for simple test

* revert tx_bytes field; use proof.data

* commit reverted proto

* dont error on invalid txs; but block them from being handled in the future with a nil receipt

* fix pointer bug

* update tests for new error handling

* ensure usage of uppercase hash for receipts

* add upgrade handler
  • Loading branch information
Joe Bowman authored May 30, 2023
1 parent 07eb749 commit 59f536a
Show file tree
Hide file tree
Showing 17 changed files with 749 additions and 220 deletions.
65 changes: 61 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -873,12 +873,69 @@ func (app *Quicksilver) Name() string { return app.BaseApp.Name() }

// BeginBlocker updates every begin block
func (app *Quicksilver) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock {
if ctx.ChainID() == "quicksilver-2" && ctx.BlockHeight() == 235001 {
zone, found := app.InterchainstakingKeeper.GetZone(ctx, "stargaze-1")
if ctx.ChainID() == "quicksilver-2" && ctx.BlockHeight() == 2149250 {
// set messages_per_tx
// cosmos
zone, found := app.InterchainstakingKeeper.GetZone(ctx, "cosmoshub-4")
if !found {
panic("ERROR: unable to find expected stargaze-1 zone")
panic("unable to find zone cosmoshub-4")
}
app.InterchainstakingKeeper.OverrideRedemptionRateNoCap(ctx, zone)
zone.MessagesPerTx = 8
app.InterchainstakingKeeper.SetZone(ctx, &zone)

// stargaze
zone, found = app.InterchainstakingKeeper.GetZone(ctx, "stargaze-1")
if !found {
panic("unable to find zone stargaze-1")
}
zone.MessagesPerTx = 8
app.InterchainstakingKeeper.SetZone(ctx, &zone)

// close cosmos delegate channel

_, capability, err := app.InterchainstakingKeeper.IBCKeeper.ChannelKeeper.LookupModuleByChannel(ctx, "icacontroller-cosmoshub-4.delegate", "channel-61")
if err != nil {
panic(err)
}

if err := app.InterchainstakingKeeper.IBCKeeper.ChannelKeeper.ChanCloseInit(ctx, "icacontroller-cosmoshub-4.delegate", "channel-61", capability); err != nil {
panic(err)
}

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, interchainstakingtypes.AttributeValueCategory),
),
sdk.NewEvent(
interchainstakingtypes.EventTypeCloseICA,
sdk.NewAttribute(interchainstakingtypes.AttributeKeyPortID, "icacontroller-cosmoshub-4.delegate"),
sdk.NewAttribute(interchainstakingtypes.AttributeKeyChannelID, "channel-61"),
),
})

// close stargaze delegate channel

_, capability, err = app.InterchainstakingKeeper.IBCKeeper.ChannelKeeper.LookupModuleByChannel(ctx, "icacontroller-stargaze-1.delegate", "channel-50")
if err != nil {
panic(err)
}

if err := app.InterchainstakingKeeper.IBCKeeper.ChannelKeeper.ChanCloseInit(ctx, "icacontroller-stargaze-1.delegate", "channel-50", capability); err != nil {
panic(err)
}

ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, interchainstakingtypes.AttributeValueCategory),
),
sdk.NewEvent(
interchainstakingtypes.EventTypeCloseICA,
sdk.NewAttribute(interchainstakingtypes.AttributeKeyPortID, "icacontroller-stargaze-1.delegate"),
sdk.NewAttribute(interchainstakingtypes.AttributeKeyChannelID, "channel-50"),
),
})
}

return app.mm.BeginBlock(ctx, req)
Expand Down
26 changes: 13 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,39 @@ services:
context: .
dockerfile: Dockerfile
testzone1-1:
image: quicksilverzone/testzone:latest
image: gaia:v9.0.1-debug
hostname: testzone1-1
volumes:
- ./data/lstest-1:/icad/.ica
- ./data/lstest-1:/gaia/.gaia
command:
- icad
- gaiad
- start
ports:
- 27657:26657
- 23137:1317
testzone1-2:
image: quicksilverzone/testzone:latest
image: gaia:v9.0.1
hostname: testzone1-2
volumes:
- ./data/lstest-1a:/icad/.ica
- ./data/lstest-1a:/gaia/.gaia
command:
- icad
- gaiad
- start
testzone1-3:
image: quicksilverzone/testzone:latest
image: gaia:v9.0.1
hostname: testzone1-3
volumes:
- ./data/lstest-1b:/icad/.ica
- ./data/lstest-1b:/gaia/.gaia
command:
- icad
- gaiad
- start
testzone1-4:
image: quicksilverzone/testzone:latest
image: gaia:v9.0.1
hostname: testzone1-4
volumes:
- ./data/lstest-1c:/icad/.ica
- ./data/lstest-1c:/gaia/.gaia
command:
- icad
- gaiad
- start
testzone2-1:
image: quicksilverzone/qsosmosis:v12.1.0
Expand Down Expand Up @@ -110,7 +110,7 @@ services:
context: .
dockerfile: Dockerfile.hermes
icq:
image: quicksilverzone/interchain-queries:v0.6.2
image: quicksilverzone/interchain-queries:latest
volumes:
- ./data/icq:/icq/.icq
command:
Expand Down
6 changes: 3 additions & 3 deletions proto/quicksilver/interchainquery/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ message QueryRequestsResponse {

// GetTxResponse is the response type for the Service.GetTx method.
message GetTxWithProofResponse {
// tx is the queried transaction.
cosmos.tx.v1beta1.Tx tx = 1;
// tx is the queried transaction; deprecated.
cosmos.tx.v1beta1.Tx tx = 1; // deprecated, v1.2.13
// tx_response is the queried TxResponses.
cosmos.base.abci.v1beta1.TxResponse tx_response = 2;
cosmos.base.abci.v1beta1.TxResponse tx_response = 2; // deprecated, v1.2.13
// proof is the tmproto.TxProof for the queried tx
tendermint.types.TxProof proof = 3;
// ibc-go header to validate txs
Expand Down
2 changes: 1 addition & 1 deletion scripts/config/hermes.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ key_name = 'testkey'
store_prefix = 'ibc'
default_gas = 100000
max_gas = 3000000
gas_price = { price = 0.000, denom = 'uqck' }
gas_price = { price = 0.000, denom = 'uatom' }
gas_multiplier = 1.5
max_msg_num = 30
max_tx_size = 2097152
Expand Down
16 changes: 8 additions & 8 deletions scripts/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ 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"
TZ1_1_RUN="docker-compose $DC --ansi never run --rm -T testzone1-1 gaiad"
TZ1_2_RUN="docker-compose $DC --ansi never run --rm -T testzone1-2 gaiad"
TZ1_3_RUN="docker-compose $DC --ansi never run --rm -T testzone1-3 gaiad"
TZ1_4_RUN="docker-compose $DC --ansi never run --rm -T testzone1-4 gaiad"
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"
Expand All @@ -55,10 +55,10 @@ 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"
TZ1_1_EXEC="docker-compose $DC --ansi never exec -T testzone1-1 gaiad"
TZ1_2_EXEC="docker-compose $DC --ansi never exec -T testzone1-2 gaiad"
TZ1_3_EXEC="docker-compose $DC --ansi never exec -T testzone1-3 gaiad"
TZ1_4_EXEC="docker-compose $DC --ansi never exec -T testzone1-4 gaiad"
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"
Expand Down
2 changes: 1 addition & 1 deletion x/interchainquery/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 59f536a

Please sign in to comment.