Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add 'Publish Feed' feature #414
This PR adds the 'Publish Feed' feature to Omni Core.
This is currently a prototype for review, and may need changes or updates depending on whether I've understood the requirements for publishing a feed correctly.
In summary, the feed system allows an address to publish a value (a feed) which may be later referenced.
The feature has been simplified from the original concept of publishing data described in the Omni spec. There appears no need to 'setup' a feed, we are able to simply publish values as needed.
Feeds are identified by two attributes; the publishing address and a feed reference. A feed reference is used to allow an address to publish multiple disparate feeds if so desired.
Transaction type 31 publishes a value which may be later referenced by Omni transactions and exposed by the RPC-API.
There are no additional validity constraints other than the the message field datatypes.
No transactions currently reference this data, but it is exposed via the RPC-API interface.
Initially supported functions via the RPC-API are:
Respective internal functions grab this data from the feed database (leveldb), it may be likely that the most useful in the context of smart contracts would be retrieving the value at block N (assuming contracts are settled based on the price at block N).
A set of basic tests is included to validate functionality - these results (included below) can be checked by running the bash script