feat: support process-to-process pushes via arweave-scheduler@1.0 - #1101
charmful0x wants to merge 2 commits into
Conversation
| %%% continues until the there are no remaining messages to push. | ||
| -module(dev_push). | ||
| -device_libraries([lib_process]). | ||
| -device_libraries([lib_arweave_common, lib_process]). |
There was a problem hiding this comment.
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
commitrequest flag likeadd-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.0API key that gives us a quote. Alternatively, perhapsHEAD Xcould generically cover this for us?~p4@1.0could answer with theestimateresponse from thepricing-deviceif the user adds/scheduleas a paid endpoint, but otherwise it could fall through to normal execution and theschedulekey 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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Commitment spec is a nice idea! Great thinking.
this PR teaches schedulers to advertise their required codec on
422, andpush@1.0to retry generically with it:scheduler@1.0(ao.TN.1) requiresans104@1.0-- (ao.N.1case remains as-is)arweave-scheduler@1.0requirestx@1.0for
tx@1.0, push reuses the target process authority selection, fetches the target-aware L1 price and anchor througharweave@2.9, signs a data-free L1 tx, and posts it through the schedulerpreserves the existing
httpsig@1.0 -> ans104@1.0fallback,from-*provenance, redirects, and security policy. accepted L1 submissions return as pending (202)live L1 probe:
5CVUuser -> P1: a0qln7wLeBtVb7y9TaJ7NSDHVSYKsztIkVaqdorppmYvZY2XYauthority: 0zVfrxEbxNTiWS_l-FfiRkewfLHAMdOrxy63yczzCKk3from-process=P1scheduleris omitted