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

High priority economic elements (e.g., oracles) can have priority execution #4318

Open
rowgraus opened this issue Jan 18, 2022 · 7 comments
Open
Assignees
Labels
cosmic-swingset package: cosmic-swingset Epic pegasus SwingSet package: SwingSet

Comments

@rowgraus
Copy link

rowgraus commented Jan 18, 2022

We need to identify all the messages involved in the core economy and make sure they get priority. This includes:

  • cosmos transactions containing price updates from oracles
  • device (possibly including vattp/comms) messages that deliver those updates to a vat handling economic activity
  • sale orders to liquidate vaults that are below their collateral threshold
  • reactions such as promise resolutions from all of those

The "cosmos transactions" part happens before swingset sees anything. @dtribble suggested that the price oracles' addresses be treated specially by cosmic-swingset: we want any txns signed by those addresses to get pulled from the mempool and into a block first, then look for txns by other senders. I don't know quite where this would need to get implemented, @michaelfig has mentioned that the priority of mempool txn selection isn't easy to control.

It should be possible to funnel these messages into SwingSet through dedicated devices, with their handling vat running at high priority, thus bypassing contention with other non-priority messages going through mailboxes/vattp/comms. As long as the reaction from that point all target high priority vats, it should grant the ability to complete processing of high priority economic messages before regular / low priority messages.

The following steps are part of this goal:

@rowgraus rowgraus added this to the Mainnet: Phase 1 - RUN Protocol milestone Jan 18, 2022
@warner warner added the MN-1 label Jan 27, 2022
@Tartuffo
Copy link
Contributor

Tartuffo commented Feb 5, 2022

@warner For proper project planning and tracking, this needs an area label covered by one of our weekly planning meetings. Please pick the appropriate one from: agd, agoric-cli, agoric-cosmos, amm, core economy, cosmic-swingset, endo, ertp, getrun, governance, installation-bundling, metering, oracle, pegasus, run-protocol, ses, staking, swingset, swingset-runner, tc39, token economy, tooling, ui, wallet, xsnap, zoe, zoe contract

@warner warner added cosmic-swingset package: cosmic-swingset SwingSet package: SwingSet needs-design pegasus labels Feb 7, 2022
@Tartuffo Tartuffo removed the MN-1 label Feb 7, 2022
@Tartuffo Tartuffo removed this from the Mainnet: Phase 1 - RUN Protocol milestone Feb 8, 2022
@mhofman
Copy link
Member

mhofman commented Feb 13, 2022

If cosmic-swingset is able to extract a priority from a message when grabbing it from the mempool, we may be able to have a different mailbox device queue per priority on the swingset side.

Regardless, it seems that swingset will need its own notion of sender based priorities since the comms vat has per remote receiver objects. We'll need to keep the list of priority sender in sync with cosmic-swingset in that case.

@warner did I get that right?

@warner warner assigned mhofman and unassigned warner Feb 22, 2022
@Tartuffo
Copy link
Contributor

@warner @michaelfig @mhofman you should probably all sync on this to determine what work needs to happen in the various levels: swingset, cosmic swingset, and the interchange between the two, and break out that work into separate tickets.

@Tartuffo
Copy link
Contributor

This is related to #3465

@Tartuffo Tartuffo added this to the Mainnet 1 milestone Mar 23, 2022
@mhofman
Copy link
Member

mhofman commented Apr 6, 2022

I would like to make this issue the overarching epic. Will update the main description

@dckc
Copy link
Member

dckc commented Sep 21, 2022

discussion w/ @turadg , @michaelfig ...

does the inter-vat cost of the continuing invitation pattern compete with goals here?

MFig notes prioritizing at the cosmos-level based on sender address can be used regardless.

with continuing offers:
bridge -> walletFactory -> zoe -> oracle aggregator

vs. using offer results more direcly:
bridge -> walletFactory -> oracle aggregator

using continuing offers seems feasible for now.

@warner
Copy link
Member

warner commented Jan 24, 2023

cc @gibson042

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cosmic-swingset package: cosmic-swingset Epic pegasus SwingSet package: SwingSet
Projects
None yet
Development

No branches or pull requests

5 participants