Commit Graph

528 Commits

Author SHA1 Message Date
wellweek 1cc97b10d0 fix: fix the wrong error return value
Signed-off-by: wellweek <xiezitai@outlook.com>
2025-03-21 13:45:42 -06:00
jimmycathy 82ebcbfd66 chore: fix comment
Signed-off-by: jimmycathy <clonecode@outlook.com>
2025-03-17 11:21:21 -06:00
Larry Ruane 7ec4d1c67c Add debug logging to gRPC entrypoints
This additional logging may help with debugging lightwalletd clients as
it may isolate the problem to the client or server (lightwalletd) side.

To see entrypoint logging, you must start lightwalletd with the option
--log-level 5 (which is "debug"; the default is 4, which is "info")).

This option shouldn't be used in normal operation, because clients could
flood the log, causing crashes due to running out of disk space. Only
use this when actually debugging or testing.

For most gRPCs, also log return values if the log-level is 6 ("trace").
Return value logging isn't done if there is an error (it's assumed that
the client will log something) or if the output might be very large (we
don't want to overrun the log file).

Enabling trace (--log-level 6) enables everything below that level,
so entry logging is enabled as well.
2025-03-10 16:37:45 -06:00
Larry Ruane a9e47fd37e add smoke test (uses darkside wallet server)
More tests could be added later; this covers the basics.
2025-03-10 14:42:58 -06:00
Larry Ruane 71dd78f040 follow-on to PR 506 - update help file index.html 2025-03-10 13:52:27 -06:00
Emerson Hall e720feb3f3 Operators can specify a Zcash donation address 2025-03-06 14:48:59 -07:00
Larry Ruane 339b6d37e8 dependency update (dependabot) 2025-01-09 14:50:05 -07:00
Kris Nuttycombe 1e63bee761 Support empty block range end in `getaddresstxids` calls. 2024-10-16 12:08:53 -06:00
Larry Ruane 9cba3e0a7e non-functional change - re-run protoc to update comments
This is a follow-on to PR 495, which changed the comments in
service.proto but didn't regenerate service.pb.go. This commits re-runs
protoc so the two are back in sync (but the changes were comments only).
2024-10-16 10:07:57 -06:00
dependabot[bot] 7f00e244f7 Bump github.com/btcsuite/btcd from 0.24.0 to 0.24.2
Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd) from 0.24.0 to 0.24.2.
- [Release notes](https://github.com/btcsuite/btcd/releases)
- [Changelog](https://github.com/btcsuite/btcd/blob/master/CHANGES)
- [Commits](https://github.com/btcsuite/btcd/compare/v0.24.0...v0.24.2)

---
updated-dependencies:
- dependency-name: github.com/btcsuite/btcd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-16 09:51:39 -06:00
y4ssi 6223f36e9d
Update Dockerfile (#499) 2024-10-02 08:05:39 -06:00
Kris Nuttycombe 13856f3596
Merge pull request #495 from nuttycom/getrawtransaction_parse_testing 2024-08-14 13:11:42 -06:00
Kris Nuttycombe 90116a7c55 Filter out mined transactions in `refreshMempoolTxns` 2024-08-13 16:20:06 -06:00
Kris Nuttycombe 56fe52a11a Uniformly return height 0 for mempool `RawTransaction` results. 2024-08-13 12:11:47 -06:00
Kris Nuttycombe 0f1ed05c41 Document & test the conversion from `getrawtransaction` response to `RawTransaction`
This also modifies the internal `common.ZcashdRpcReplyGetrawtransaction`
type to ensure that the reinterpretation of the `-1` height value from
a `getrawtransaction` response is not platform-dependent.
2024-08-13 12:08:50 -06:00
Kris Nuttycombe 8866a0be4c Add a test that demonstrates unmarshalling behavior for `getrawtransaction` results. 2024-08-13 12:05:31 -06:00
Daira-Emma Hopwood c83db0117b
Merge pull request #489 from LarryRuane/2024-07-zebrad-err-messages
zebrad instead of zcashd in error messages
2024-08-10 11:11:03 +01:00
Emerson Hall 033d54e0f8 Log that gRPC is listening only when it is listening 2024-07-17 11:47:13 -06:00
Larry Ruane f24e0298a9 wait for zebrad or zcashd to reach sapling activation height
This has been broken for a long time. If, when starting up, lightwalletd
discovers that the backend node (zebrad or zcashd) has not yet synced to
the Sapling activation height (419200 for mainnet, 280000 for testnet),
it should wait until that happens, then sync along with the backend
node. But instead, lightwalletd gets stuck indefinitely. The only way
to escape the hang is to stop and restart lightwalletd.

This commit fixes the problem; the block ingestor retries every 2
minutes (which was always the intention), rather than trying once and
then giving up.
2024-07-10 12:07:00 -06:00
Larry Ruane 4492d60b31 zebrad instead of zcashd in error messages 2024-07-07 22:21:57 -06:00
Larry Ruane 6e3816b583 add --nocache option to disable compact block file cache
This fixes issue #480. Enabling this option decreases the performance of
gRPCs GetBlock and GetBlockRange, but conserves disk space (the size of
the database is currently around 17GB).

Note, specifying this option will also delete the existing cache (so if
you start again without --nocache, the cache will need to be recreated).
2024-06-27 13:24:57 -05:00
Larry Ruane 0bd5519808 add the ability to parse zebrad.toml config file
Fixes #462. If the file extension is .conf (as in zcash.conf), then
parse the file as an INI file. If the extension is .toml (as in
zebrad.toml), then interpret as TOML.
2024-06-27 12:35:29 -05:00
Larry Ruane 6071b06ace Reduce lightwalletd startup (if disk cache already exists)
Reduce the startup time from a couple of minutes to a few seconds (or
less) by removing the deserialization of all compact blocks in the disk
cache. This is an alternative to PR 482, see comment there for details.
2024-06-13 09:08:47 -06:00
Yass c6a3fe1574
Update CI - docker release (#486) 2024-05-10 14:49:30 -06:00
dependabot[bot] 21c2876860 Bump golang.org/x/net from 0.19.0 to 0.23.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.19.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.19.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 12:49:11 -06:00
str4d 2fb5ccd7aa
Merge pull request #479 from emersonian/go-1.22.2
Bump golang version to mitigate HTTP/2 continuation floods (#478)
2024-04-22 17:41:43 +01:00
Emerson Hall 5a500fb5b2 Bump golang version to mitigate HTTP/2 continuation floods (#478) 2024-04-04 22:16:50 -05:00
dependabot[bot] 283cc6475b Bump google.golang.org/protobuf from 1.32.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-14 09:35:54 -06:00
Yasser Isa 38b751e551
Create CI.yaml in Github Actions (#475)
* Migrate gitlab-CI to Github-Actions
2024-03-07 12:24:01 -07:00
dependabot[bot] cc04b52bec Bump golang.org/x/crypto from 0.16.0 to 0.17.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-13 11:50:57 -07:00
Larry Ruane 1002f42497 Update dependencies
To update to the latest dependencies, I removed everything within the
`require` sections of `go.mod`, updated to the latest protobuf compiler,
and then ran `go mod tidy` and `make`. This repopulated go.mod and go.sum.
I had previously done this in PR 395 (June 2022).

This should be done periodically to obtain the latest bug fixes and
other improvements in the dependencies. There should be no functional
changes.
2024-02-01 12:41:14 -07:00
Larry Ruane 9ed586d7cd fix Makefile: darkside.proto isn't generated 2024-02-01 12:41:14 -07:00
Larry Ruane e8453e62f6 update dependencies: packages ioutil, errors
No functional changes.

As pointed out in lightwalletd/pull/469, the errors package we're using
has been deprecated, so this commit updates the code to use "errors"
instead of "github.com/pkg/errors". Same with "io/ioutil", which has
been superceded by "os".
2024-02-01 12:41:14 -07:00
Kris Nuttycombe 5c534c6142
Merge pull request #471 from chairulakmal/470_update_wallet_examples
fix(docs): update wallet examples in Readme
2024-01-11 15:11:54 -07:00
Kris Nuttycombe e91d882057
Merge pull request #469 from LarryRuane/2023-12-darkside-GetSubtreeRoots
test: add darkside support for GetSubtreeRoots gRPC
2024-01-11 15:10:30 -07:00
Larry Ruane bfd4e0a53f test: add darkside support for GetSubtreeRoots gRPC
One new darksidewallet gRPC added, SetSubtreeRoots()
2024-01-11 12:48:10 -07:00
chairulakmal a8f3733074
fix(docs): update wallet examples in Readme 2024-01-11 22:30:28 +07:00
dependabot[bot] cdcbfeb5cc Bump golang.org/x/crypto from 0.14.0 to 0.17.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-27 10:56:18 -07:00
oscar-pepper c7dddecfe9 Update darksidewalletd.md 2023-11-28 13:52:06 -07:00
dependabot[bot] 71d9e0b6ef Bump google.golang.org/grpc from 1.53.0 to 1.56.3
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 13:13:56 -07:00
Larry Ruane f880f582a9 fail during startup if rpcpassword not specified 2023-10-26 14:47:24 -06:00
Larry Ruane f936ae8e61 add comments that GetTaddressTxids() returns transactions 2023-10-19 16:37:22 -06:00
Larry Ruane fb12fba802 update GetSubtreeRoots gRPC comment 2023-10-19 16:30:19 -06:00
dependabot[bot] 7555b494d3 Bump github.com/btcsuite/btcd from 0.23.1 to 0.23.2
Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd) from 0.23.1 to 0.23.2.
- [Release notes](https://github.com/btcsuite/btcd/releases)
- [Changelog](https://github.com/btcsuite/btcd/blob/master/CHANGES)
- [Commits](https://github.com/btcsuite/btcd/compare/v0.23.1...v0.23.2)

---
updated-dependencies:
- dependency-name: github.com/btcsuite/btcd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 16:25:12 -06:00
dependabot[bot] cd7c7143a1 Bump golang.org/x/net from 0.7.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.7.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.7.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 16:22:11 -06:00
Larry Ruane 8003d7fb6e darksidewallet: GetLightdInfo with no blocks shouldn't crash
Instead, return a reasonable error message. Issue #451.
2023-09-04 15:06:00 -06:00
Larry Ruane 853016bfd2 darkside GetLightdInfo: return fake build info
Instead of returning empty strings for `ZcashdBuild` and
`ZcashdSubversion`, return fixed "darksidewallet" strings.
2023-09-04 15:06:00 -06:00
Larry Ruane 7971992989 darkside GetTreeState gRPC: support block hash or height
In production mode, the `GetTreeState` gRPC supports block specification
by either height or block hash. But until now, darkside emulation only
supports height. This commit adds support for block hash.

It also allows entries to be deleted (darkside `RemoveTreeState`) by
block hash (not just height).
2023-09-04 14:22:44 -06:00
ebfull 2df6364979 Fix README's suggested zcashd configuration
`lightwalletd` needs to be enabled now, not `insightexplorer`.
2023-09-03 15:34:07 -06:00
Jack Grigg 8269810eee darkside: Store, track, and expose commitment tree sizes 2023-08-16 10:34:38 -06:00