Skip to content

Conversation

@Gau-thier
Copy link
Collaborator

No description provided.

@Gau-thier Gau-thier force-pushed the feat/dekuIntegrationFinalAct branch from 88bbdd9 to 28aaf63 Compare July 5, 2022 07:22
@Gau-thier Gau-thier changed the title WIP Re-add deku needs Re-add deku needs Jul 5, 2022
Copy link
Contributor

@rosalogia rosalogia left a comment

Choose a reason for hiding this comment

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

I think payload_signature should be an optional arg, otherwise looks good 👍

disseminated across the network.
4. Wait 0.001 seconds before restarting the procedure. *)
let rec run node preprocessor msg_handler =
let rec run node preprocessor (msg_handler: Message.t -> bytes option * bytes option ) =
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be (bytes * bytes option) option? Since you can't have a payload_signature without a payload?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Making msg_handler: Message.t -> bytes * bytes option will force the client to send a response to every received message, which is not wanted.
@AngryStitch am I right?

Choose a reason for hiding this comment

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

Shouldn't it be msg_handler: Message.t -> (bytes * bytes) option because if you have a payload, you have a signature but sometimes you don't do anything with a message (like, it's an ACK)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On a Deku POV, "if you have a payload you have a message" but not on a Pollinate side.
Failure_detector is sending payload message, without signature.
Maybe we should propose to add a function to sign them, to make sure the node sending is the real node, or is it overkilled? @rosalogia, what is your opinion?

@Gau-thier Gau-thier force-pushed the feat/dekuIntegrationFinalAct branch from 90c2c93 to 7068755 Compare July 6, 2022 08:24
@Gau-thier Gau-thier force-pushed the feat/dekuIntegrationFinalAct branch from 1476ea2 to 08a6418 Compare July 6, 2022 08:48
@Gau-thier Gau-thier requested a review from rosalogia July 6, 2022 10:09
@Gau-thier Gau-thier force-pushed the feat/dekuIntegrationFinalAct branch from af88cc1 to 5c2f49e Compare July 6, 2022 21:04
@Gau-thier Gau-thier force-pushed the feat/dekuIntegrationFinalAct branch from 1872f7b to 0c34e8d Compare July 7, 2022 10:02
@Gau-thier Gau-thier requested a review from rosalogia July 7, 2022 13:09
| Some response ->
response
|> Client.create_response node message
| Some msg ->
Copy link
Contributor

Choose a reason for hiding this comment

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

We can destructure here (just a matter of syntax); up to you

| Some Message.{ data ; signature = payload_signature }
  Client.create_response node message ?payload_signature data

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice one, totally missed it. Done.

|> String.to_bytes
|> Client.create_post node in
|> String.to_bytes in
let message = Client.create_post node payload in
Copy link
Contributor

Choose a reason for hiding this comment

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

I will always advocate for long pipelines, but ultimately doesn't matter 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am still not fond of long pipelines, I will let as it is right now 😉

@Gau-thier Gau-thier force-pushed the feat/dekuIntegrationFinalAct branch from c4e8c63 to 17848cf Compare July 8, 2022 13:29
@Gau-thier Gau-thier force-pushed the feat/dekuIntegrationFinalAct branch from eacbce7 to e3e337d Compare July 8, 2022 13:35
@rosalogia
Copy link
Contributor

Forgot to bring this up in review: what is the purpose of sub-category? Why is it not just encoded in the payload? If we want a general purpose way to allow users to include their own metadata/header data in messages, we can do that, but this feels oddly specific for no particular reason. It is always possible for the consumer to design their payloads to include any kind of labels necessary on their end. If we want to do pollinate-side metadata for consumer use, I'd say add a field called "headers" to Message.t whose type is (string * string) list. Thoughts @gsebil08?

@Gau-thier Gau-thier requested a review from rosalogia July 11, 2022 09:24
@Gau-thier
Copy link
Collaborator Author

Forgot to bring this up in review: what is the purpose of sub-category? Why is it not just encoded in the payload? If we want a general purpose way to allow users to include their own metadata/header data in messages, we can do that, but this feels oddly specific for no particular reason. It is always possible for the consumer to design their payloads to include any kind of labels necessary on their end. If we want to do pollinate-side metadata for consumer use, I'd say add a field called "headers" to Message.t whose type is (string * string) list. Thoughts @gsebil08?

That is a great remark!
It totally makes sens. I just implemented it! Thanks!

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