-
Notifications
You must be signed in to change notification settings - Fork 99
feat!: xcm transfer rate limit pallet #561
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
a031bef
patch cumulus to xcmp queue version with defer filter
apopiak cb67a62
cargo lock changes
apopiak c5a52ca
add xcm-rate-limiter pallet base
dmoka 9dd2264
add first failing test for tracking incoming asset liquidity
dmoka 821a30f
add first implementation for tracking asset volume
dmoka 45383d8
refactor rate limiter and test, add teleported asset case
apopiak 29c5a1b
adjust runtime-benchmark feature in cargo toml
apopiak c5bc3f0
defer xcm with duration when rate limit exceeded
dmoka fa93624
add logic for setting rate limit per asset
dmoka b2fe0d0
add todos
dmoka bbda095
add root check for set limit
dmoka aba2538
started building a deffered message queue logic
jak-pan d52784d
WIP - add calculation for deferred by, based on block time difference
dmoka dbe3ad6
add first implementation for calculatin deferred duration
dmoka 47db0b2
implement decay of accumulated amounts
apopiak 87d9901
added deferring logic to XCMDeferFilter
jak-pan 1919aa0
use associated types to get rate limit per asset
apopiak baa873d
add notes and todos + slight refactor
apopiak 40339ef
add todo
dmoka 0209bed
remove rate limits managing as the rate limits are stored in asset re…
dmoka 7fdd188
remove unused events and error specs
dmoka 12d0dd3
add doc for storage
dmoka fe0b7ad
add dedicated type for storing accumulated liquidity
dmoka 56949fb
add missing doc
dmoka d0f86da
renaming
dmoka d60f624
renaming
dmoka 783c545
add missing assertions
dmoka db2da9c
ignore not used params
dmoka d3ac7b1
avoid redoing computation when calculating deferred duration
dmoka 0c1fb67
implement MaxDeferDuration
apopiak bc37735
use RelayChainBlockNumber for durations everywhere
apopiak 7f89787
add missing doc comment
dmoka 66d7e32
implement xcm rate limiter for runtime
dmoka aae8b32
write and fix xcm rate limiter integration test (was missing in runtime)
apopiak 78e528d
formatting
apopiak de3a599
update teleport test for rate limiter
apopiak f84f41c
test for v2 conversion and defer for max when not able to convert
apopiak 3a913a4
formatting
apopiak e26e4b3
check message hash
apopiak 39a6608
Merge branch 'v0.9.38' into feat/xcm-defer
apopiak cf1e223
update cargo.lock
apopiak 6cdabef
run and apply cargo fix
apopiak b8b0641
formatting
apopiak fb67a91
add missing parameter
apopiak 9db7c29
more formatting and similar fixes
apopiak 72eb591
make clippy even happier
apopiak 5f735b6
Merge branch 'master' of github.com:galacticcouncil/HydraDX-node into…
apopiak e410fb4
formatting
apopiak c4985fd
bump crate versions
apopiak e4d3d3b
activate std for runtime deps in integration tests
apopiak 90f8fc4
update cargo.lock
apopiak 5edd867
Merge branch 'master' of github.com:galacticcouncil/HydraDX-node into…
apopiak 45f35b6
adjust integation test to new relay block number source
apopiak 41d6f3c
extract rate_limiter math to math package
apopiak 8943213
Merge branch 'master' into feat/xcm-defer
apopiak 7504d1a
move RelayChainBlockNumberProvider and HashProvider to adapters
apopiak 0c9f202
add frame_system dep
apopiak a24fa51
use RelayChainBlockNumber type in adapter
apopiak 8efe496
use default weight in mock
apopiak 3790fe0
update cumulus to fixed benchmark version of xcmp queue
apopiak b421c53
Merge branch 'master' of github.com:galacticcouncil/HydraDX-node into…
apopiak a5d7811
bump crate versions
apopiak 5dcf301
bump runtime version
apopiak 06213a2
bump more crates
apopiak eb3db77
add doc comments and another prop test
apopiak 9522d1c
update xcmp_queue to new version with weights and add benchmarked wei…
apopiak 0b0cad9
update xcmp queue
apopiak f29655d
bump common runtime
apopiak e4be8cd
return approximate weight consumed by deferred_by
apopiak 6697241
add readme
dmoka 91e1ddc
remove unused WeightInfo
apopiak b4b86a9
remove unused dep
apopiak 88ad136
track all assets in incoming instructions and defer based on max defe…
apopiak fe4f8a0
address review comments
apopiak e58df7a
add test for withdraw to make sure it's not tracked
apopiak ba7ffd4
Merge branch 'master' of github.com:galacticcouncil/HydraDX-node into…
apopiak a9fcbb8
bump crate versions
apopiak c68f143
reset otc version
apopiak c402513
update cargo.lock
apopiak 30f171f
add test for executing deferred messages
apopiak 421a305
Merge branch 'master' of github.com:galacticcouncil/HydraDX-node into…
apopiak 6efd823
query fee from treasurey account instead of hard-coding
apopiak 80614f5
Merge branch 'master' of github.com:galacticcouncil/HydraDX-node into…
apopiak 4d2f1ab
bump crate versions
apopiak 1119b13
remove xcm rate limiter from runtime
apopiak 7eb04cd
correct rate limiter Cargo.toml
apopiak 3a1534d
Merge branch 'master' of github.com:galacticcouncil/HydraDX-node into…
apopiak 3895821
bump crate versions
apopiak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove xcm rate limiter from runtime
- Loading branch information
commit 1119b137f2caed0a6ab82b4562fd092d5fe6c8e1
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we'll have t create a referendum every time a single message is deferred?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will have to create a referendum every time we want to execute or discard a deferred message/deferred messages before its/their execution time.Correction: We will have to create a referendum if we want to discard deferred messages or if we want to execute deferred messages in case they are not executed automatically. This can happen if the message is too heavy to be processed
on_idleand there are no incoming XCMs for that parachain.I would expect that to be quite rare. But of course open to changing the configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about it further: If we expect to need to discard messages with short deferral periods, this might be troublesome and we might have to devise another mechanism, e.g. having a less privileged origin that can extend the deferral of deferred messages to a time that governance can properly react to it.