FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: Serialize using `write` instead of `read` · Issue #46 · ZeroSync/ZeroSync · GitHub

feat: Serialize using write instead of read #46

Description

Serialize using write instead of read

Describe the Feature Request

We have to change our architecture before we can efficiently implement Bitcoin Script. There's a problem arising from serialization read vs write.
Currently, we're using only read. This has the advantage that the data type of the hints providing the TX data is very simple. Also we can hash those hints as provided, which creates a strong backbone for the validity of a block.

However, reading might be the wrong approach overall, because we have to hash TXs in multiple different ways. For example, there's the TXID and a sighash for every input. So at some point we will have to use write instead of read for almost all hashes. That implies that it is probably easier to provide the TXs in high-level objects and then always use write and never read.

Describe Preferred Solution

  1. Implement remaining low-level write functions in serialize.cairo.
  2. Use the ZeroSync Parser to provide via hints TX data as high-level objects
  3. Implement a conditional writer that can serialize all TX hashes (TXID, for each input all sighash types, wTXID)
  4. Implement high-level write functions for Transaction and Block

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement of the code, not introducing new features.no-staleThis is exempt from the stale bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL