factom
factom copied to clipboard
FCT anchors specification
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:
- AnchorsFactom{}
- AnchorFactom{}
- (a *AnchorsFactom) String()
- (a *AnchorsFactom) UnmarshalJSON()
- getAnchorsFactom(hash string, height int64) (*AnchorsFactom, error)
- GetAnchorsFactom(hash string) (*AnchorsFactom, error)
- GetAnchorsFactomByHeight(height int64) (*AnchorsFactom, error)
Also there is a test for getAnchorsFactom
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
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?
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:
- specification for proof-of-anchor entries into customnet FactomAnchorChainFCT
- specification for anchor entries into mainnet
- factomd API update to support parsing FCT anchors from FactomAnchorChainFCT