You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If `metadata` is non-empty: upsert `NodeV3OptOutMetadata[node_id]`, emit `NodeV3OptOutMetadataSet { node_id, metadata }`.
73
-
- If `metadata` is empty: remove `NodeV3OptOutMetadata[node_id]`, emit `NodeV3OptOutMetadataCleared { node_id }`.
72
+
- If `metadata` is non-empty: upsert `NodeV3OptOutMetadata[node_id]`, emit `NodeV3OptOutMetadataUpdated { node_id, metadata: Some(metadata) }`.
73
+
- If `metadata` is empty: remove `NodeV3OptOutMetadata[node_id]`, emit `NodeV3OptOutMetadataUpdated { node_id, metadata: None }`.
74
74
75
75
The extrinsic is idempotent and can be called repeatedly to update or clear the metadata. Only the farm owner can call it, matching the ownership model of `opt_out_of_v3_billing`.
76
76
77
77
### New Events (pallet-tfgrid)
78
78
79
-
-`NodeV3OptOutMetadataSet { node_id: u32, metadata: Vec<u8> }` — emitted when metadata is set or updated.
80
-
-`NodeV3OptOutMetadataCleared { node_id: u32 }` — emitted when metadata is explicitly cleared.
79
+
-`NodeV3OptOutMetadataUpdated { node_id: u32, metadata: Option<Vec<u8>> }` — emitted when metadata is set, updated, or cleared. `Some(bytes)` indicates set/update, `None` indicates clear.
81
80
82
81
### New Errors (pallet-tfgrid)
83
82
@@ -88,21 +87,20 @@ The extrinsic is idempotent and can be called repeatedly to update or clear the
│ ├── None → farmer has not yet linked a v4 account, treat as unlinked
123
-
│ └── Some(metadata) → decode as v4 account address
124
-
│
125
-
├─3─► Verify that the v4 account in metadata matches the account
126
-
│ that the node is reporting from on the v4 network
127
-
│ ├── Mismatch → reject; farmer must update metadata or re-register
128
-
│ └── Match → node is verified as legitimately transitioned
129
-
│
130
-
└─4─► Attribute node resources and uptime to the verified v4 account
131
-
```
132
-
133
-
This means the v4 marketplace does **not** trust the node's self-reported identity alone — it cross-checks against the on-chain metadata set by the farm owner, which is the authoritative source.
0 commit comments