Table of Contents |
---|
...
Misc. Requirements
Issue | Summary | Decision |
---|---|---|
Storage of latest block number | The Oracle is getting the latest action from FIO history every 5 seconds. But when we restart the server, we read the all latest actions and calling wrap function from the start. Of course, it doesn't mint again but I think wrapping time can be long in this case. To prevent this problem, we need to save the latest block number to database or any external storage.what do you think about my suggest? | Should we track block number in the
|
Admin front-end UI | Is there a need for a front-end UI to review different transactions, or can we just rely on table lookups, etc.? |
|
Process a single transaction at a time | Given the complexity of validating wrap and unwrap transactions all the way through to finality, both Todd and Alex have suggested that we limit oracles to only process a single transaction at a time |
|
How often should get_actions be polled? | Need to determine how often to call get_actions on the FIO chain. |
|
Transaction Retry | Because we are putting limited validation logic in the oracle, it may be necessary for Oracles to take action on failed transactions. It would be helpful to have a “transaction retry” function that can be called that retries specific wrap/unwrap transactions. | |
Log events and exceptions | All events and errors should be logged. Because there will be limited validation, these logs will be the primary way for oracle node operators to troubleshoot issues. | |
V1 History | The initial implementation calls get_actions against V1 history. Should we look at supporting Hyperion or other history solutions? | Discussed the V1 history implementation with the Oracle BPs and because it is a relatively simple call, it is not worth designing additional support for different history solutions. Once we deploy they will see how well it fits into their environments. |
Functionality
There are two main use cases that concern the Oracle, Wrap and Unwrap. These are detailed below.
...
Functionality | |||||
---|---|---|---|---|---|
Oracle Initialization |
| ||||
Alice (via dApp) calls | Example: Calling | ||||
|
| ||||
Oracle monitors | Every 5 seconds Oracle polls the
| ||||
|
| ||||
Oracle validates the FIO chain |
| ||||
Responding to invalid |
| ||||
Oracle executes |
| ||||
|
| ||||
| Example of three oracles calling wrap:
| ||||
ERC-20 | TBD: Adam to document how the contract handles invalid failed transactions. Put link to content here. Adam Androulidakis | ||||
Responding to invalid ERC-20 |
| ||||
|
|
...
Error condition | Trigger | Oracle Action |
---|---|---|
Invalid chain | Chain passed to | Oracle logs error and does no further processing of the transaction. |
Invalid Ethereum address | Public address passed to | Oracle logs error and does no further processing of the transaction. |
Unwrap
Unwrap converts wFIO on Ethereum chain to FIO Tokens on FIO chain.
See the following page for an overview of the Unwrap use case: Unwrap
Functionality | |||
---|---|---|---|
Oracle Initialization |
| ||
Alice (dApp) executes | unwrap(fio address, amount); | ||
ERC-20 | TBD: Adam to document how the contract handles invalid failed transactions. Put link to content here. Adam Androulidakis | ||
|
| ||
Oracle monitors |
| ||
Oracle validates |
| ||
If exceptions are found, Oracle takes action to unwind transaction |
| ||
|
| ||
Oracle executes |
| ||
| fio.oracle contract Actions:
| ||
Responding to invalid |
| ||
Oracle validates |
| ||
Ongoing monitoring of |
|
Exception handling
Error condition | Trigger | Oracle Action |
---|---|---|
Invalid FIO Address | FIO Address passed in with ERC-20 is not valid or does not exist | Oracle logs error and does no further processing of the transaction. |