smartcontractkit / external-initiator

Initiate Chainlink job runs from external sources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syncing FluxAggregatorState more accurately

ebarakos opened this issue · comments

As of current PoC FM integration with Substrate, we requesting the FA state once on FM, and then changing it directly on FM on new incoming events from BM.

We might need to have the FA state synced as close as possible to the actual blockchain state. For e.g something might go wrong in FM logic, and have it do an internal state change that doesn't reflect the true state of the blockchain. Or maybe the blockchain has some other unexpected behaviour that FM haven't taken into account, so the FA is in a different state.

A solution could be to do the syncing(querying the whole FA state anew) more frequently, on incoming blockchain events, to prevent faulty results.

(We might need to move all FA state handling to BM and have FM only to read it).