AmbireTech / adex-validator-stack-rust

The Ambire AdEx Validator Stack implemented in Rust: sentry, validator worker, adapter, adview manager
https://adex.network
GNU Affero General Public License v3.0
11 stars 10 forks source link

EventSubmition & EventSubmitionRule domain struct #27

Closed elpiel closed 5 years ago

elpiel commented 5 years ago

https://github.com/AdExNetwork/adex-protocol/blob/master/campaignSpec.md#eventsubmission

EventSubmittion:
EventSubmissionRule:

Examples

{ 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

elpiel commented 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)?

Ivshti commented 5 years ago

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

elpiel commented 5 years ago

Yep, this helps. Thanks.

elpiel commented 5 years ago

Closed #36 as we discussed we will just use String.

elpiel commented 5 years ago

What is the allowed timeframe range @Ivshti ? Also:

elpiel commented 5 years ago

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.