Code Monkey home page Code Monkey logo

Comments (6)

jakinyele avatar jakinyele commented on June 1, 2024 1

Looking forward to z-addr -> t-addr/z-addr! Well done @raychu86 @howardwu!

from wagyu.

raychu86 avatar raychu86 commented on June 1, 2024 1

Preliminary implementation for Zcash transaction builder is complete with real transaction tests.

NOTE:
Sending real transactions with sapling spends require the most recent sapling tree state (current tests use gdb/lldb dives into the Zcash node to retrieve this information). gdb/lldb scraping for state information was only used for testing and future development will be require a separate stateful client.

Current scraping techniques only allows us to obtain the commitment tree witnesses and anchor separately, however the ideal implementation should obtain the full tree or the incremental witnesses.

from wagyu.

jakinyele avatar jakinyele commented on June 1, 2024 1

Thanks again @raychu86! This is fantastic!

One question about sapling witnesses: couldn't you extract the commitment tree witnesses and anchors from the light client? The client includes a sqlite DB for the most recent witnesses. See: https://github.com/str4d/librustzcash/blob/preview/zcash_client_backend/src/sqlite.rs

Would this help?

from wagyu.

raychu86 avatar raychu86 commented on June 1, 2024 1

Thanks for the pointer! That would most likely work.

I'll look into that avenue and do some testing to see if I can further simplify/untangle the transaction building process.

from wagyu.

raychu86 avatar raychu86 commented on June 1, 2024

Implementation WIP in feature/zcash-transactions.

  • t-addr -> t-addr
  • t-addr -> z-addr
  • z-addr-> t-addr
  • z-addr -> z-addr

Note: All z-addresses refer to sapling addresses.

from wagyu.

raychu86 avatar raychu86 commented on June 1, 2024

Current implementation generates sapling spends and outputs with valid proofs.

Shielded outputs have been tested with real transactions (successfully broadcasting the crafted transaction hexes), however shielded spends have not. This is because sapling spends require a the latest state of the sapling tree state in order to determine a valid anchor and nullifier.

Further research is underway regarding tests for real sapling spends.

Testing proposal:

  1. Run a zcash node
  2. Extract a serialize sapling tree state or note witnesses using GDB or LLDB.
  3. Import the serialized value into wagyu transaction builder
  4. Generate the transaction hex
  5. Broadcast the transaction via zcash-cli

from wagyu.

Related Issues (20)

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.