Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

enforce a swap-only network #1917

Open
ralph-pichler opened this issue Oct 29, 2019 · 4 comments · May be fixed by #2142
Open

enforce a swap-only network #1917

ralph-pichler opened this issue Oct 29, 2019 · 4 comments · May be fixed by #2142

Comments

@ralph-pichler
Copy link
Member

Currently a non-swap-enabled Peer can connect to other protocols like retrieval on a swap-enabled Peer. The accounting hook will cause an error when a message is sent from the swap-enabled peer blocking the send but not disconnecting the peer. This will cause most retrieve requests to always fail if there is a non-swap Peer connected on retrieval (this was encountered during devcon when nodes connected to nodes from the previous (non-swap) workshop).

Ideally a swap-enabled Peer would only connect to other swap-enabled Peers on all (or at least on all accounted) protocols.

@Eknir
Copy link
Contributor

Eknir commented Feb 6, 2020

[User Story]
Rationale
Currently, a non-swap-enabled Peer can connect to other protocols like retrieval on a swap-enabled Peer. The accounting hook will cause an error when a message is sent from the swap-enabled peer blocking the send but not disconnecting the peer. This will cause most retrieve requests to always fail if there is a non-swap Peer connected on retrieval (this was encountered during Devcon when nodes connected to nodes from the previous (non-swap) workshop).

User story
As a swap-enabled peer, I don't want to be connected to non-swap enabled peers, such that interactions with accounted protocols don't fail

Acceptance Criteria
It is impossible for a swap-enabled node to be connected to a non-swap enabled node

@Eknir
Copy link
Contributor

Eknir commented Feb 6, 2020

Related to #2068 . Might already be solved by making all BZZ Network ID's <= 100 to be non-swap and all BZZ Network IDs > 100 to be swap-enabled

@ralph-pichler
Copy link
Member Author

i don't think its possible to do a clean implementation of this with the current stack. For now we should just drop in the accounting hook if the other peer is not registered on swap. Maybe we can do this properly when we move to the new bee stack.

@mortelli
Copy link
Contributor

i don't think its possible to do a clean implementation of this with the current stack. For now we should just drop in the accounting hook if the other peer is not registered on swap. Maybe we can do this properly when we move to the new bee stack.

implemented in #2142

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants