Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBC Rate Limiting #556

Merged
merged 80 commits into from
Feb 18, 2023
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
950a274
scaffold ibc rate limit module (#473)
antstalepresh Dec 7, 2022
21089a8
stride v3 -> v4 in rate limit module
sampocs Dec 7, 2022
f991e57
v3 -> v4 for rate limit protos
sampocs Dec 7, 2022
6e2a037
formatted and regenerated protos
sampocs Dec 7, 2022
32c67d5
removed stale ignite comments
sampocs Dec 7, 2022
8a608c5
changed store key since module name was changed
sampocs Dec 7, 2022
d5e4098
added remove quota proto types
sampocs Dec 7, 2022
573b0e8
added remove quota message to msg_server
sampocs Dec 7, 2022
43b8bca
added quota query types
sampocs Dec 7, 2022
3e7b583
added quota queries to grpc query
sampocs Dec 7, 2022
acc565c
Added Unit Test Framework to ratelimit module (#480)
sampocs Dec 8, 2022
bff325c
add msg types and routes, add creator field to tx msgs
antstalepresh Dec 8, 2022
fab8893
some minor fixes
antstalepresh Dec 8, 2022
1e35a51
minor fixes
antstalepresh Dec 8, 2022
6b2cb18
add newflow function
antstalepresh Dec 8, 2022
8adfb9f
[RATE-LIMIT] Path helper functions (#479)
sampocs Dec 9, 2022
ebcae0b
[RATE-LIMIT]: RateLimit Helper Functions and Queries (#490)
sampocs Dec 9, 2022
8b5a0b9
implement quota functions
antstalepresh Dec 8, 2022
2937b8d
change addquota to setquota, add unit tests for quota msgs
antstalepresh Dec 9, 2022
d3a4369
convert CheckExceedsQuota function to member function of quota object
antstalepresh Dec 9, 2022
c2e26da
adjustments for GetQuota function
antstalepresh Dec 9, 2022
d3612ad
add unit tests for quota keeper functions
antstalepresh Dec 9, 2022
2b25f18
minor adjustments
antstalepresh Dec 9, 2022
10ee62a
implement cli & tests
antstalepresh Dec 11, 2022
f45ad70
fix feedbacks
antstalepresh Dec 12, 2022
12a0dfe
Move Quota Attributes to RateLimit object (#502)
sampocs Dec 13, 2022
0200f69
address pr comments
antstalepresh Dec 13, 2022
c83d069
minor fix
antstalepresh Dec 13, 2022
275cbdb
adjust quota_test
antstalepresh Dec 13, 2022
334de7f
minor adjustments
antstalepresh Dec 13, 2022
bbf7ec1
[RATE-LIMIT] Implemented AddInflow, AddOutflow, GetChannelValue (#506)
sampocs Dec 14, 2022
1397864
[RATE-LIMIT] Added Epochs to ratelimit module (#507)
sampocs Dec 14, 2022
9df5cbf
minor comment issues
antstalepresh Dec 14, 2022
a2ef933
implementing ratelimit msgserver & tests (#511)
antstalepresh Dec 14, 2022
0d3b8c5
check if channel value is zero
antstalepresh Dec 15, 2022
a2efe4e
[RATE-LIMIT] Implement CheckRateLimit, SendPacket, OnRecvPacket (#515)
sampocs Dec 19, 2022
e176282
add genesis handler and tests, update some keeper tests
antstalepresh Dec 19, 2022
e7abc29
added genesis test helper function (#528)
sampocs Dec 19, 2022
67da44b
add error catches for mint functions
antstalepresh Dec 19, 2022
352601f
fix some cli config issues, add tests for clis
antstalepresh Dec 15, 2022
65200dc
adjust removeratelimit test
antstalepresh Dec 19, 2022
59cdbba
removed array from cli tests
sampocs Dec 20, 2022
ec41e24
fix a comment issue, clean some codebase (#532)
antstalepresh Dec 20, 2022
15364df
[RATE-LIMIT] Unit Tests for Packet Callback Functions (#534)
sampocs Dec 21, 2022
ad01251
[RATE-LIMIT] Query Rate Limits by ChainID (#535)
sampocs Dec 22, 2022
6be7aed
[RATE-LIMIT] Bash Integration Tests (#541)
sampocs Dec 30, 2022
d02ce19
[RATE-LIMIT] Expose Transactions to Governance (#549)
sampocs Jan 4, 2023
9bb5ef1
[RATE-LIMIT] Docs (#553)
sampocs Jan 4, 2023
510d29d
added TODO to add hour epoch
sampocs Jan 4, 2023
e00d9ce
Merge branch 'main' into rate-limiter
asalzmann Jan 5, 2023
4213325
update ratelimit query, add ratelimits-by-channel query
antstalepresh Jan 5, 2023
6ae4dd8
address pr comments
antstalepresh Jan 5, 2023
30e6e73
update ratelimit query, add ratelimits-by-channel query (#557)
antstalepresh Jan 6, 2023
79a1930
Merge branch 'rate-limiter' of github.com:Stride-Labs/stride into rat…
sampocs Jan 17, 2023
02cfd23
addressed pr comments
sampocs Jan 18, 2023
93bd465
Merge branch 'main' into rate-limiter
sampocs Jan 23, 2023
7d60f82
ibc go v3 -> v5
sampocs Jan 23, 2023
79d653e
stride v4 -> v5 in rate limit go files
sampocs Jan 23, 2023
c4f2618
stride v4 -> v5 in rate limit protos
sampocs Jan 23, 2023
3a69e45
removed rest client
sampocs Jan 23, 2023
560f7e2
45 -> 46: sdk.Int to sdkmath.Int, gov types v1beta1, OnChanOpenInit
sampocs Jan 23, 2023
1f3d75f
added boilerplate for get app version
sampocs Jan 23, 2023
eb795bd
fixed bug in denom flag
sampocs Jan 24, 2023
5409792
fixed integration tests
sampocs Jan 24, 2023
0d1c62e
renamed ibc_module to ibc_middleware
sampocs Jan 25, 2023
4f46c2e
refactored rate limit middleware wiring
sampocs Jan 25, 2023
e4c1e9c
finished middleware refactor
sampocs Jan 31, 2023
703d432
removed question from comments
sampocs Feb 1, 2023
1a1bd4e
added events when rate limit was exceeded
sampocs Feb 14, 2023
d3064f6
revert config.sh
sampocs Feb 14, 2023
aa0af49
added denom blacklist
sampocs Feb 16, 2023
4fa3ad7
Merge branch 'main' into rate-limiter
sampocs Feb 16, 2023
72b07ce
fixed lint errors
sampocs Feb 16, 2023
62d5857
Update x/ratelimit/README.md
sampocs Feb 17, 2023
fa505fc
refactored event to have differentiated attributes
sampocs Feb 18, 2023
8b5b394
Merge branch 'rate-limiter' of github.com:Stride-Labs/stride into rat…
sampocs Feb 18, 2023
e866d8e
Merge branch 'main' into rate-limiter
sampocs Feb 18, 2023
dad4ec9
added error logs
sampocs Feb 18, 2023
7bee669
fixed lint errors
sampocs Feb 18, 2023
90349c3
created lighterweight suiteless test helper
sampocs Feb 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ We use the following modules from [Osmosis](https://github.com/osmosis-labs/osmo
```
x/epochs
x/mint
x/ratelimit
asalzmann marked this conversation as resolved.
Show resolved Hide resolved
```
We use the following module (marketed as public infra) from [Quicksilver](https://github.com/ingenuity-build/quicksilver) provided under [this License](https://github.com/ingenuity-build/quicksilver/blob/main/LICENSE):
```
Expand Down
48 changes: 45 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ import (
stakeibcclient "github.com/Stride-Labs/stride/v4/x/stakeibc/client"
stakeibcmodulekeeper "github.com/Stride-Labs/stride/v4/x/stakeibc/keeper"
stakeibcmoduletypes "github.com/Stride-Labs/stride/v4/x/stakeibc/types"

ratelimitmodule "github.com/Stride-Labs/stride/v4/x/ratelimit"
ratelimitclient "github.com/Stride-Labs/stride/v4/x/ratelimit/client"
ratelimitmodulekeeper "github.com/Stride-Labs/stride/v4/x/ratelimit/keeper"
ratelimitmoduletypes "github.com/Stride-Labs/stride/v4/x/ratelimit/types"
// this line is used by starport scaffolding # stargate/app/moduleImport
)

Expand All @@ -153,6 +158,10 @@ func getGovProposalHandlers() []govclient.ProposalHandler {
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
stakeibcclient.AddValidatorProposalHandler,
ratelimitclient.AddRateLimitProposalHandler,
ratelimitclient.UpdateRateLimitProposalHandler,
ratelimitclient.RemoveRateLimitProposalHandler,
ratelimitclient.ResetRateLimitProposalHandler,
// this line is used by starport scaffolding # stargate/app/govProposalHandler
)

Expand Down Expand Up @@ -192,6 +201,7 @@ var (
interchainquery.AppModuleBasic{},
ica.AppModuleBasic{},
recordsmodule.AppModuleBasic{},
ratelimitmodule.AppModuleBasic{},
icacallbacksmodule.AppModuleBasic{},
claim.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
Expand Down Expand Up @@ -283,6 +293,9 @@ type StrideApp struct {
RecordsKeeper recordsmodulekeeper.Keeper
ScopedIcacallbacksKeeper capabilitykeeper.ScopedKeeper
IcacallbacksKeeper icacallbacksmodulekeeper.Keeper
ScopedratelimitKeeper capabilitykeeper.ScopedKeeper
RatelimitKeeper ratelimitmodulekeeper.Keeper
RatelimitICS4Wrapper *ratelimitmodule.ICS4Wrapper
ClaimKeeper claimkeeper.Keeper
// this line is used by starport scaffolding # stargate/app/keeperDeclaration

Expand Down Expand Up @@ -324,6 +337,7 @@ func NewStrideApp(
interchainquerytypes.StoreKey,
icacontrollertypes.StoreKey, icahosttypes.StoreKey,
recordsmoduletypes.StoreKey,
ratelimitmoduletypes.StoreKey,
icacallbacksmoduletypes.StoreKey,
authzkeeper.StoreKey,
claimtypes.StoreKey,
Expand Down Expand Up @@ -412,10 +426,29 @@ func NewStrideApp(
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper,
)

// Create Ratelimit Keeper
scopedratelimitKeeper := app.CapabilityKeeper.ScopeToModule(ratelimitmoduletypes.ModuleName)
app.ScopedratelimitKeeper = scopedratelimitKeeper
app.RatelimitKeeper = *ratelimitmodulekeeper.NewKeeper(
appCodec,
keys[ratelimitmoduletypes.StoreKey],
app.GetSubspace(ratelimitmoduletypes.ModuleName),
app.BankKeeper,
app.IBCKeeper.ChannelKeeper,
)
ratelimitModule := ratelimitmodule.NewAppModule(appCodec, app.RatelimitKeeper)

// Create ICS4Wrapper middleware
rateLimitICS4Wrapper := ratelimitmodule.NewICS4Middleware(
app.IBCKeeper.ChannelKeeper,
app.RatelimitKeeper,
)
app.RatelimitICS4Wrapper = &rateLimitICS4Wrapper

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
app.RatelimitICS4Wrapper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
app.AccountKeeper, app.BankKeeper, scopedTransferKeeper,
)
transferModule := transfer.NewAppModule(app.TransferKeeper)
Expand Down Expand Up @@ -516,7 +549,8 @@ func NewStrideApp(
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(stakeibcmoduletypes.RouterKey, stakeibcmodule.NewStakeibcProposalHandler(app.StakeibcKeeper))
AddRoute(stakeibcmoduletypes.RouterKey, stakeibcmodule.NewStakeibcProposalHandler(app.StakeibcKeeper)).
AddRoute(ratelimitmoduletypes.RouterKey, ratelimitmodule.NewRateLimitProposalHandler(app.RatelimitKeeper, app.IBCKeeper.ChannelKeeper))

app.GovKeeper = govkeeper.NewKeeper(
appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper,
Expand All @@ -534,6 +568,7 @@ func NewStrideApp(
app.StakeibcKeeper.Hooks(),
app.MintKeeper.Hooks(),
app.ClaimKeeper.Hooks(),
app.RatelimitKeeper.Hooks(),
),
)
epochsModule := epochsmodule.NewAppModule(appCodec, app.EpochsKeeper)
Expand Down Expand Up @@ -576,15 +611,17 @@ func NewStrideApp(

// Stack two contains
// - IBC
// - ratelimit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the thinking around the ordering here? I'm not sure it matters, just curious. Conceptually, I'd probably move this down closer to transfer (because it's lower level), but not sure there's actually a reason to do so!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No specific reasoning. I'm fine with moving it closer to transfer

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, I actually think the most logical ordering of everything is probably:

IBC
ratelimit
transfer
records

At the end of the day, it's pretty arbitrary since traffic floats in both directions. But records feels closest to the core application and rate limit/transfer feel more like related to the actually transport/packets.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That framework makes sense. transfer seems closer to IBC than ratelimit (you can have transfer w/o ratelimit, but not vice-versa)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow the with/without argument?

I think of transfer as closer to the application (e.g. it's what mints/burns tokens to users) and ratelimit more as middleware that is meant to sit in between the relaying of packets (IBC) and the handling of those packets (Base App)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think right now there's a bug - I'm refactoring the middleware wiring as we speak.

I think we need to revert one of the cases, and it depends on the ordering of the stack (as described in my last example), but right now we're reverting neither.

I'm also wondering if it makes sense to just have separate stacks?

Copy link
Contributor

@asalzmann asalzmann Jan 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this error being thrown not revert sends? I would have expected the error to propagate through the middleware stack

I'm also wondering if it makes sense to just have separate stacks?

Can you elaborate on this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm actually yeah I think you're right with the current way we set it up. It think the SendPacket you linked above is called in ibc-go here

But that's just cause we added the rateLimitKeeper as the ics4Wrapper in the transfer keeper - but it's not clear to me yet if that's the right way to set it up

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisited this -

I think transfer has to sit at the bottom of the stack because the transfer IBCModule does not have the app attribute used for middleware (e.g. this vs this). Meaning, if you had transfer at the top of the stack, then there's no way for the Transfer OnRecvPacket callback to pass the packet down to a different middleware.


That then brings us full circle back to the question of whether the stack should be

records
ratelimit
transfer

OR

ratelimit
records
transfer

And between those two, I think I'd side with your OG suggestion that keeping ratelimit closest to transfer probably makes the most sense.

Sorry for the runaround!

Copy link
Collaborator Author

@sampocs sampocs Jan 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then back to the error question…

(once again for context)

  • SendPacket flows transferratelimitrecords
  • RecvPacket flow recordsratelimittransfer

There are the following two error cases in the rate limit module:

  • SendPacket - As implemented already and discussed above, I think throwing an error from ratelimit is adequate because it will propagate back to the transfer module and should atomically fail & discard anything the transfer module had done already
  • OnRecvPacket - As implemented, I think returning an AckError is adequate here because nothing has been done yet on the Stride side of things that would need to get undone (contrary to something like OnAckPacket). And when we return the ack error, it should propagate back to records and then get emitted in the core IBC keeper

// - records
// - transfer
// - base app
recordsStack := recordsmodule.NewIBCModule(app.RecordsKeeper, transferIBCModule)
ratelimitStack := ratelimitmodule.NewIBCModule(app.RatelimitKeeper, recordsStack)

// Create static IBC router, add transfer route, then set and seal it
ibcRouter := ibcporttypes.NewRouter()
ibcRouter.
AddRoute(ibctransfertypes.ModuleName, recordsStack).
AddRoute(ibctransfertypes.ModuleName, ratelimitStack).
AddRoute(icacontrollertypes.SubModuleName, icamiddlewareStack).
AddRoute(icahosttypes.SubModuleName, icaHostIBCModule).
// Note, authentication module packets are routed to the top level of the middleware stack
Expand Down Expand Up @@ -631,6 +668,7 @@ func NewStrideApp(
interchainQueryModule,
icaModule,
recordsModule,
ratelimitModule,
icacallbacksModule,
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
// this line is used by starport scaffolding # stargate/app/appModule
Expand Down Expand Up @@ -665,6 +703,7 @@ func NewStrideApp(
epochsmoduletypes.ModuleName,
interchainquerytypes.ModuleName,
recordsmoduletypes.ModuleName,
ratelimitmoduletypes.ModuleName,
icacallbacksmoduletypes.ModuleName,
claimtypes.ModuleName,
authz.ModuleName,
Expand Down Expand Up @@ -696,6 +735,7 @@ func NewStrideApp(
epochsmoduletypes.ModuleName,
interchainquerytypes.ModuleName,
recordsmoduletypes.ModuleName,
ratelimitmoduletypes.ModuleName,
icacallbacksmoduletypes.ModuleName,
claimtypes.ModuleName,
authz.ModuleName,
Expand Down Expand Up @@ -732,6 +772,7 @@ func NewStrideApp(
epochsmoduletypes.ModuleName,
interchainquerytypes.ModuleName,
recordsmoduletypes.ModuleName,
ratelimitmoduletypes.ModuleName,
icacallbacksmoduletypes.ModuleName,
claimtypes.ModuleName,
authz.ModuleName,
Expand Down Expand Up @@ -1001,6 +1042,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
paramsKeeper.Subspace(icahosttypes.SubModuleName)
paramsKeeper.Subspace(recordsmoduletypes.ModuleName)
paramsKeeper.Subspace(ratelimitmoduletypes.ModuleName)
paramsKeeper.Subspace(icacallbacksmoduletypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace

Expand Down
8 changes: 8 additions & 0 deletions app/apptesting/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@ func (s *AppTestHelper) Setup() {
s.TestAccs = CreateRandomAccounts(3)
s.IbcEnabled = false
s.IcaAddresses = make(map[string]string)
}

// Instantiates an TestHelper without the test suite
// This is for testing scenarios where we simply need the setup function to run,
// and need access to the TestHelper attributes and keepers (e.g. genesis tests)
func SetupSuitelessTestHelper() AppTestHelper {
s := AppTestHelper{}
s.Setup()
return s
}

// Mints coins directly to a module account
Expand Down
4 changes: 4 additions & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ func (app *StrideApp) setupUpgradeHandlers() {
Added: []string{claimtypes.StoreKey},
}
}
// TODO: add ratelimit store key when module is added
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add rate limits for existing denoms in the upgrade?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's not a bad idea

// storeUpgrades = &storetypes.StoreUpgrades{
// Added: []string{ratelimittypes.StoreKey},
// }

if storeUpgrades != nil {
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, storeUpgrades))
Expand Down
3 changes: 2 additions & 1 deletion dockernet/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ KEYS_LOGS=$SCRIPT_DIR/logs/keys.log
HOST_CHAINS=()

if [[ "${ALL_HOST_CHAINS:-false}" == "true" ]]; then
HOST_CHAINS=(GAIA JUNO OSMO STARS)
HOST_CHAINS=(GAIA JUNO OSMO)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove STARS out of curiosity?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just figured it was overkill, we had also removed it from main

elif [[ "${#HOST_CHAINS[@]}" == "0" ]]; then
HOST_CHAINS=(GAIA)
fi
Expand Down Expand Up @@ -71,6 +71,7 @@ IBC_STARS_DENOM=$IBC_STARS_CHANNEL_3_DENOM

# CHAIN PARAMS
BLOCK_TIME='1s'
STRIDE_HOUR_EPOCH_DURATION="90s"
STRIDE_DAY_EPOCH_DURATION="100s"
STRIDE_EPOCH_EPOCH_DURATION="40s"
HOST_DAY_EPOCH_DURATION="60s"
Expand Down
45 changes: 45 additions & 0 deletions dockernet/config/relayer_config_juno_osmo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Sometimes it's beneficial to test a channel that is not connected with Stride
# For this case, we can use juno <> osmo
global:
api-listen-addr: :5183
timeout: 10s
memo: ""
light-cache-size: 20
chains:
juno:
type: cosmos
value:
key: juno-osmo-rly1
chain-id: JUNO
rpc-addr: http://juno1:26657
account-prefix: juno
keyring-backend: test
gas-adjustment: 1.2
gas-prices: 0.01ujuno
debug: false
timeout: 20s
output-format: json
sign-mode: direct
osmo:
type: cosmos
value:
key: juno-osmo-rly2
chain-id: OSMO
rpc-addr: http://osmo1:26657
account-prefix: osmo
keyring-backend: test
gas-adjustment: 1.2
gas-prices: 0.01uosmo
debug: false
timeout: 20s
output-format: json
sign-mode: direct
paths:
juno-osmo:
src:
chain-id: JUNO
dst:
chain-id: OSMO
src-channel-filter:
rule: ""
channel-list: []
7 changes: 7 additions & 0 deletions dockernet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,10 @@ services:
- ./state/relayer-stars:/home/relayer/.relayer
restart: always
command: [ "bash", "start.sh", "stride-stars" ]

relayer-juno-osmo:
image: stridezone:relayer
volumes:
- ./state/relayer-juno-osmo:/home/relayer/.relayer
restart: always
command: [ "bash", "start.sh", "juno-osmo" ]
12 changes: 12 additions & 0 deletions dockernet/scripts/ratelimit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Rate Limit Integration Tests
* **These tests are not intended to be run with normal CI, they were meant as a comprehensive sanity check before deploying the module and are redundant with the unit tests.**
* **WARNING**: `STRIDE_HOUR_EPOCH_DURATION` must be at least '90s' in `config.sh`
* Start dockernet
```
make start-docker
```
* Run the integration tests
```
bash dockernet/scripts/ratelimit/run_all_tests.sh
```
* Each test will print a checkmark or X depending on the status - if there are no X's, the tests passed.
Loading