Skip to content

Commit

Permalink
Add gossipsub message validation (#694)
Browse files Browse the repository at this point in the history
* remove loop from next_event

* initial work

* more work

* trying to use an alternative approach to message id cache

* quick break

* fix sized issue

* finalize gossipsub validation

* remove unused

* update fast_gossip_message_id

* check MessageId calculation

* cleanup network orchestrator

* move types to p2p for reuse

* add consensus gossip data instead

* add serde only feature

* update with suggestions

* remove unused

* use gossipsub_config

* hash complete messages

* use gossipsub config and its builder

* import serde only as feature

* use test-helpers from fuel-core-interfaces

* to the right place in toml

Co-authored-by: Brandon Kite <brandonkite92@gmail.com>
  • Loading branch information
2 people authored and MujkicA committed Oct 26, 2022
1 parent 70699fc commit b67af33
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fuel-p2p/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -850,12 +850,8 @@ mod tests {
},
node_b_event = node_b.next_event() => {
// 2. Node B receives the RequestMessage from Node A initiated by the NetworkOrchestrator
if let FuelP2PEvent::RequestMessage{ request_id, .. } = node_b_event {
let block = FuelBlock::new(
PartialFuelBlockHeader::default(),
vec![Transaction::default(), Transaction::default(), Transaction::default(), Transaction::default(), Transaction::default()],
&[]
);
if let Some(FuelP2PEvent::RequestMessage{ request_id, .. }) = node_b_event {
let block = FuelBlock::new(PartialFuelBlockHeader::default(), vec![Transaction::default(), Transaction::default(), Transaction::default(), Transaction::default(), Transaction::default()], &[]);

let sealed_block = SealedFuelBlock {
block,
Expand Down

0 comments on commit b67af33

Please sign in to comment.