Open edd opened 2 years ago
That's the ideal solution, indeed. But for sake of simplicity, we didn't implement it as a "patch" but as a full update. That is intended.
Note that the hard part doesn't come from the validation, but the actual process to update with partial data, meaning retrieving the previous data, then apply the validation against various parameters (network, markets, etc.), and to finally, trigger the update process.
Updating a market is validated here: https://github.com/vegaprotocol/protos/blob/c2c2c20d06bc2e8b03ec3f26b1ae093610efcfd8/commands/proposal_submission.go#L403-L406
Note that this is much the same as
newMarket
: https://github.com/vegaprotocol/protos/blob/c2c2c20d06bc2e8b03ec3f26b1ae093610efcfd8/commands/proposal_submission.go#L378-L381Reading the spec (https://github.com/vegaprotocol/specs-internal/blob/master/protocol/0028-GOVE-governance.md#2-change-market-parameters):
Cool!
newMarket
is huge, submitting less is great. However, due to the shared functions, everyupdateMarket
needs to supply all of the oracle data, even if it isn't changing.To recreate
Should be valid. However it returns this error:
Tasks
updateMarket
not to provide any oracle specs if they are not changingupdateMarket
allows a change topriceMonitoringParameters
without any other unnecessary data