Code Monkey home page Code Monkey logo

go-iltags's People

Contributors

fjtc avatar monoman avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

go-iltags's Issues

Add the extended implementation of the tag ChainNameBlockRefTag

Add the extended implementation of the tag ChainNameBlockRefTag. The ChainNameBlockRefTag is a tag with no fixed ID that contains 2 tags inside, a StringTag with a custom ID that holds the chain name followed by a ILIntTag that holds the block ID.

As an extended tag, it does not enforce fixed IDs to its components.

Add a generic timestamp tag implementation

Add a generic timestamp tag implementation. This tag should represent a timestamp in microseconds since 1970-01-01T00:00:00.000000Z.

The serialization should be identical to the SignedILIntTag but its implementation must define methods to integrate with the standard time package.

Add a simple way to version tag payloads

Add a simple way to version tag payloads. The current suggestion is to format the payload with a version prefix and a way to put the actual payload after that.

Add the concept of WrappedValueTag

Add the concept of WrappedValueTag. This ILTag extension will define an interface where the tag implementation actually wraps the value it will serialize.

For instance, a ATag that implements the WrappedValueTag interface will have the value A as the wrapped value. On serialization, it will be used as to get the information to serialize. On deserialization, a new instance of this value is created by the deserialization process.

Add the support for the IL2 versioned payload scheme

Add the support for the IL2 versioned payload scheme. This scheme uses a ILUint16Tag to encode the version instead of the plain uint16 value used by the implementation introduced in the version v0.1.1 of this library.

While the main advantage of the scheme used by VersionedPayload from this library is its compact size, the scheme defined by IL2 has the advantage to be compatible with an ILTagSequenceTag.

The idea is to keep both schemes in the library as VersionedPayload is suitable for raw payloads and the IL2 scheme is perfect for tag sequence payloads.

This enhancement was motivated by a post by @monoman at issue #3 (comment).

Add helper functions to serialize/deserialize implicit tags without instantiate them

Add helper functions to serialize/deserialize implicit tags without instantiate them. It will follow the same idea of the helper functions:

  • StringTagSize(tagId tags.TagID, s string) uint64
  • StdStringTagSize(s string) uint64
  • SerializeStringTag(tagId tags.TagID, s string, writer io.Writer) error
  • DeserializeStringTag(expectedId tags.TagID, reader io.Reader) (string, error)
  • SerializeStdStringTag(s string, writer io.Writer) error
  • DeserializeStdStringTag(reader io.Reader) (string, error)

All reserved implicit tags needs to have their own functions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.