trailofbits / trailofbits/decree

Generated `Inscribe` mark isn't very unique

Open
#5 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
12
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Struct names clash in Rust easily and idiomatically, which might cause issues -- e.g. there are approximately a billion types called PublicKey.

I'm not sure the best way to get a unique name for a given struct -- I don't know an easy way to get a "fully-qualified" version of struct names that would include crate/namespace info, but that would be ideal.

This seems like something that other people would have run into before, and Rust's macro/type magic should be able to handle it. https://docs.rs/mononym/latest/mononym/ seems like it might be promising? But I'm not sure if it actually addresses what we need here.

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 tracing how the generated Inscribe mark is produced and review Rust's macro and type-name capabilities for obtaining crate or namespace information. Compare the linked mononym approach with the uniqueness needed here; done means distinct structs with common names no longer produce conflicting marks.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography
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.