This crates takes beacon and witness reports as input from an S3 bucket and verifies their integrity against a range of validations and ouputs verified reports to another S3 bucket. A verified report can either be of type valid or invalid.
File Type | Pattern | |
---|---|---|
IotBeaconIngestReport | iot_beacon_ingest_report.* | Proto |
IotWitnessIngestReport | iot_witness_ingest_report.* | Proto |
ValidPacket | valid_packet.* | Proto |
Entropy | entropy.* | Proto |
The verifier will periodically query the incoming S3 bucket and load any new beacon, witness & entropy repots. These will be used to populate a postres DB. The DB will then be periodically queried to retrieve any beacon reports with an expired entropy lifespan. For each such beacon report a list of witnesses will be retrieved and both reports types will then be verified against the following validations:
beacon reports
interval check
: is the beaconer permitted to beacon at the current timevalid entropy check
: is the entropy included in the beacon report valid,assertion check
: has the beaconing hotspot been assertedentropy interval check
: was the beacon report received within the associated entropy's lifespancapability check
: is the beaconing hotspot permitted to participate in POCdata check
: does the reported broadcast data match that generated dynamically by the verifier
witness reports
assertion check
: has the witnessing hotspot been assertedentropy interval check
: was the witness report received within the associated entropy's lifespanfrequency check
: does the frequency of the witness report match that of the beaconersregion check
: is the witnessing hotspot located in the same region as the beaconerdistance check
: is the witnessing hotspot within the permitted distance from the beaconerrssi check
: is the RSSI of the witnessing hotspot valid ( based on free space path loss calc)capability check
: is the beaconing hotspot permitted to participate in POCpacket check
: does the reported packet payload match that of the beaconers broadcast
File Type | Pattern | |
---|---|---|
IotPoc | iot_poc.* | Proto |
IotInvalidBeaconReport | iot_invalid_beacon.* | Proto |
IotInvalidWitnessReport | iot_invalid_witness.* | Proto |
IotRewardShare | iot_reward_share.* | Proto |
RewardManifest | reward_manifest.* | Proto |
The verifier requires the following environmental variables:
FOLLOWER_URI
: The URI for the follower service to connect toDATABASE_URL
: The URI of the postgres DB instanceVERIFIER_STORE
: The path to the tmp local file store for S3 bound filesINGESTOR_BUCKET
: The S3 bucket containing the input reports generated by the ingestorVERIFIER_BUCKET
: The S3 bucket to output the verified reports toENTROPY_BUCKET
: The S3 bucket containing the input entropy reports
The verifier requires the following consts to be sanely set and via which its operation can be tuned
BEACON_INTERVAL
(runner) : Interval at which beaconers are permitted to beaconENTROPY_LIFESPAN
(entropy) : The valid lifespan of a piece of entropyREPORTS_POLL_TIME
(loader) : The cadence at which S3 is queried for new beacon & witness reportsENTROPY_POLL_TIME
( loader) : The cadence at which S3 is queried for new entropy reportsMAX_REPORT_AGE
(loader) : The max age of beacon & witness reports to load from s3. Anything older will be ignoredBEACON_MAX_RETRY_ATTEMPTS
(poc_report) : The max number of times the verifier will attempt to verify a beaconWITNESS_MAX_RETRY_ATTEMPTS
(poc_report) : The max number of times the verifier will attempt to verify a witnessBEACON_PROCESSING_DELAY
(poc_report) : A period of time added to ENTROPY_LIFESPAN after when any associated beacons using the relevant entropy will become ready for verificationPOC_DISTANCE_LIMIT
(poc) : The max valid witness distance from the beaconerREPORT_STALE_PERIOD
( purger) : Any beacon or witness report in the DB & not verified after this period will be deemed stale and purged- `ENTROPY_STALE_PERIOD( purger) : Any entropy report in the DB after this period will be deemed stale and purged
DB_POLL_TIME
( purger) : The cadence at which the DB is queried for stale reportsDB_POLL_TIME
( runner ) : The cadence at which the DB is queried for 'ready' POCs