BlockchainCommons / BlockchainCommons/seedtool-cli-rust

Seedtool Needs to Deal with Unknown Data

Open
#9 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
11
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Seedtool needs to have a methodology for dealing with unknown data in Envelopes of seeds it imports.

For example:
```
% envelope format ur:envelope/lrtpcsgdhkwzdtfthptokigtvwnnjsqzcxknsktdoyadcsspoycfadzttpcstantjyoeadisktjojeisdefzdydtaolytantjloxaxhdclaxvlcprfttldjobkredtlnhsidwybaeyjtswyandlgjnehtkdsidbkqzsrkphyfhsaaahdcxhnfgnepefxgdytryckticelyotsstoknfntavevaskiddmolsarntykbrybtjpksamtantjooeadlncsghykaeykaeykaocyhngrmuwzaycyzssajpsnoybdtpcskpfyhsjpjecxgdkpjpjojzihcxgdihiajecxhfinhsjztkwewyfn
Bytes(16) [
'isA': 'Seed'
'508': output-descriptor(Map)
'hasName': "Dark Purple Peck Vial"
]
```
Currently if you import this into Seedtool and reexport it, the output-descriptor is silently dropped.
```
% seedtool -i envelope ur:envelope/lrtpcsgdhkwzdtfthptokigtvwnnjsqzcxknsktdoyadcsspoycfadzttpcstantjyoeadisktjojeisdefzdydtaolytantjloxaxhdclaxvlcprfttldjobkredtlnhsidwybaeyjtswyandlgjnehtkdsidbkqzsrkphyfhsaaahdcxhnfgnepefxgdytryckticelyotsstoknfntavevaskiddmolsarntykbrybtjpksamtantjooeadlncsghykaeykaeykaocyhngrmuwzaycyzssajpsnoybdtpcskpfyhsjpjecxgdkpjpjojzihcxgdihiajecxhfinhsjztkwewyfn -o envelope | envelope format
Bytes(16) [
'isA': 'Seed'
'hasName': "Dark Purple Peck Vial"
]
```
Options for dealing with this:

1. Silently drop it [current]
2. Drop it with a *WARNING*
3. Silently carry it over
4. Carry it over with a *WARNING*
5. Drop it, but offer an additional Envelope containing only the dropped data.

...

There are potentially three categories of data here, with the possibility to deal with them differently.

A. Known data types (like output-descriptor)
B. Unknown data types
C. Attachments

Contributor guide

Open the contributing guide

Research direction

Reproduce the documented seedtool envelope import/export command and compare the imported output with the original envelope. Trace the envelope handling entry points, then resolve the intended behavior for known data types, unknown data types, and attachments; done requires an agreed policy and behavior that no longer silently loses the output-descriptor data.

Written by the indexing model from the issue text.

Assessment

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