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

[RFC] Feat: Making mini protocol components server/client aware #64

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nemo83
Copy link
Contributor

@nemo83 nemo83 commented Apr 5, 2024

Cardano mini protocol is a state machine. Server and client move throughout the state machine at the same time, but just either one of them, and in final states none of them, is supposed to send messages. This is called agency.

Agency depends on state and whether the we are on the client or the server.

In Yaci, the state has been cleverly wrapped in enums, that by design are enumeration. In order to implement the isAgency we need to enhance that method with a parameter that tells whether we are on the client or server side.

Agents will be initialised w/ the isClient property and pass it to State enumeration to properly calculate agency.

This PR represents a Request For Comments where to discuss, accept or push back about the suggested design.

The code is not complete but gives an idea on the implementation.

Copy link

sonarcloud bot commented Oct 14, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
22.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

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.

1 participant