Commit Graph

517 Commits

Author SHA1 Message Date
Aditya Kulkarni 4c9e75e28f recompile protos 2022-05-18 11:42:57 -05:00
Steven Smith e7e9530349 Add support to GetTreeState to return Orchard final state 2022-05-18 10:44:29 -05:00
Larry Ruane fd61cf23b9 fix orchard action ciphertext comment
No functional change. See:
https://github.com/zcash/librustzcash/pull/515#discussion_r808624455
2022-05-18 10:42:52 -05:00
Dimitris Apostolou e9bc2f1d0a Fix typos 2022-05-18 10:42:38 -05:00
Larry Ruane 4cdacc3a3f compact blocks should include Orchard transactions
In previous commit, I forgot to include Orchard transactions in compact
blocks (so they will now include transactions with either Sapling or
Orchard transactions).
2022-05-18 10:42:31 -05:00
Larry Ruane 96c80c1fe9 add NU5 Orchard transaction data to CompactBlock 2022-05-18 10:42:15 -05:00
Larry Ruane 7a9fc665c1 performance: don't deserialize unused tx fields 2022-05-18 10:41:35 -05:00
Larry Ruane b06a4e15de improve tx parser memory behavior
This is a non-functional change. Instead of `rawTransaction` (which
carries the result of parsing a full transaction from zcashd) containing
slices of _pointers_ to separately-allocated memory (one allocation for
each spend, for example), allocate a slice of spends (one contiguous
range of memory). A quick benchmark shows sync improves by about 8%.
2022-05-18 10:41:26 -05:00
Larry Ruane b5c268b8e2 parse V5 (nu5) transactions
TODO:
- store, instead of just skip over, nu5 transaction fields
- add relevant nu5 fields to CompactBlock
- restore disabled V4 unit tests
- add V5 test vectors to unit tests

The reason most of the V4 transaction and block unit tests are removed
is that they used V3 transactions, which lightwalletd never sees in
production, since lightwalletd starts at Sapling activation (which has
V4 transactions). So these tests were always wrong, in a way. This
commit simplifies the parsing code by removing support for V3 (since it
was never needed). The tests need to be updated to V4, but we'll do
that in a later PR.
2022-05-18 10:41:15 -05:00
adityapk 98cb0ea9f2 cleanup locking for mempool 2022-05-16 13:33:43 -05:00
adityapk 3bec6d290c Timer to 30s 2022-05-13 11:12:12 -05:00
Aditya Kulkarni f6ea41cf9c v1.7.6 2022-04-07 10:50:50 -05:00
Aditya Kulkarni e146dbf5c2 Fix mempool issue 2022-04-07 10:20:01 -05:00
Aditya Kulkarni c1bab818a6 Fetch historical prices from coinbase 2021-08-30 10:43:49 -07:00
Aditya Kulkarni db02bf40b9 Cleanup logging 2021-07-28 19:34:41 -07:00
Aditya Kulkarni 1b485256a3 Return hashes with getlatestblock 2021-07-26 13:11:02 -07:00
Aditya Kulkarni 7f81fcbf78 Monitor for 1-block reorgs as well 2021-07-26 10:33:28 -07:00
adityapk00 d461c18785
Mempool (#10)
* mempool streaming

* Fix deadlock

* return correct height

* Add mempool stream timeout

* buffer channel

* Mempool API

* comment
2021-07-14 14:46:20 -07:00
Larry Ruane a56af1cfbf GetBlockRange: allow start < end, return blocks in reverse order 2021-05-21 11:17:52 -07:00
adityapk00 41ebe0e04b
Prices (#9)
* Prices API

* Add current prices

* Historical prices persist

* Add mutexs

* multiple providers

* Handle startup

* Edge case where historical price is requested for current

* fix median edge case

* Don't return too old last price

* bug fixes

* price metrics and logging

* warnings
2021-05-18 09:26:55 -07:00
Aditya Kulkarni d5ca359418 fix merge 2021-04-23 16:41:00 -07:00
adityapk00 f0152f09b9
Merge pull request #8 from adityapk00/lightd_compat
LightwalletD Compatibility
2021-04-22 12:00:54 -07:00
Aditya Kulkarni 02db546516 Update README 2021-04-22 09:25:53 -07:00
Aditya Kulkarni 2941299202 Fix metrics 2021-04-21 11:58:24 -07:00
Aditya Kulkarni 665183b44e Update deps 2021-04-21 10:59:27 -07:00
Aditya Kulkarni 3e2ba3c4c2 Fix vendor string 2021-04-21 10:45:34 -07:00
Aditya Kulkarni d28a129df9 Handle Params downloads on the HTTP server 2021-04-21 10:40:39 -07:00
Aditya Kulkarni e13b946657 Remove k8s 2021-04-20 20:40:52 -07:00
Aditya Kulkarni 6341e177f3 Fix names 2021-04-20 20:28:46 -07:00
Aditya Kulkarni 9501c7e975 Add windows executable exception 2021-04-20 10:58:47 -07:00
adityapk00 7ff8513186 Zecwallet latency logging 2021-04-20 10:40:36 -07:00
adityapk00 cac5873ecd Add metrics 2021-04-20 10:32:41 -07:00
adityapk00 f05fef2762 Merge fixes 2021-04-19 13:46:14 -07:00
adityapk00 d3eb6122b8 git push origin lightd_compatMerge branch 'zcash-master' into lightd_compat 2021-04-19 13:38:37 -07:00
adityapk00 0605b33e39 Merge 2021-04-19 13:38:25 -07:00
Larry Ruane dcad72ed25 generalize GetAddressUtxos to accept taddr list 2021-04-08 11:22:12 -06:00
Larry Ruane d292bfaea5 update to latest go, protobufs, grpc toolchain
Should be no functional differences. This patch was generated by
installing the latest tools and running `make update-grpc`.
2021-04-07 12:58:01 -06:00
Larry Ruane 0995e130f4 eliminate genblocks compile warning
testtools/genblocks/main.go:91:74: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
https://github.com/golang/go/issues/32479
2021-04-07 10:45:46 -06:00
Larry Ruane 17c47cfebe call checkTaddress() for each given taddress 2021-03-08 12:25:02 -07:00
Larry Ruane 824cb8dc8e check SplitN() return value to prevent indexing beyond end of slice 2021-03-08 12:25:02 -07:00
Larry Ruane ad739ce055 allow Ping testing grpc only if explicitly enabled 2021-03-08 12:25:02 -07:00
Larry Ruane 86a76a96cb check txid (hash0 length argument, must be 64 2021-03-08 11:23:05 -07:00
Larry Ruane 5c5c4b882f check disk write return values 2021-03-08 11:21:33 -07:00
Larry Ruane 22dda4a28d check all json.Unmarshal() error returns 2021-03-08 11:14:48 -07:00
Larry Ruane c7c5da1fda don't log method names to stderr unless --grpc-logging-insecure 2021-03-08 11:12:26 -07:00
Larry Ruane d9d12998b2 remove error logging that client requests can cause 2021-03-08 10:51:31 -07:00
Larry Ruane a69537cf2b restore coinbase height check
The reason that it had to be disabled has gone away. This provides more
security by ensuring that the blocks we receive from zcashd are valid.
2021-01-15 16:49:22 -07:00
Larry Ruane 82045d493a fix GetTaddressBalance (json problem) 2021-01-15 14:05:27 -07:00
Larry Ruane 97d57395b2 fix GetTaddressTxids() 2021-01-12 16:18:29 -07:00
Larry Ruane d7f35f2713 fix database file location bug introduced by PR320
PR 320 introduced a bug that causes the `blocks` and `lengths` database
files to be located one directory level higher than it they should be.

The bug doesn't cause any functional problem, it only makes the
lightwalletd do more work (re-download the block cache), and it also
makes it not possible to switch between testnet and mainnet.

This patch locates the database files back where they belong.
2021-01-11 12:19:51 -07:00