Skip to content

WIP: modularization, minimal encoding #302

@dexX7

Description

@dexX7

Most of this branch are concept tests and experiments, but since @zathras-crypto is already on class C encoding, it's probably better to discuss the general direction, and in particular here the aspect of data embedding and encoding.

The main goal I had in mind was greater modularization of Omni Core, maybe even in parts which go beyond Omni Core as project, but tackle on-chain data embedding in general. For the future I envision Omni Core as a rich package of core and utility functions, where some parts might be converted into a library, which could then be used in other projects like OmniJ, OmniPy, or whatever..

So back to the actual topic: the essence I'd like to focus on now is an early stage of the data embedding layer:

I consider and handle data as a bunch of bytes, not strictly as data packages, or something that is embedded via class B or class C encoding. Data (generally) could be embedded in bare multisig outputs, via op-return, ... and data could furthermore be transformed and modified, whether that is class B obfuscation, or by inserting sequence numbers.

There are basically three parts, starting with the actual embedding of plain data:

Helpers used for bare multisig encoding:

As well as some Omni Core specific functions related to the current data embedding schemes:

In like 5 lines of code EncodeBareMultisigObfuscated() (class B) was created, simply by combining the insertion of sequence numbers, obfuscation and bare multisig data embedding.

To demonstrate this in action, there are three RPC calls:

rpc_encoding

Keeping the dependencies low is a goal, so Bitcoin Core may ultimately only be used for convenience, and of course as data provider and network connector, when considering the greater picture beyond data embedding.

Right now I'm looking for early feedback about the general idea, the long term goal of modularization, and in particular an experimental stage of the data encoding aspect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions