Closed elpiel closed 5 years ago
Re order: it’s created, but again, not mentioned in the docs
Re spec shape: I think domain rules is over engineering in that case; how about storing it as a JSON blob and deserializing via serde? Postgre also has some handy functionality to query/index data inside JSON blobs and using serde-json to parse the data within the Sentry has numerous advantages such as guaranteed consistency with other code, flexibility and having to write less serialization/deserialization code
@Ivshti @samparsky I saw that the docs/api.md have inconsistency with the code https://github.com/AdExNetwork/adex-validator-stack-js/blob/master/routes/channel.js#L64.
validator
query parameter is not mentioned in docsvalidUntil
query parameter is not mentioned in docscreator
query paramter is not mentioned in docslimit
is defined by configuration option, not query parameter as per the docsI would like to know which is relevant and which is not, so we can update it, but also include it in the Rust implementation.
Also I would like to know how should we order the channels for the list, because as I see we have the
validUntil
&created
, but I don't see that we order them in any way at the moment, so I guess it's by order of insertion (akacreated
but indirectly)campaign spec Also if the Specs can change, what should be a valid way of representing it if we are in a Database like postgres? And last but not least we use timestamp for all the DateTime fields, but this can be altered to a DateTime representation or not? + There are some recommendations for
withdrawPeriodStart
, are they recommendations only or we need to implement them as Domain rules, i.e. don't allow somebody to even create the spec if it's in the past (a sane value should be lower than channel.validUntil * 1000 and higher than created
)?