Commit cc93e2d
committed
rofl-scheduler: Read offer access policy from on-chain metadata
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.1 parent 3e00a16 commit cc93e2d
3 files changed
Lines changed: 291 additions & 367 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
127 | 146 | | |
128 | 147 | | |
129 | 148 | | |
| |||
0 commit comments