Closed elpiel closed 5 years ago
@Ivshti can you elaborate on the EventSubmissionRule::uuids
?
is the channel.creator
the actual value of the Channel creator or it's a parameter of type Enum (channel.creator, validator.leader, validator.follower)?
does this help -> https://tom.adex.network/channel/list ?
it's an array of user IDs (where a user ID is of the same format as it is in channel.creator, validators, etc.; this format is an ethereum address, but should be represented as an arbitrary variable-length byte array because of flexibility; or a hex string)
On Tue, 28 May 2019 at 13:42, Lachezar Lechev notifications@github.com wrote:
@Ivshti https://github.com/Ivshti can you elaborate on the EventSubmissionRule::uuids ? is the channel.creator the actual value of the Channel creator or it's a parameter of type Enum (channel.creator, validator.leader, validator.follower)?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AdExNetwork/adex-validator-stack-rust/issues/27?email_source=notifications&email_token=AAJQTDP6VYVOH6YW4JGPARTPXUECTA5CNFSM4HORC5WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWLW7HQ#issuecomment-496463774, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJQTDJAG2HXH67JJJROXZTPXUECTANCNFSM4HORC5WA .
--
[image: photo] Ivo Georgiev Founder & CEO, Stremio
https://www.stremio.com http://www.stremio.com
GPG: AC692BE9EB6E024B5C58A8EAC1E94996BC56BACE http://www.stremio.com http://www.facebook.com/stremio/ http://twitter.com/stremio http://www.instagram.com/stremioofficial/ http://www.reddit.com/r/Stremio/ http://blog.stremio.com/
https://play.google.com/store/apps/details?id=com.stremio.beta https://itunes.apple.com/us/app/stremio/id987232010?mt=8
Yep, this helps. Thanks.
Closed #36 as we discussed we will just use String.
What is the allowed timeframe
range @Ivshti ?
Also:
uids
& null uids
be treated as NULL (aka None)?uids
= null and rate_limit
= null should we force one or the other in the Struct & in the deserilzation of the struct?As discussed with @Ivshti , having both uids
& rate_limit
to NULL
, is a valid case.
If we have:
[rule1, rule2, rule3, {uids: null, rateLimit: null}]
Everything that is not falling into rule1, rule2, rule3 is unlimited.
This case is valid and for that reason we will not force any checks atm.
https://github.com/AdExNetwork/adex-protocol/blob/master/campaignSpec.md#eventsubmission
EventSubmittion:
allow
: array ofEventSubmissionRule
; for each POST to/channel/:id/events
, the first rule that matches will applyEventSubmissionRule:
uids
: array of used IDs that this rule applies to; leavenull
for applying to everyone (note that subsequent rules inallow
won't match); set to[null]
to apply to requests without authenticationrateLimit
: optional, object describing the rate limit to apply; for, this takes{ type: "ip", timeframe }
, wheretimeframe
is a number; later,{ type: "uid", timeframe }
will be addedExamples
{ allow: [{ uids: null, rateLimit: { type: "ip", timeframe: 1000 } }] }
- this will allow everyone to submit events, at a rate of 1 event per second per IP{ allow: [{ uids: [channel.creator] }, { uids: null, rateLimit: { type: "ip", timeframe: 1000 } }] }
- this will allow the creator to submit as many events as they like, but everyone else will be restricted to 1 event per second per IP