rofl-scheduler: Read offer access policy from on-chain metadata - #2485
Conversation
✅ Deploy Preview for oasisprotocol-oasis-sdk canceled.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2485 +/- ##
==========================================
+ Coverage 51.23% 51.42% +0.19%
==========================================
Files 237 237
Lines 17294 17241 -53
==========================================
+ Hits 8860 8867 +7
+ Misses 8374 8314 -60
Partials 60 60 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
77aad7b to
cc93e2d
Compare
kostko
left a comment
There was a problem hiding this comment.
This makes sense to me, have you done any tests with an actual scheduler? Before this can be deployed all existing offers need to be updated to use this metadata, right?
matevz
left a comment
There was a problem hiding this comment.
Do I remember correctly the current offer is copied over to machine once you deploy your app? And this copied offer is read in the new rofl-scheduler code instead of the latest on-chain offer? So if someone changes offer Metadata afterwards, those won't be reflected in the existing ROFL replica until it's redeployed.
cc93e2d to
d36ac02
Compare
d36ac02 to
a4b04cc
Compare
4568a26 to
3518134
Compare
Move the per-offer allowed_creators and allowed_artifacts access policy
out of the scheduler's local node config and into on-chain offer
metadata, so a provider can change it with a transaction instead of
editing the node config and restarting the machine.
The scheduler now reads these well-known offer metadata keys each round:
- net.oasis.scheduler.offer.allowed_creators: comma-separated creator
addresses; empty or absent means all creators are allowed.
- net.oasis.scheduler.offer.allowed_artifacts.<kind>: comma-separated
allowed artifact hashes per kind; an absent kind allows all.
- net.oasis.scheduler.offer.private: marks an offer private so it can
be hidden from normal offer listings. Read but not acted on by the
scheduler.
The global allowed_creators and allowed_artifacts fields are removed from
the local config (no fallback); RawLocalConfig now ignores unknown fields
so existing configs still load. Matching metadata-key constants are added
to the Go client SDK for use by the CLI.
3518134 to
7c428d7
Compare
matevz
left a comment
There was a problem hiding this comment.
Two nits, otherwise looks good IMO.
Reformat the multi-line assert! in test_offer_policy_private to satisfy rustfmt.
f68f28c to
64e8d09
Compare
…nzoman/rofl-scheduler-offer-metadata-policy rofl-scheduler: Read offer access policy from on-chain metadata c94c98e
…nzoman/rofl-scheduler-offer-metadata-policy rofl-scheduler: Read offer access policy from on-chain metadata c94c98e
…/anzoman/rofl-scheduler-offer-metadata-policy rofl-scheduler: Read offer access policy from on-chain metadata c94c98e
…oasisprotocol/anzoman/rofl-scheduler-offer-metadata-policy rofl-scheduler: Read offer access policy from on-chain metadata c94c98e
…sisprotocol/anzoman/rofl-scheduler-offer-metadata-policy rofl-scheduler: Read offer access policy from on-chain metadata c94c98e
…sisprotocol/anzoman/rofl-scheduler-offer-metadata-policy rofl-scheduler: Read offer access policy from on-chain metadata c94c98e
Moves per-offer
allowed_creatorsandallowed_artifactsfrom the scheduler's local node config to on-chain offer metadata, so providers can change access policy with a transaction instead of editing the node config and restarting the machine. The scheduler parses anOfferPolicyfrom each offer's metadata every round (keysallowed_creators,allowed_artifacts.<kind>, and aprivatelisting hint); matching constants are added to the Go SDK for the CLI. The global local-config fields are removed with no fallback.Implements #2475.