lightninglabs / lightninglabs/taproot-assets

Audit RPC enum handling

Open
#565 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

audit
Dominant language
Go
Stars
525
Forks
150
Avg merge
2d 15h
Merged PRs (30d)
31

Description

Spinoff of https://github.com/lightninglabs/taproot-assets/pull/557. IIUC the generated type for RPC enums is `int32`, but we usually want those to be uints, possibly of a smaller size.

Handling these correctly would involve rejecting negative values or those larger than the target type. Feels like we could do this with generics and comparing the RPC type and target type.

We may have a similar issue with non-enums but this is an obvious starting point.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the generated RPC enum type and the related work in pull request 557. Trace how enum values are converted to target types, then define completion as rejecting negative or out-of-range values while preserving valid conversions; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.