Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Table of Contents

Overview

FIO Relic is a fork of Antelope Memento and is intended to receive FIO Chain data stream from the FIO Chain Node via EOS Chronicle. FIO specific data is extracted from the stream and stored in a Relational Database (RDB) for future query via API. The following document is intended to be functional specification for the FIO Relic System.

Components

Data Transformation

This component is responsible for reading the data in the data stream and looking for FIO-specific data, parsing it, and inserting into RDB.

Example:

  • When an action registering FIO Domain is observed, insert it into domains table.

Query API

This component is responsible for receiving an API request, fetching relevant data from the RDB and returning to the API user.

Example:

  • Fetch all FIO Domains registered in specific time-frame.

Push Notification System

This component will be developed in Phase 2.

This component allows an API user to subscribe to specific events and then receive notification if such event has occurred during data transformation.

Examples

  • “Notify supplied webhook on every new FIO Domain registration”

  • “Notify when a FIO Request for specific FIO Handle is observed”

Specification

Data Model

blocks

Add only. Every block is a new entry.

Field

Description

Relationship

number

Block number as generated by FIO Node

transactions->block_num

id

Block ID as generated by FIO Node

timestamp

Timestamp as generated by FIO Node

producer

Account name of producer which produced the block

schedule_version

Version of BP schedule

transactions

Add only. Every transaction is a new entry.

Field

Description

Relationship

block_number

Block which contained this transaction

blocks->number

id

Transaction id

traces->transaction_id

action_account

Account name for action

action_name

Action name

account

Account which executed the transaction

tpid

TPID which was recorded in tranaction

fee

FIO Chain fee paid for this transaction

request_data

Raw request data for primary trace

response_data

Raw response data for primary trace

status

traces

Add only. Every trace is a new entry.

Field

Description

Relationship

id

Trace id

account_activity->trace_id

domain_activity->trace_id

handle_activity->trace_id

token_transfers->trace_id

fio_requests->trace_id

fio_data->trace_id

transaction_id

Transaction ID

transactions->id

action_ordinal

Sequential order of trace in transaction

action_account

Account name for trace

action_name

Action name fro trace

request_data

Raw request data for trace

accounts

Add only. Every account created is a new entry.

Field

Description

Relationship

account

Account name

account_activity->account

domains->account

handles->account

token_transfers->payer_account

token_transfers->payee_account

fio_requests->payee_account

fio_requests->payer_account

fio_data->payee_account

fio_data->payer_account

public_key

Primary public key

account_activity

Add only. Every activity is a new entry.

Field

Description

Relationship

account

Account name

accounts->account

trace_id

Trace ID

traces->id

type

Type of activity

domains

Add and update. Represents current state of domains. Will be updated every time domain info changes. Records will not be removed, just marked burned.

Field

Description

Relationship

domain

Domain name

domain_activity->domain

account

Account name of current owner

accounts->account

is_public

Is domain public

expiration

Timestamp of domain expiration

status

Current status of domain

domain_activity

Add only. Every activity is a new entry

Field

Description

Relationship

domain

Domain name

domains->domain

trace_id

Trace ID

traces->id

type

Type of activity

handles

Add and update. Represents current state of handles. Will be updated every time handle info changes. Records will not be removed, just marked burned.

Field

Description

Relationship

handle

Handle name

handle_activity->handle

pub_addresses->handle

nft_signatures->handle

fio_requests->payer_handle

fio_requests->payee_handle

fio_data->payer_handle

fio_data->payee_handle

account

Account name of current owner

accounts->account

encryption_key

Encryption public key

bundled_tx

Bundled tx count

handle_activity

Add only. Every activity is a new entry

Field

Description

Relationship

handle

Handle name

handles->handle

trace_id

Trace ID

traces->id

type

Type of activity

pub_addresses

Add, update, delete. Represents current state of mapped public addresses. Will be updated every time mapping changes. Records will be removed if needed.

Field

Description

Relationship

handle

Handle name

handles->handle

chain_code

Chain code

accounts->account

token_code

Token code

traces->id

public_address

Public Address

nft_signatures

Add, update, delete. Represents current state of NFT signatures. Will be updated every time signatures are changed. Records will be removed if needed.

Field

Description

Relationship

handle

Handle name

handles->handle

chain_code

Chain code

accounts->account

token_code

Token code

traces->id

public_address

Public Address

token_transfers

Add only. Every transfer is a new entry. Includes internal transfers.

Field

Description

Relationship

payer_account

Account of payer (sender)

accounts->account

payee_account

Account of payee (receiver)

accounts->account

trace_id

Trace ID

traces->id

amount

Token amount in FIO

type

Type of transfer

memo

Memo in transfer

fio_requests

Add and update. Represents current state of requests. Will be updated every time request status changes. Records will not be removed.

Field

Description

Relationship

id

FIO Request ID

fio_data->request_id

payee_account

Account of payee

accounts->account

payer_account

Account of payer

accounts->account

payee_handle

Handle of payer

handles->handle

payer_handle

Handle of payee

handles->handle

content

Encrypted blob

payee_pub_key

Public Key of payee

payer_pub_key

Public Key of payer

status

Status of request

trace_id

Trace ID

traces->id

fio_data

Add and update. Represents current state of FIO Data. Will be updated every time request status changes. Records will not be removed.

Field

Description

Relationship

request_id

FIO Request ID (optional)

fio_requests->id

payee_account

Account of payee

accounts->account

payer_account

Account of payer

accounts->account

payee_handle

Handle of payer

handles->handle

payer_handle

Handle of payee

handles->handle

content

Encrypted blob

payee_pub_key

Public Key of payee

payer_pub_key

Public Key of payer

status

Status of data

trace_id

Trace ID

traces->id

block_producers

Add and update. Represents current state of requests. Will be updated every time request status changes. Records will not be removed.

Field

Description

Relationship

account

Owner account

accounts->account

handle

Registered handle

handles->handle

is_active

Encryption public key

Parsing Rules

The parsing rules below are triggered by any of the following:

  • block

  • transaction

  • trace

  • specific account and name inside traceaction_tracesact. It will be presented as Trigger: action_account:action:name, e.g. Trigger: eosio:newaccount

and are organized by defining the table where record needs to be added as well as data source, typically from the trace.

Trigger: every block

Table: blocks

Field

Source Data

number

block_num

id

block_id

timestamp

block_timestamp

producer

producer

schedule_version

schedule_version

Trigger: every transaction

Table: transactions

Field

Source Data

block_number

block_num

id

traceid

action_account

traceaction_tracesactaccount

action_name

traceaction_tracesactname

account

traceaction_tracesactauthorizationactor

for action_ordinal = 1

tpid

traceaction_tracesactdatatpid

fee

responsefee_collected

request_data

traceaction_tracesactdata

for action_ordinal = 1

response_data

response

status

tracestatus

Trigger: every trace

Table: traces

Field

Source Data

id

Auto-generated ID

transaction_id

traceid

action_account

traceaction_tracesactaccount

action_name

traceaction_tracesactname

request_data

traceaction_tracesactdata

Trigger: eosio:newaccount

Table: accounts

Field

Source Data

account

traceaction_tracesactdataname

public_key

traceaction_tracesactdata → ( fio_public_key OR owner_fio_public_key OR new_owner_fio_public_key OR payee_public_key )

for action_ordinal = 1

Table: account_activity

Field

Source Data

account

traceaction_tracesactdataname

trace_id

Reference to trace table record

type

account_created

  • No labels