adityapk00 / lightwalletd Goto Github PK
View Code? Open in Web Editor NEWThis project forked from zcash/lightwalletd
LightwalletD is the light wallet client server for Zcash
License: MIT License
This project forked from zcash/lightwalletd
LightwalletD is the light wallet client server for Zcash
License: MIT License
I noticed in lightwalletd's logs that it was excluding the price from binance because it was 55.8 whereas the actual price of ZEC was around 42.7. Their APIs for USDC prices seem to be broken, not returning the correct price for all the coins I tried.
I was able to get the correct price using any of https://api.binance.com/api/v3/ticker/price?symbol=ZECBUSD
or https://api.binance.com/api/v3/ticker/price?symbol=ZECUSDT
, https://api.binance.com/api/v3/avgPrice?symbol=ZECBUSD
, https://api.binance.com/api/v3/avgPrice?symbol=ZECUSDT
.
I'm not sure what's going on with the USDC prices over at binance, but you might want to change the Binance URL in lightwalletd to one of the above.
What is the bug?
I tried syncing lightwallet 1.7.6 in testnet (using zcashd for now because I need to resync my zebra on testnet) and it seems to get stuck with
{"app":"lightwalletd","error":"error parsing block: parsing transaction 0: while parsing transparent input: could not read ScriptSig","height":1842420,"level":"warning","msg":"error zcashd getblock rpc","time":"2022-05-20T17:42:12-03:00"}
That height is the NU5 activation height. It repeats this a dozen of times and quits with
{"app":"lightwalletd","level":"fatal","msg":"unable to issue RPC call to zcashd node","time":"2022-05-20T17:43:52-03:00","timeouts":11}
Lightwalletd died with a Fatal error. Check logfile for details.
Additional context
Solution
I'm assuming this is expected and is due to the fork being out of date with upstream, but figured it would be better to register it here.
I'm running cashed and this version of lwd locally. I usually launch Zcashd and then lwd without paying too much attention to it.
I noticed that some of my tests that fetch old block ranges were failing.
Steps:
expected: request succeeds
result: request fails with unknown status code
console is stuck on
WARNING[2019-12-05T12:35:07-03:00] Unable to get sapling activation height app=frontend-grpc error="error requesting block: -28: Loading block index..."
INFO[2019-12-05T12:35:07-03:00] Got sapling height -1 chain branchID app=frontend-grpc
INFO[2019-12-05T12:35:07-03:00] Starting gRPC server on 127.0.0.1:9067 app=frontend-grpc
WARNING[2019-12-05T12:35:22-03:00] error with getblock app=frontend-grpc error="error requesting block: -28: Loading block index..." height=-1
WARNING[2019-12-05T12:35:37-03:00] error with getblock app=frontend-grpc error="error requesting block: -28: Loading block index..." height=-1
In passing, I noticed that this fork of lightwalletd is missing this bug fix, without which the server can crash when a reorg occurs at just the right time: zcash#409.
The patch in ECC's repo will need ZcashFoundation/zebra#6134 to merge in order to work with zebra.
(I'd recommend rebasing on top of ECC's upstream repo, it will make code reviews quicker!)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.