Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
31cb1ad
feat bitfield distribution
drahnr Jul 7, 2020
ddb6228
feat bitfield distribution part 2
drahnr Jul 7, 2020
6ac2c62
pair programming with rustc & cargo
drahnr Jul 7, 2020
4b100df
lets go
drahnr Jul 7, 2020
a3bd8c0
move bitfield-distribution to the node/network folder
drahnr Jul 8, 2020
7909d47
shape shifting
drahnr Jul 8, 2020
e3c8248
lunchtime
drahnr Jul 8, 2020
86f4fdb
ignore the two fn recursion for now
drahnr Jul 8, 2020
3cf0878
step by step
drahnr Jul 9, 2020
6a6d7bc
triplesteps
drahnr Jul 9, 2020
1aa1842
bandaid commit
drahnr Jul 10, 2020
ad0555b
unordered futures magic
drahnr Jul 10, 2020
7966769
chore
drahnr Jul 10, 2020
e8c901a
reword markdown
drahnr Jul 10, 2020
e33dafe
clarify
drahnr Jul 10, 2020
6594dee
lacks abortable processing impl details
drahnr Jul 14, 2020
4c6f9b4
slimify
drahnr Jul 14, 2020
af2849b
fix: warnings and avoid ctx.clone() improve comments
drahnr Jul 15, 2020
977102b
review comments
drahnr Jul 20, 2020
92431f3
fix details
drahnr Jul 20, 2020
23c050e
make sure outgoing messages are tracked
drahnr Jul 20, 2020
a431601
fix name
drahnr Jul 20, 2020
a5077ee
Merge remote-tracking branch 'origin/master' into bernhard-bitfield-d…
drahnr Jul 20, 2020
be2533e
fix subsystem
drahnr Jul 20, 2020
64b6ec1
partial test impl
drahnr Jul 20, 2020
52d9800
relax context bounds
drahnr Jul 21, 2020
df8fe1d
test
drahnr Jul 21, 2020
38661f7
X
drahnr Jul 21, 2020
f1f7cab
X
drahnr Jul 21, 2020
f94b8c5
initial test
drahnr Jul 21, 2020
7a4bd5e
fix relay_message not tracked when origin is self
drahnr Jul 21, 2020
b299ad3
fix/guide: grammar
drahnr Jul 21, 2020
09766c1
work around missing Eq+PartialEq
drahnr Jul 21, 2020
df7a6f0
fix: add missing message to provisioner
drahnr Jul 21, 2020
2398681
unify per_job to job_data
drahnr Jul 21, 2020
8ed8aba
fix/review: part one
drahnr Jul 22, 2020
65e8edb
fix/review: more grumbles
drahnr Jul 22, 2020
087784a
fix/review: track incoming messages per peer
drahnr Jul 22, 2020
d91bcbd
fix/review: extract fn, avoid nested matches
drahnr Jul 22, 2020
c957bf9
fix/review: more tests, simplify test
drahnr Jul 22, 2020
36a6672
fix/review: extend tests to cover more cases
drahnr Jul 22, 2020
5b7c963
chore/rename: Tracker -> ProtocolState
drahnr Jul 22, 2020
794c6c3
chore check and comment rewording
drahnr Jul 22, 2020
f3a718e
feat test: invalid peer message
drahnr Jul 22, 2020
e33e943
remove ignored test cases and unused macros
drahnr Jul 22, 2020
b8d3941
Merge remote-tracking branch 'origin/master' into bernhard-bitfield-d…
drahnr Jul 23, 2020
99f574e
fix master merge fallout + warnings
drahnr Jul 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add missing message to provisioner
  • Loading branch information
drahnr committed Jul 21, 2020
commit df7a6f004b8644fdb04742cc79077f1b3d3a36d0
18 changes: 16 additions & 2 deletions node/network/bitfield-distribution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ where
.await
}

/// Distribute a given valid bitfield message.
/// Distribute a given valid and signature checked bitfield message.
///
/// Can be originated by another subsystem or received via network from another peer.
async fn relay_message<Context>(
Expand All @@ -234,6 +234,19 @@ async fn relay_message<Context>(
where
Context: SubsystemContext<Message = BitfieldDistributionMessage>,
{

// notify the overseer about a new and valid signed bitfield
ctx.send_message(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be better done elsewhere. I would recommend calling it at the end of the message-acceptance routine, which likely invokes this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two locations where relay_message is called, as such it seems logical to me to group them to avoid code duplication.

AllMessages::Provisioner(
ProvisionerMessage::ProvisionableData(
ProvisionableData::Bitfield(
message.relay_parent.clone(),
message.signed_availability.clone(),
)
)
)
).await;

let message_sent_to_peer = &mut (per_job.message_sent_to_peer);

// concurrently pass on the bitfield distribution to all interested peers
Expand Down Expand Up @@ -324,6 +337,7 @@ where
}

/// Deal with network bridge updates and track what needs to be tracked
/// which depends on the message type received.
async fn handle_network_msg<Context>(
ctx: &mut Context,
tracker: &mut Tracker,
Expand Down Expand Up @@ -461,7 +475,7 @@ where
}
}

/// query the validator set and signing context
/// Query our validator set and signing context for a particular relay parent.
async fn query_basics<Context>(
ctx: &mut Context,
relay_parent: Hash,
Expand Down