helium / oracles

Oracles for Helium subDAOs
Apache License 2.0
19 stars 21 forks source link

Beacon verification with non deterministic `tx_power` #384

Closed mawdegroot closed 5 months ago

mawdegroot commented 1 year ago

Problem description

The oracle validation calculates the expected tx_power of a beacon based on the max_eirp for the region and the asserted gain of the gateway. This validation can fail because the gateway-rs code will report the beacon with the actual tx_power that it received from the packet forwarder in the tx_ack packet.

If the gateway-rs code requests a transmission with a power level the packet forwarder does not support the packet forwarder will attempt to find a lower power level that it does support. Due to a bug in the packet forwarder code it will pick a higher power level if no lower power level exists.

This change tries to solve several problems that are dependent on each other and require changes over several subsystems. The oracles should allow tx_power levels lower or equal to validate. The gateway-rs code should stop using MIN_CONDUCTED_POWER. The packet forwarder code should stop sending at a higher power level than requested. If the packet forwarder stops transmitting packets with too much power the low power regions such as EU868 and AS923 will not be able to transmit if their asserted gain is larger than 4dBi. To solve this the packet forwarder code must be changed to allow more than 16 power lookup table entries so that they can support the lower power levels while still supporting the higher power levels. Finally the packet forwarder configurations must be changed to include a baseline for the lower power levels.

oracles

gateway-rs

sx1301 packet forwarder

sx1302/sx1302 packet forwarder

comms

andymck commented 5 months ago

This was addressed as part of https://github.com/helium/oracles/pull/381. @mawdegroot if you consider the issue still to unresolved, please reopen the issue