-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FCT anchors specification #154
base: develop
Are you sure you want to change the base?
FCT anchors specification #154
Conversation
…unter Atomic JSONRPC id counter
Co-authored-by: Brian Deery <[email protected]>
Co-authored-by: Brian Deery <[email protected]>
Co-authored-by: Brian Deery <[email protected]>
* anchors support * allow request for height 0 * anchor unit test
* add noraw option * use noraw param * add noraw option * use noraw param * remove raw data request * remove unnecessary comment Co-authored-by: Brian Deery <[email protected]>
* return useful results from pending transactions * expand fblock transactions * add support for dbheight * capitalization, unit test, time conversion Co-authored-by: Brian Deery <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reference document for the functionality of this? I don't see a PR for the factomd implementation of this, so it's hard to review the functionality at this point.
func (a *AnchorsFactom) UnmarshalJSON(data []byte) error { | ||
type tmp *AnchorsFactom // unmarshal into a new type to prevent infinite loop | ||
// json can't unmarshal a bool into a struct, but it can recognize a null pointer | ||
data = bytes.Replace(data, []byte("\"factom\":false"), []byte("\"factom\":null"), -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a workaround in Anchors.UnmarshalJSON because the Factomd API wrongfully reports it like that and would have required a breaking API change to fix. Since this doesn't have an implemented on the factomd end yet, I see no reason to do it this way and just have the API implementation report a null.
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? |
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.
TL;DR;
Customet factomd:
Testnet/customnet explorer:
--
|
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:
Also there is a test for getAnchorsFactom