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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.