penumbra-zone / penumbra

Penumbra is a fully private proof-of-stake network and decentralized exchange for the Cosmos ecosystem.
https://penumbra.zone
Apache License 2.0
364 stars 288 forks source link

auction: `TxV/TxP` support to populate the views #4219

Open erwanor opened 3 months ago

erwanor commented 3 months ago

As of v0.75.0, there's not enough data in the current TransactionPerspectives to generate ActionDutchAuctionWithdrawViews that are useful to clients. The view exists but its content is hardcoded to have zero reserves and no positions. Instead, we should record extended metadata during scanning so that it's possible to cross-reference openings to note commitments with auction reserves. This also offers an opportunity to lay the groundwork so that we can add position views.

erwanor commented 3 months ago

All the scaffolding exists to make this happen, we just need to connect do the plumbing so that the views get populated. This is somewhat lower priority, but if anyone wants to pick it up feel free to.

erwanor commented 2 months ago

We stubbed the withdraw view, this needs some addition to transaction perspectives, so leaving this open, until I replace it with a more detailed plan of action.

cronokirby commented 1 month ago

Shelved for now, this turns out to be a bit more subtle than we realized, and also requires a bit of a different processing scheme than other views.

Basically, unlike other views, we need access to the historical value of the auction reserves at the time the withdrawal happens, which is unlike how the rest of the view services are designed.

We could add this in the future with the addition of an event for withdrawing actions, and then indexing those events to populate the view of withdrawal actions appropriately.