Skip to content
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

propose HIPE: protocols explainer #69

Closed
wants to merge 61 commits into from

Conversation

dhh1128
Copy link
Contributor

@dhh1128 dhh1128 commented Dec 12, 2018

No description provided.

Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
The state of the game at any given point of time is fully captured by
the moves, regardless of the order in which they were made.

If a player makes an illegal move or another error occurs, the other
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think (not certain) it would be more useful in the tic-tac-toe example to use an explicit message family error message ("cheater!!") rather than problem-report, and thus might not be the best example for the use of problem-report. Obviously not a big deal, but might be worth calling out the pros and cons.

It's interesting in that it kind of depends on the structure of the agent and it's handling of thread state vs. message type in the dispatching of messages. I'm not sure as I type this if there is, or if there should b,e guidance on that in the thread HIPE.

Hope that makes sense...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to have a deeper conversation about specific messages versus generic ones. Let's do that offline, and report the outcome here.

[ai.py](ai.py), and a set of unit tests that prove correctness (see
[test_tictactoe.py](test_tictactoe.py).

The game can be played interactively by running `python game.py`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great HIPE - I really like it.

Are we nearing the point where the Message Family specification DID can be published on a ledger with an endpoint and this message family's spec published? Put another way - is the HIPE the message family spec, or will it/should it eventually be published elsewhere in some other format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message family spec DID can be published any time. I guess I'll add that to my to-do list and see if we can get it taken care of. I've kind of held off because as soon as I do, the question of who holds the keys to the DID becomes more important. Any thoughts about that? Like, maybe all the maintainers of the HIPE repo hold the keys, or shamir secret sharing of maintainers, or something?

As soon as we have a DID Doc that defines a service endpoint for these message families, we need a place to host the service endpoint. Any ideas for that?

I guess we need to start working on a message family HIPE. Maybe the one I started on protocols needs to roll into it...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need instructions about how to register a DID on the ledger and update it, to allow anybody to create their own message families.

I'm wondering if we have a special location of the HIPE repo that serves as hosting for indy related message families. We use github directly, or indirectly through an automated publishing script, to serve the necessary pages.

Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
@dhh1128 dhh1128 changed the title propose HIPE: tic-tac-toe protocol as an example of how to define message families (hold) HIPE: tic-tac-toe protocol as an example of how to define message families Dec 20, 2018
The states of each `player` in the protocol evolve according to the
following state machine:

![state machine](state-machine.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like typo in the state machine image. On state my move, when send move event occurs, it says "transition to my move or wrap up". I suppose this should be "transition to their move or wrap up"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Patrik-Stas Thanks for the catch. Now fixed.

Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
@dhh1128 dhh1128 changed the title (hold) HIPE: tic-tac-toe protocol as an example of how to define message families propose HIPE: how to define protocols Dec 29, 2018
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
@dhh1128
Copy link
Contributor Author

dhh1128 commented Dec 29, 2018

I have revised this HIPE significantly. The content about Tic Tac Toe is mostly unmodified, but there is now a main README that discusses what protocols are and how they should be defined and documented by a HIPE. The Tic Tac Toe HIPE is then presented as a hyperlinked example.

Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
dhh1128 and others added 2 commits December 28, 2018 22:01
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Sam Curren <telegramsam@gmail.com>
and the protocol's minor version gets updated. If the usage of the new
feature is required, then [the protocol's major version gets updated](
https://semver.org/#spec-item-8).
Any change in the expectations of a message family, even if no message attributes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TelegramSam : this is the only change in this commit that I don't feel comfortable with. I think your phrase "change in expectations" is not quite clear enough. When party A talks protocol version 1, and party B talks protocol version 2, they should not expect to be interoperable; the different major numbers advertises incompatibility. However, if it's A=1.3 and B=1.5, then they should expect interoperability except on some optional features that B apparently knows about but A does not.

So here's the way I'd state it: minor numbers in a protocol introduce features that are optional, such that the later version could be interoperable with an earlier version having the same major number, as long as the functionality used between the two parties is gracefully degraded. On the other hand, major versions say that no interoperability should be assumed.

Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
dhh1128 and others added 20 commits April 5, 2019 20:53
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Devin Fisher <devin.fisher@evernym.com>
@dhh1128 dhh1128 force-pushed the tictactoe-protocol branch from 1693dc2 to f075813 Compare May 15, 2019 18:39
dhh1128 added 6 commits May 15, 2019 14:48
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
Signed-off-by: Daniel Hardman <daniel.hardman@gmail.com>
@dhh1128
Copy link
Contributor Author

dhh1128 commented May 21, 2019

This HIPE has been converted to an Aries RFC. See https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0003-protocols/README.md.

@dhh1128 dhh1128 closed this May 21, 2019
@dhh1128 dhh1128 deleted the tictactoe-protocol branch May 21, 2019 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants