Real blockchain transactions with Zaino/LWD backends and pexpect wallet integration with full M2 and zingolib integration#4
Real blockchain transactions with Zaino/LWD backends and pexpect wallet integration with full M2 and zingolib integration#4Timi16 wants to merge 94 commits intozecdev:mainfrom
Conversation
|
Made changes requested @pacu thank you would await reviews |
|
Hi @Timi16 you have requested a re-review of this PR but I don't see any other changes. |
|
So i decided to change the faucet from Python to Rust so i can interact with Zingolub directly |
pacu
left a comment
There was a problem hiding this comment.
partial review.
not tested yet. there are some naming issues remaining. Also rust faucet should use librustzcash instead ofZebra RPC to validate addresses. Also left questions to the developer about method visibility on Axum handlers
pacu
left a comment
There was a problem hiding this comment.
I've finished reviewing the code but I haven't tested it yet.
Next steps: @pacu will test the tool in his development server to verify the functionality of the code and point out any issues encountered with the features planned for milestone 2 if any
| pub type Result<T> = std::result::Result<T, zeckitError>; | ||
|
|
||
| #[derive(Error, Debug)] | ||
| pub enum zeckitError { |
There was a problem hiding this comment.
can you please follow Rust Lang Naming conventions?
https://rust-lang.github.io/api-guidelines/naming.html
There was a problem hiding this comment.
Alright my bad would follow standard naming conventions
There was a problem hiding this comment.
rename README.md to follow naming conventions on Github repos
| echo "📊 Current block height: ${BLOCK_COUNT}" | ||
|
|
||
| # Wait for blocks | ||
| echo "⏳ Waiting for at least 10 blocks to be mined..." |
There was a problem hiding this comment.
I don't understand why it needs to wait for blocks to be synced given that LWD should be able to wait for the node without problems when initialized
|
The thing is we need to wait for 10 blocks each for both lightwalletd and zaino Before starting |
|
|
||
| **Purpose:** REST API for test funds and fixtures | ||
|
|
||
| **Technology:** Python 3.11 + Flask + Gunicorn |
There was a problem hiding this comment.
this is incorrect. The Faucet is supposed to be Rust already
| **Docker Image:** Custom Python 3.11-slim + Docker CLI | ||
|
|
||
| **Key Files:** | ||
| - `/app/app/` - Flask application |
|
|
||
| **Alternative considered:** Direct Zebra RPC → Rejected (no UA support) | ||
|
|
||
| ### Why Python Faucet? |
| │ │ | ||
| │ ┌──────────┐ │ | ||
| │ │ Faucet │◄───────────────────────────┘ | ||
| │ │ Flask │ │ |
| **Critical Functions:** | ||
|
|
||
| ```python | ||
| def send_to_address(address: str, amount: float) -> dict: |
| use wallet::WalletManager; | ||
|
|
||
| #[derive(Clone)] | ||
| pub struct AppState { |
There was a problem hiding this comment.
same as above, please check visibility needed in axum's docs and provide the least public one
There was a problem hiding this comment.
remove this file. these should be downloaded and stored, not checked in into github
There was a problem hiding this comment.
remove this file. these should be downloaded not checked into github
| - Health checks | ||
| - Manual Docker Compose | ||
|
|
||
| **M2 Real Transactions:** |
There was a problem hiding this comment.
M2 goals are incomplete according to the milestones presented and approved by ZCG ZcashCommunityGrants/zcashcommunitygrants#105
| - UA (ZIP-316) test vectors | ||
| - Manual Docker Compose workflow | ||
|
|
||
| ### Milestone 2: Real Transactions |
There was a problem hiding this comment.
this information seems repeated hence inconsistent
|
|
||
| // Run shield command | ||
| let shield_cmd = format!( | ||
| "bash -c \"echo -e 'shield\\nconfirm\\nquit' | zingo-cli --data-dir /var/zingo --server {} --chain regtest 2>&1\"", |
There was a problem hiding this comment.
ZingoLib is a rust library, I think you are missing the benefits and the rationale of making the ZecKit stack speak Rust natively
There was a problem hiding this comment.
Yeah This is redundant code i'll change for the cli
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo -e "${GREEN}✓ Manual tests complete${NC}" | ||
| echo "" | ||
| echo "Next: Test funding endpoint when implemented" |
There was a problem hiding this comment.
isn't this implemented already in fund-faucet.sh?
There was a problem hiding this comment.
Yeah This Would come with clean ups when i push an update
Milestone 2: Real Blockchain Transactions
This PR delivers M2 core functionality: a working Zcash regtest devnet with real on-chain transactions, dual backend support (Lightwalletd + Zaino), and a functional faucet API using pexpect for reliable wallet interaction.
✅ What's Delivered
Core Infrastructure:
Real Blockchain Transactions:
Developer Experience:
zecdev) with up/down/test commandsKey Technical Achievements:
📊 Test Results
Zaino Backend:
Real Transaction Proof:
🔧 Technical Highlights
Pexpect Implementation:
Healthcheck Optimization:
Backend Toggle:
📚 Documentation Added
README.md- Complete user guide with quickstart (updated)specs/technical-spec.md- 27-page implementation deep-dive (NEW)specs/architecture.md- System design and data flows (NEW)scripts/setup-mining-address.sh- Mining address configuration (NEW)🐛 Bugs Reported Upstream
🚀 What This Enables
📋 Files Changed
New Files:
specs/technical-spec.mdspecs/architecture.mdscripts/setup-mining-address.shdocker/lightwalletd/Dockerfile(Go 1.24 build)docker/lightwalletd/entrypoint.sh(healthcheck logic)Modified Files:
README.md(comprehensive rewrite)docker-compose.yml(healthcheck tuning, backend profiles)faucet/app/wallet.py(pexpect implementation)faucet/app/main.py(startup optimization)docker/configs/zebra.toml(mining configuration)✅ M2 Acceptance Criteria
From Grant:
Status:
🙏 Acknowledgments
Thanks to the Zcash community for:
Ready for review! Infrastructure is solid, real transactions working.