Skip to content

feat: support process-to-process pushes via arweave-scheduler@1.0 - #1101

Open
charmful0x wants to merge 2 commits into
candidate/fast-arweave-scheduler-1from
feat/push-compute-authority-fast-scheduler
Open

charmful0x wants to merge 2 commits into
candidate/fast-arweave-scheduler-1from
feat/push-compute-authority-fast-scheduler

Conversation

@charmful0x

Copy link
Copy Markdown

this PR teaches schedulers to advertise their required codec on 422, and push@1.0 to retry generically with it:

  • legacy scheduler@1.0 (ao.TN.1) requires ans104@1.0 -- (ao.N.1 case remains as-is)
  • arweave-scheduler@1.0 requires tx@1.0

for tx@1.0, push reuses the target process authority selection, fetches the target-aware L1 price and anchor through arweave@2.9, signs a data-free L1 tx, and posts it through the scheduler

preserves the existing httpsig@1.0 -> ans104@1.0 fallback, from-* provenance, redirects, and security policy. accepted L1 submissions return as pending (202)

live L1 probe:

Comment thread src/preloaded/arweave/dev_arweave.erl Outdated
Comment thread src/preloaded/arweave/dev_arweave.erl Outdated
%%% continues until the there are no remaining messages to push.
-module(dev_push).
-device_libraries([lib_process]).
-device_libraries([lib_arweave_common, lib_process]).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we think of a better way to make this generic, I wonder? We shouldn't have devices break their boundaries like this (making the generic push functionality tied to the Arweave libraries).

Ideas:

  • What about a generic commit request flag like add-fee: standard | MinimumFeeMultiplier?
  • That would work for Arweave, but ideally whatever solution we build will also work if -- for example -- we build a AO-staked committees for scheduling, too, or any other type of scheduler. Perhaps that means that actually what we are missing is a generic 'how much will this cost'-type request?
  • I don't know if the [not x]402 schema ever described how this should work, but we should check it out. I think we probably want something like a ~scheduler@1.0 API key that gives us a quote. Alternatively, perhaps HEAD X could generically cover this for us? ~p4@1.0 could answer with the estimate response from the pricing-device if the user adds /schedule as a paid endpoint, but otherwise it could fall through to normal execution and the schedule key in the scheduler implementation could catch it?

All of these seem janky but it is probably worth us spending an hour thinking through the right direction. If we realize it is too complex to do today, then we could fallback to this approach.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the feedback! i thought thoroughly about this, and taking into account Ao-Core architecture, and i went with the explicit scheduler /quote idea: it return a commitment spec, so push stays generic and tx@1.0 handles the Arweave tx with the existing authority-selected wallet. no extra payment layer yet (e.g. p4), and i kept the 422 codec fallback, and live probed the full flow on L1 -- approach proposal: #1125

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commitment spec is a nice idea! Great thinking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants