heGraph intends to use Waku for the Graphcast. Details here: GRC-001: Graphcast - a Gossip Network for Indexers - Graph Request for Comment (GRC) - The Graph
Several requirements have been identified from their use case. We will discuss the requirements and possible solutions here.
Original document: ipfs gateway.
Replay Attack Protection
Attack Scenarios
Bob repeats transmission:
- Alice sends message
M
- Bob saves
M
, forward it as part of Waku Relay protocol - Bob re-sends
M
at a later time
Bob delays transmission:
- Alice sends message
M
- Bob saves
M
, does not forward it (delays message, possible sibyl attack in progress) - Bob sennds
M
at a later time.
Proposed Design
a. M
’s timestamp is checked and drop if too old
b. block hash is included in M
, block hash existence is verified (Ethereum mainnet).
Remarks
- Can you please clarify the context of the replay attack and the difference with past message injection? It is difficult to setup a replay attack countermeasure when the nature of the message is not defined (ie, login, asset transfer, etc). Are the scenarios describe above correct?
- In the proposed design, no correlation is made between the timestamp of the message and the block hash. Is the intent for the message timestamp to be equal to the block’s timestamp?
- Note that the reference implementation of Waku Store (nwaku) drops messages that are older than 20s (but I believe it is not your intent to use Waku Store).
Past Message Injection
Attack Scenarios
- Alice sends message
M1
- Bob saves
M1
- Carole joins network
- Alice sends message
M2
- Bob transmits
M1
to Carole - Carole thinks
M1
is the latest message from Alice
Proposed Design
Include a nonce to the messages.
Remarks
- The Waku Store protocol enables node to retrieve cached messages from services nodes. This could assist with herd immunity has Carole could retrieve the most recent messages from another node when joining the network
- Are you able to describe the nature of the messages being sent? Could the timestamp be used as a nonce (if signed by the sender).
Validate Message Sender
Design Requirement
Only accept/forward messages from a pre-defined list of senders.
In this context, senders must:
- have a
graphAccount
- have a stake greater than
minStake
Remarks
- We have recently started to work on a way for application to design their validation logic: Application Defined Message Validation · Issue #141 · vacp2p/research · GitHub
- If privacy is preferred, then it may make sense to enable senders to join an on chain zk group if they match the given requirements and have Waku use the zk group as a sender validation reference, similar to/using RLN.