Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make min peers to start warp sync configurable #496

Open
2 tasks done
tmpolaczyk opened this issue Jul 25, 2023 · 3 comments
Open
2 tasks done

Make min peers to start warp sync configurable #496

tmpolaczyk opened this issue Jul 25, 2023 · 3 comments
Labels
I5-enhancement An additional feature request.

Comments

@tmpolaczyk
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Motivation

We would like to be able to warp sync a parachain using only 1 bootnode, but the node needs at least 3 peers, as defined here:

https://github.com/paritytech/substrate/blob/d38d176b844aab1338ce79eb71cd6df86c97d4a0/client/network/sync/src/lib.rs#L141-L142

What's the reason for that minimum? As far as I understand it is not possible to fake warp proofs, so 1 peer should be enough?

It would be nice to be able to disable it or configure it using a config param.

Request

Make MIN_PEERS_TO_START_WARP_SYNC configurable.

Solution

No response

Are you willing to help with this request?

Yes!

@girazoki
Copy link
Contributor

@bkchr Can you provide some feedback here?

@bkchr
Copy link
Member

bkchr commented Aug 17, 2023

It is probably to protect against an eclipse attack? @arkpar should know.

But yeah, on parachains we should not need this as we fetch the finalized block from the relay chain.

@arkpar
Copy link
Member

arkpar commented Aug 18, 2023

It was added for a bit extra safety. Should be configurable indeed.

@altonen altonen transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added I5-enhancement An additional feature request. and removed J0-enhancement labels Aug 25, 2023
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of paritytech#469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
bkchr pushed a commit that referenced this issue Apr 10, 2024
* limit messages in the batch by weight/count

* fixed components compilation

* reverted obsolete parts of #469

* implement generated_messages_weights

* actually use computed weight in message proof

* fmt and clippy

* fixed TODO

* clippy

* Update relays/messages-relay/src/message_race_loop.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* add issue reference

* add assert message

* grumbles

* fmt

* reexport weight from bp-message-lane

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <castano.ha@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request.
Projects
Status: Backlog 🗒
Development

No branches or pull requests

5 participants