Commit Graph
225 Commits
Author SHA1 Message Date
DanSandClaude Opus 4.8 cbda810849 frontend: guard nil Block in GetTransaction (empty TxFilter crash)
An empty TxFilter (Hash==nil, Block==nil) fell through to 'if txf.Block.Hash'
which dereferenced a nil Block and panicked the server (grpc-go v1.24.0 has no
handler recover) -- one unauthenticated request killed the process. Guard
txf.Block before dereferencing and return InvalidArgument for a request that
carries neither a txid nor a usable block filter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-30 10:39:41 -05:00
DanSandClaude Opus 4.8 6f52ff0969 frontend: harden the gRPC handlers against malformed and oversized requests
Three unauthenticated issues from a security review of the published
lightwalletd, all in frontend/service.go, now fixed and validated end to end
against a regtest dragonxd backend:

- GetBlockRange and GetAddressTxids dereferenced the request's range
  (Start/End) with no nil check, so one request with an empty BlockRange
  nil-panicked and, because grpc-go v1.24.0 does not recover handler panics,
  took the whole process down. Reject a missing range with InvalidArgument
  before touching it. (Verified: an empty-range request killed the old binary;
  the fixed binary answers InvalidArgument and stays up.)
- Neither method bounded the span, so one request could walk the entire
  uncached range -- one backend RPC per height. Reject end<start and cap the
  span at maxBlockRangeSpan (10000; honest syncs are far below it). (Verified:
  a 9,000,000-block span is now refused with InvalidArgument up front.)
- GetTransaction returned Internal ("Marshal called with nil") for a missing
  transaction: strconv.ParseInt overwrote err and both branches returned a
  typed nil. Parse into a separate variable and return a real status. The
  backend reports a missing tx as -5 ("No information available about
  transaction") and a not-yet-available height as -8; map both to NotFound,
  everything else to Internal with the backend message. (Verified: a bogus
  txid returned Internal before and returns NotFound after.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-29 01:10:25 -05:00
DanS ec1c479156 Increase block cache size to 400k for faster wallet sync
- Increase default cache-size from 40,000 to 400,000 blocks
- Add Python gRPC protobuf bindings for testing
2026-03-21 03:50:55 -05:00
DanS aae94a4f3c changes 2026-03-20 06:55:27 -05:00
DanS 3355c1ea85 stop server script 2026-03-20 06:26:15 -05:00
DanS ebc38c9369 Fix lightwalletd sync loop for DragonX wallet
- Handle missing Sapling upgrade in getblockchaininfo response by
  defaulting activation height to 1 (DragonX has Sapling active from
  genesis but uses NO_ACTIVATION_HEIGHT in chainparams)
- Override consensus branch ID to Sapling (76b809bb) when node reports
  Sprout (00000000) due to disabled activation heights
- Include full serialized block header in CompactBlock so the SDK can
  validate hashFinalSaplingRoot against the Sapling commitment tree
- Set CompactBlock ProtoVersion to 1
2026-03-20 06:24:54 -05:00
DanS f4ef38c42f fix sapling activation height and consensus branch id 2026-03-20 06:11:38 -05:00
dan-s daab197a01 update for dragonx binary changes, added monitor script 2026-03-04 15:28:02 -06:00
dan-s ef9b241cfd cleanup 2026-02-28 00:37:44 -06:00
Duke Leto 5bab463245 Use non-legacy conf file location 2022-11-20 17:25:33 +00:00
Duke Leto 24640b178e Update 'README.md' 2022-11-20 17:20:06 +00:00
Duke Leto 5b5533c890 Update 'README.md' 2022-10-31 13:07:18 +00:00
Duke Leto c9f6e7d7f3 Update 'README.md' 2022-10-31 13:06:25 +00:00
Duke Leto 6cc055b07f Merge pull request 'Add myself to authors' (#21) from dev into master
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/21
2021-10-29 02:43:10 +00:00
Duke Leto 8937561710 Add myself to authors 2021-10-28 22:42:37 -04:00
jahway603 0735c58b4c Merge pull request 'added AUTHORS file' (#20) from jahway into master
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/20
2021-10-28 03:34:44 +00:00
jahway603 1217bade73 Merge branch 'master' into jahway 2021-10-28 03:34:21 +00:00
jahway603 8881b6f1d6 added AUTHORS file 2021-10-27 23:33:19 -04:00
jahway603 3ef370621c Merge pull request 'new build scripts for ARM' (#19) from jahway into master
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/19
2021-10-25 22:22:51 +00:00
jahway603 0f20b1965c Merge branch 'master' into jahway 2021-10-25 22:22:41 +00:00
jahway603 cded0d4a37 fixed deb pkg script for ARM 2021-10-25 18:19:55 -04:00
jahway603 5418447897 arm build scripts 2021-10-25 17:26:17 -04:00
jahway603 b3fde64880 Merge pull request 'Version 0.1.1' (#17) from jahway into master
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/17
2021-10-25 17:44:36 +00:00
Duke Leto 74c6c68bbd Merge branch 'master' into jahway 2021-10-24 11:29:50 +00:00
jahway603 749f2ee743 new lightwalletd deb build script 2021-10-24 01:39:15 -04:00
jahway603 8fefcab08c added Makefile 2021-10-23 23:36:19 -04:00
jahway603 edac479e7d changed to variable 2021-10-21 16:07:14 -04:00
jahway603 57ea75af67 manually created manpage 2021-10-01 23:06:29 -04:00
jahway603 b33b4b476f working towards lightwalletd deb package 2021-09-29 02:04:48 -04:00
jahway603 4dd26ec92b minor update to build.sh 2021-09-29 00:50:38 -04:00
jahway603 158b5f6110 Merge pull request 'expanded documentation' (#15) from jahway into master
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/15
2021-08-09 04:55:12 +00:00
jahway603 8e70a758ae Merge pull request 'documentation updates' (#14) from jahway603/lightwalletd:master into jahway
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/14
2021-08-09 04:48:19 +00:00
jahway603 481b4a3556 Merge branch 'jahway' into master 2021-08-09 04:44:30 +00:00
jahway603 d1fdac026a minor update to table 2021-08-09 00:40:04 -04:00
jahway603 9416cc5af2 added CLI options to README 2021-08-09 00:38:12 -04:00
jahway603 916bb7e702 updated README 2021-08-09 00:13:19 -04:00
jahway603 d253ead042 Merge pull request 'added simple build script' (#13) from jahway603/lightwalletd:master into jahway
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/13
2021-08-08 05:10:51 +00:00
jahway603 6df1354f34 build script tweak 2021-08-08 01:08:11 -04:00
jahway603 26c33c0dee created simple build script 2021-08-08 00:57:39 -04:00
jahway603 779565d57e Merge pull request 'added correct LICENSE file' (#12) from jahway into master
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/12
2021-08-06 21:51:58 +00:00
jahway603 82a016dfef added correct LICENSE file 2021-08-06 17:50:48 -04:00
Duke Leto 01a2ac6daa Update 'README.md' 2021-08-04 18:23:04 +00:00
Duke Leto c7cd82204d Please never tell people to execute arbitrary data in Hush documentation! 2021-08-04 18:22:29 +00:00
oDinZu 74e0b871a5 Update 'README.md'
Install deps for cargo on VPS
2021-08-04 09:14:42 +00:00
Duke Leto ce670a1085 Merge pull request 'no sudo when run lightwalletd with NGINX' (#6) from onryo/lightwalletd:master into master
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/6
2021-02-11 23:05:37 +00:00
onryo 06ce8670b5 no sudo when run lightwalletd with NGINX
as Duke mentioned there is no need for sudo when using nginx, so let's remove sudo from the command to give users the best copy-paste experience ;)
2021-02-11 20:31:04 +00:00
Duke Leto 358c8b076b start.sh 2021-02-10 19:40:46 +00:00
jahway603andjahway603 f4b927c0a6 Updated documentation with both methods of running lightwalletd (#3)
minor markdown edits

minor markdown edits

minor change to sdl-cli section

minor markdown edit

minor markdown edit

documented both methods of running lightwalletd

Co-authored-by: jahway603 <jahway603@protonmail.com>
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/3
Co-Authored-By: jahway603 <jahway603@noreply.git.hush.is>
Co-Committed-By: jahway603 <jahway603@noreply.git.hush.is>
2020-12-05 06:06:48 +00:00
jahway603 118c47e960 changed to gitea links in README.md
manually added @gilardh's changes
2020-11-29 00:54:48 +00:00
jahway603 dbcebacc51 Merge pull request 'changed DenioD's github lightwalletd links to git.hush.is lightwalletd links' (#2) from jahway603/lightwalletd:master into master
Reviewed-on: https://git.hush.is/hush/lightwalletd/pulls/2
2020-11-28 03:41:47 +00:00