Conversation
autonat/autonat-v2.md
Outdated
| } | ||
|
|
||
| message DialDataResponse { | ||
| bool accepted = 1; |
There was a problem hiding this comment.
Why not put the bytes into this protobuf? Then we wouldn't need to break the framing to send these bytes.
There was a problem hiding this comment.
That would require memory of the order of 100kb for the protobufs on both ends, right?
The current version can be implemented using a smaller buffer.
I don't have good intuition here, do you think this is fine?
There was a problem hiding this comment.
The server is going to discard these bytes right away anyways. No point to allocate the space to put the bytes in the message. I agree with the initial design. (Sorry for the drive-by comment, I'll defer to whatever you all decide).
autonat/autonat-v2.md
Outdated
| one can not validate the IP address of the requesting node. | ||
| Upon receiving a `DialDataRequest` message the client responds with | ||
| `DialDataResponse` message with a boolean `accepted` indicating if it accepted | ||
| the request. If `accepted` is `false`, the `DialRequest` is considered complete |
There was a problem hiding this comment.
The client could also just reset the stream if it doesn't want to send that many bytes.
There was a problem hiding this comment.
I am accepting this. This looks simpler to me. Even if we add a different cost for dial in future, say some POW like mechanism, the client can just reject the charge by resetting the stream.
marten-seemann
left a comment
There was a problem hiding this comment.
LGTM.
Nit: I think it's spelled IP and not ip.
oops, thanks! |
Closes #536