mirror of
https://github.com/vacp2p/rfc.git
synced 2025-02-11 06:26:31 +00:00
27ee0f0558
* Hugo init * Init Hugo book * Add basic README and title * Import RFC: 1/COSS * Move example content to dedicated folder * Basic menu * Tweak single layout * Fix base url and permalink * Basic index tweaks * Add netifly config * gitignore * 1/COSS: Add COSS lifecycle * Remove public artifact * Add basic numbers in menu * Empty READMEs init * Import mvds spec raw * 2/MVDS: Simplify * 3/REMOTE-LOG: Import * 3/REMOTE-LOG: Simplify * 4/MVDS-META: Import * 4/MVDS-META Simplify * Tweaks * 5/WAKU0: Import * 5: Simplify * 6/WAKU1: Import * 6/WAKU1: Simplify * 7/WAKU-DATA: Import * 7/WAKU-DATA: Simplify * 8/WAKU-MAIL: Import * 8/WAKU-MAIL: Simplify * Tweak * 9/WAKU-RPC: Import * 9/WAKU-RPC: Simplify * 10/WAKU2: Import * 10/WAKU2: Simplify * 11/WAKU-RELAY: Import * Tweaks * 11/WAKU-RELAY: Simplify * 12/WAKU-FILTER: Import * 12/WAKU2-FILTER: Simplify * 13/WAKU-STORE: Import * 13/WAKU-STORE: Simplify * 14/WAKU-MESSAGE: Import * 14/WAKU-MESSAGE: Simplify * 15/WAKU-BRIDGE: Import * 15: Simplify * 16: Import * 16: Simplify * 17: Import * 17: Simplify * 18: Import * 18: Simplify * 12: Bump update * 14: Bump update * 11: Bump update * 17: Bump update * 18: Bump update * 16: Bump update * Fix slug for 18 * Editor changes for 11, 12, 15 * Revert "Editor changes for 11, 12, 15" This reverts commit 5c32fe791bec57ca1d5326e0d2724339f12a784a. * Revert "Revert "Editor changes for 11, 12, 15"" This reverts commit ccd75131d72a1f1c43b701f445fe66ebd6857fc4. * Editor changes for 13, 2, 4 * Move current specs to archive * Update README * bump
67 lines
2.5 KiB
Markdown
67 lines
2.5 KiB
Markdown
---
|
|
slug: 15
|
|
title: 15/WAKU-BRIDGE
|
|
name: Waku Bridge
|
|
status: raw
|
|
editor: Hanno Cornelius <hanno@status.im>
|
|
---
|
|
|
|
A bridge between Waku v1 and Waku v2.
|
|
|
|
# Bridge
|
|
|
|
A bridge requires supporting both Waku versions:
|
|
|
|
* Waku v1 - using devp2p RLPx protocol
|
|
* Waku v2 - using libp2p protocols
|
|
|
|
Packets received on the Waku v1 network SHOULD be published just once on the
|
|
Waku v2 network. More specifically, the bridge SHOULD publish
|
|
this through the Waku Relay (PubSub domain).
|
|
|
|
Publishing such packet will require the creation of a new `Message` with a
|
|
new `WakuMessage` as data field. The `data` and `topic` field from the Waku v1
|
|
`Envelope` MUST be copied to the `payload` and `contentTopic` fields of the
|
|
`WakuMessage`. Other fields such as nonce, expiry and ttl will be dropped as
|
|
they become obsolete in Waku v2.
|
|
|
|
Before this is done, the usual envelope verification still applies:
|
|
|
|
* Expiry & future time verification
|
|
* PoW verification
|
|
* Size verification
|
|
|
|
Bridging SHOULD occur through the `WakuRelay`, but it MAY also be done on other Waku
|
|
v2 protocols (e.g. `WakuFilter`). The latter is however not advised as it will
|
|
increase the complexity of the bridge and because of the
|
|
[Security Considerations](#security-considerations) explained further below.
|
|
|
|
Packets received on the Waku v2 network SHOULD be posted just once on the Waku
|
|
v1 network. The Waku v2 `WakuMessage` contains only the `payload` and
|
|
`contentTopic` fields. The bridge MUST create a new Waku v1 `Envelope` and
|
|
copy over the `payload` and `contentFilter` fields to the `data` and `topic`
|
|
fields. Next, before posting on the network, the bridge MUST set a new expiry
|
|
and ttl and do the PoW nonce calculation.
|
|
|
|
### Security Considerations
|
|
As mentioned above, a bridge will be posting new Waku v1 envelopes, which
|
|
requires doing the PoW nonce calculation.
|
|
|
|
This could be a DoS attack vector, as the PoW calculation will make it more
|
|
expensive to post the message compared to the original publishing on the Waku v2
|
|
network. Low PoW setting will lower this problem, but it is likely that it is
|
|
still more expensive.
|
|
|
|
For this reason, bridges SHOULD probably be run independently of other nodes, so
|
|
that a bridge that gets overwhelmed does not disrupt regular Waku v2 to v2
|
|
traffic.
|
|
|
|
Bridging functionality SHOULD also be carefully implemented so that messages do
|
|
not bounce back and forth between the two networks. The bridge SHOULD properly
|
|
track messages with a seen filter so that no amplification can be achieved here.
|
|
|
|
# Copyright
|
|
|
|
Copyright and related rights waived via
|
|
[CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|