-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
name changes to types/format #12
Conversation
Some suggestions that would be good to take into consideration before merging this. |
README.md
Outdated
|:-----------:| ------------------ | | ||
| 0 | feed | | ||
| 1 | msg | | ||
| 2 | blob | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to preserve what was before, i.e. uppercase. Otherwise it feels like it's undoing what I did here 11f7d16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the principle of keeping the string the new ad the steering names in the bfe.json
So that people using NAMED_TYPES can just look at this table and type it without having to guess the case, spaces, hyphens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that people using NAMED_TYPES can just look at this table and type it without having to guess the case, spaces, hyphens
There is bfe.json for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm i at what you mean. I think i was being paranoid expecting people to get confused. But if you think it's fine I'm happy for readme to be more human descriptive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you know what? We could have a third column that reflects the name used in bfe.json
README.md
Outdated
|-----------|-------------|-------------|-------------|-----------------| | ||
| 5 | 0 | Arbitrary | box | [private box] | | ||
|:---------:|:-----------:|-------------|-------------|-----------------| | ||
| 5 | 0 | Arbitrary | box1 | [private box] | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one still confuses me, which one is it, box1 or box? I honestly don't know. I know that once code broke everywhere because we were using box1
and it had to be box
. But I think (??) ssb-tribes uses box1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ssb tribes uses box2
The original is box, but since the advent of box2 we talked about box saying "box1"... but the suffix is the OG box
At least I think that's how it went down
README.md
Outdated
| 6 | 2 | 0 bytes | Nil | [null pointer] | | ||
| 6 | 3 | Arbitrary | Arbitrary bytes | N/A | | ||
|:---------:|:-----------:|-------------|-------------|-------------------------------| | ||
| 6 | 0 | Arbitrary | string-UTF8 | [UTF8] | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would appreciate if this is reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please respond to my values /proposals
Specifically, I don't want spaces in the name because it makes uris have to have some rule for dealing with them (or you could propose one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The response to values/proposals is that this markdown document is for humans to read, so let's use formal English, while the json is for computers to parse. In the markdown we should be trying to explain to people what this is, and this table doesn't look like it's explaining, looks like it's stating raw data.
As for URIs, we're not going to have SSB URIs for these Generic data formats, so I don't understand what's the need for the hyphen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree about ssb uri for generic types. I reckon that can be reverted happily then
bfe.json
Outdated
] | ||
}, | ||
{ | ||
"code": 3, | ||
"type": "diffie-hellman", | ||
"type": "key", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "encryption key" (was that what we agreed on in the meeting? I don't accurately remember)? "key" is a very generic word.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct but in the types key is only ever going to mean a key for unlocking.
See also "no spaces / short words for ssb uri"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR then automatically means you're proposing the SSB URI ssb:keys/box2-dm-dh/
and I believe ssb:keys/
is going to confuse a lot of people on what it means (given the existence of ssb-keys
). Why not ssb:encryption-keys/box2-dm-dh
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly because it's hella long, and I wasn't to save my bytes!
I'm up for something different to reduce confusion. Couldn't think of anything right though. Maybe emoji? Joking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not prohibitively long. Remember SSB URIs are for human readability (while still computer parse-able), and we have other long SSB URIs such as ssb:experimental?action=claim-http-invite&.....
I think most of my inline reviews are related to this. I don't like the idea of using same terms in README and bfe.json. The former is clearly documentation meant for humans to read (what if people don't know that "msg" refers to "message"?) while the latter is a programmatic helper, meant for computers to parse. Different purposes. Otherwise soon we're at the point where ssb-bfe would import literally README.md and parse it. |
With this PR I would like us all to own it I took what I remembered, and integrated what I think will be good, making in mind plans to build ssb uris with this code. Keen to figure out if that's what we all want, and if so how best to do it. This is just a starting point I threw down |
add identity type, with po-box format
add pobox diffie-hellman key type
Co-authored-by: André Staltz <andre@staltz.com>
Hold on, I'll make a small PR targeting this |
This is now turning into a mega branch. What do we want to do before merging? |
new column in readme.md tables, for bfe.json parity
@staltz I've made that change from key > encryption-key, and merge squashed this. Thanks for the collaboration on this. I noticed that this is a kinda unique thing in SSB - it's very rare that we force ourselves to commit to a shared specification (though I wish we did this more in some cases!) |
context
on an @arj03 @mixmix @keks call discussing proposed changes with POBox, we got stuck into asking "what is a type, what is a format".
I think we arrived at an idea like:
we also realised that some type/formats are locked in by use, but the naming of it is still flexible. This means that e.g. type 3, format 0, which was "diffie-hellman, ed25519" is being proposed to rename to "key, box2-dh".
This reflects the realisation that "diffie-hellman" is waaaay too vague and what we actually want to be able to talk about are encryption keys, and which exact recipes (format) they were used in
naming of fields
so naming is going to change some because we've realised some of the types/ formats were not tight enough.
I am also interested in changing names so that we can easily use names programatically when importing
bfe.json
.Use cases:
bfe.json
inssb-bfe
and we have functions which depend on the type/format string namesbfe.json
definition to generate SSB-URIs for some types.proposals
README.md
as inbfe.json
msg
we usemsg
in the docs/
or\s
in themtype.type
into `type.textHandle" and "type.description"This PR executes these proposals to show more explicitly what I mean