-
Notifications
You must be signed in to change notification settings - Fork 315
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
view: add support for auctions #4252
Conversation
## Describe your changes This PR adds: - auction genesis content to the application state - auction parameters to the application state (and governance update logic) - connects the app ABCI implementation to the auction's component interface ## Issue ticket number and link #4228 and #4252 ## Checklist before requesting a review - [x] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > This is consensus breaking
2418bba
to
648e590
Compare
79c817c
to
9ed7319
Compare
## Describe your changes This PR adds: - auction genesis content to the application state - auction parameters to the application state (and governance update logic) - connects the app ABCI implementation to the auction's component interface ## Issue ticket number and link #4228 and #4252 ## Checklist before requesting a review - [x] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > This is consensus breaking
@@ -303,21 +303,72 @@ impl Worker { | |||
// Update the position record | |||
self.storage.update_position(position_id, state).await?; | |||
} | |||
penumbra_transaction::Action::ActionDutchAuctionSchedule( |
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.
what's the utility of these action checks?
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.
On advice, we scan transactions and their actions, and record auction metadata by their asset id. This is useful to be able to display relevant asset metadata when presented with an asset id (among other things).
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.
For a little bit more context: Value
s in the shielded pool are an Amount
and an AssetId
. The asset ID (an asset.Metadata
via the asset ID in an asset registry.
The chain maintains one minimal asset registry (just containing denoms), but this registry does not include entries for all of the LPNFTs (and now ANFTs), because this would bloat the chain state. Instead, the client's view service is responsible for locally deriving and caching the metadata of the bearer tokens it creates. This saves data for all the other clients, who don't want to have to maintain knowledge of everyone else's position NFTs.
861ab03
to
f78e750
Compare
cb50902
to
b592074
Compare
I reviewed this earlier this morning on an outdated change-set, but haven't dived deeply into the |
I think that this is ready for review, the discoverability / rendering of the commands needs to improve, but seem good enough for an mvp. A few lines about the state modeling in the view server, this PR:
-- This table records the user's own auction state, using the
-- auction id as a primary key. An extra-column is available
-- to cross-reference note commitments that is associated with
-- the entry.
CREATE TABLE auctions (
auction_id BLOB PRIMARY KEY NOT NULL,
auction_state BIGINT NOT NULL,
note_commitment BLOB
);
|
I have tested that I am able to:
|
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.
Optimistically merging this, async reviews welcome
463ea98
to
541ac45
Compare
Describe your changes
View server implementation for auction.
Issue ticket number and link
References #4251
Checklist before requesting a review