MsgCreateAIDataSource
. In the Oraichain system, anyone could become an AI Provider.MsgCreateAIDataSource
sent to the system. The AI Data Source metadata will be stored on Oraichain for transparency and for everyone to see using the AIDataSource
struct. There are some parameters given in the message as follows:MsgCreateTestcase
. Similar to the AI Provider, anyone can be a test case provider.MsgCreateTestCase
:TestCase
struct. Below are the attributes of a test case that are stored on-chain:MsgCreateOracleScript
to Oraichain. The contents of the message includes:AIrequest
to Oraichain to use a provided AI service. Oraichain stores basic information of an AI request for querying, and other systems can use the request's result for their business logic. Behind the scenes, users invoke an oracle script call, where the system chooses randomly a set of validators that execute the oracle script and collect the results. The results are stored on Oraichain for other users or system to re-use in the future. Note that users can specify the number of validators that they want to run the script. Below are the required attributes for an AIrequest
:Report
. A report has the following fields:AIRequestResult
stores the final result after aggregating the results from the reports of an AI request, which are immutable and can be reused. It contains:AIRequestResult
belongs to.AIRequestResult
. It can be in pending, finished, or expired mode. It is in pending mode when there are not enough reports, but the deadline is not reached. An AIRequestResult
deadline counts as a threshold for a specific number of blocks passed from the block that has added the create AI request transaction. For example, an AI request is added into block ten, and the threshold is ten. As a result, the deadline is block twenty. If the AIRequestResult
receives less than the number of required reports, it will be considered as expired. Other than that, the AIRequestResult
is in finish mode.Reward
struct to incentive entities that have contributed in the process. Even when an AIRequestResult
is in expired mode, those who have reported or data sources, test cases that have run successfully and correctly will be rewarded. In order to do so, there are a few parameters for this Reward
struct that we need to consider:Reward
stored on chain.