factom icon indicating copy to clipboard operation
factom copied to clipboard

FCT anchors specification

Open ilzheev opened this issue 4 years ago • 3 comments

This PR adds structs and functions related to FCT anchoring (anchors from customnet into Factom mainnet). As BTC and ETH anchoring is not compatible (logically) with FCT anchoring (i.e. mainnet is anchored into BTC and ETH, and customnet is anchored into mainnet, but not into BTC and ETH), so I created separate structs and functions for Factom Anchors.

Basically it's a copy of default Anchors structs and functions:

  1. AnchorsFactom{}
  2. AnchorFactom{}
  3. (a *AnchorsFactom) String()
  4. (a *AnchorsFactom) UnmarshalJSON()
  5. getAnchorsFactom(hash string, height int64) (*AnchorsFactom, error)
  6. GetAnchorsFactom(hash string) (*AnchorsFactom, error)
  7. GetAnchorsFactomByHeight(height int64) (*AnchorsFactom, error)

Also there is a test for getAnchorsFactom

ilzheev avatar Oct 23 '20 14:10 ilzheev

There is no factomd implementation yet, so I agree that we should merge this PR together with factomd PR related to FCT anchors.

Is anyone willing to develop factomd functionality for this? @WhoSoup @PaulBernier @PaulSnow

ilzheev avatar Oct 26 '20 07:10 ilzheev

Is anyone willing to develop factomd functionality for this?

Is there a technical design for how the thing is supposed to work (in terms of parsing, config layout, format, etc) available?

WhoSoup avatar Oct 26 '20 07:10 WhoSoup

Is anyone willing to develop factomd functionality for this?

Is there a technical design for how the thing is supposed to work (in terms of parsing, config layout, format, etc) available?

It's pretty the same as mainnet BTC anchoring.

  • The anchoring software (standalone binary) connects to both custom network and Factom Open Node
  • Chain for anchors is created on mainnet, the chainID set into anchoring software config
  • Chain for proof-of-anchors (FactomAnchorChainFCT) is created on customnet
  • Customnet factomd authority nodes add ChainID of FactomAnchorChainFCT into config and parse anchoring data from there

TL;DR; Anchoring software (to be developed by De Facto):

  • Reads customnet dblocks and anchors them into mainnet
  • Writes proof-of-anchors into FactomAnchorChainFCT on customnet

Customet factomd:

  • Parses data from FactomAnchorChainFCT and returns it via anchors API

Testnet/customnet explorer:

  • Parses data from factomd via anchors API

-- Need to develop:

  1. specification for proof-of-anchor entries into customnet FactomAnchorChainFCT
  2. specification for anchor entries into mainnet
  3. factomd API update to support parsing FCT anchors from FactomAnchorChainFCT

ilzheev avatar Oct 26 '20 08:10 ilzheev