-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat(sequencer): add market map actions #1882
Open
ethanoroshiba
wants to merge
4
commits into
feat/oracle
Choose a base branch
from
eoroshiba/market_map_actions
base: feat/oracle
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+4,830
−215
Conversation
This file contains 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
github-actions
bot
added
proto
pertaining to the Astria Protobuf spec
sequencer
pertaining to the astria-sequencer crate
labels
Dec 18, 2024
ethanoroshiba
commented
Dec 18, 2024
crates/astria-core/src/protocol/transaction/v1/action/group/mod.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Dec 19, 2024
crates/astria-sequencer/src/action_handler/impls/remove_markets.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Dec 19, 2024
noot
reviewed
Dec 19, 2024
crates/astria-sequencer/src/action_handler/impls/update_params.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Dec 19, 2024
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.
looks good, only a few minor comments!
noot
approved these changes
Dec 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Added market map actions here to the sequencer.
Background
These actions were needed for support for keeping a
MarketMap
in state and making changes to it as part of the oracle feature. They follow Skip's logic and apply it to our state machine.UpsertMarkets
Takes a list of markets and either updates them if they are already in the market map, or creates them if they are not. If no market map is found, one will be created. Must be signed by an address included in the market map params'
market_authorities
.CreateMarkets
Takes a list of markets and creates them in the market map. If any already exist, this will err. If no market map is found, one will be created. Must be signed by an address included in the market map params'
market_authorities
.UpdateMarkets
Takes a list of markets and updates them in the market map (matching based on
Ticker.currency_pair
). If no market map is found, or any market is missing a counterpart in the map, this will err. Must be signed by an address included in the market map params'market_authorities
.UpdateParams
Updates the market map
Params
, which contains the market authority addresses as well as an admin address. This will execute whether there are params in the state already or not. Must be signed by the sequencer network authority sudo address.RemoveMarketAuthorities
Takes a list of addresses and removes them from the market authorities. If an address does not exist in
market_authorities
, it will be ignored. Must be signed by the market mapadmin
(as defined in the market mapParams
).RemoveMarkets
Takes a list of markets and removes them from the market map. If a market is not found in the map, it will be ignored. Must be signed by an address included in the market map params'
market_authorities
.Changes
UpsertMarkets
,CreateMarkets
,UpdateMarkets
,UpdateParams
,RemoveMarketAuthorities
, andRemoveMarkets
to proto, core, and sequencer.Testing
Breaking Changelist
ALICE_ADDRESS
to market authorities in testinggenesis
, breaking two more snapshots.