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

[PeerDAS] Parallelize data column sampling #14105

Merged
merged 4 commits into from
Jul 16, 2024

Conversation

0x00101010
Copy link

@0x00101010 0x00101010 commented Jun 12, 2024

What type of PR is this?
Feature

What does this PR do? Why is it needed?

  • Parallelize data column sampling
  • Add tests

@0x00101010
Copy link
Author

This PR is rebased on #14103, will wait for it to be merged first.

@0x00101010
Copy link
Author

Thanks @nalepae for the review, it's still in draft (definitely have plans to address the things you commented). Will let you know once ready

@0x00101010 0x00101010 force-pushed the peerdas-sampling branch 2 times, most recently from aced6cc to bb10d5e Compare June 12, 2024 23:09
@nalepae
Copy link
Contributor

nalepae commented Jun 21, 2024

We just merged #14109 into peerDAS.

I guess the global idea now is to modify the for loop in sampleDataColumnsFromPeers by the job done in this PR.

@0x00101010 do you have a target date for this PR?
If you don't want / don't have time any more to work on it I can take care it, no pb.

@0x00101010
Copy link
Author

We just merged #14109 into peerDAS.

I guess the global idea now is to modify the for loop in sampleDataColumnsFromPeers by the job done in this PR.

@0x00101010 do you have a target date for this PR? If you don't want / don't have time any more to work on it I can take care it, no pb.

I'll definitely finish this next week. The major blocker right now is the behavior of sample selection, I saw that there's discussions in ethereum/consensus-specs#3782 that there's various in flight changes discussed regarding column sampling.

What's your take on that? Should we implement based on that? Or what would be the idea behavior regarding (at least for this iteration of implementation):

  1. sample selection (seems like the consensus is totally random selection)
  2. failure handling? (IncrementalDAS? Saw that you're implementing that in a separate PR iirc)
    a. in the spec, it allows to set higher sample number to allow for errors (missing sample, no response, etc), what's prysm's stance on this?
    b. I need to do more calculations on the probability of missing columns (even with error margin) to see if it is feasible to do totally random selection)

@nalepae
Copy link
Contributor

nalepae commented Jun 23, 2024

failure handling? (IncrementalDAS? Saw that you're implementing that in a separate PR iirc)

Yes, this is precisely the PR I was referring to in my previous comment.

This new PR should retain the incrementalDAS/lossyDAS approach.

Main changes to bring:

  1. Query peers in parallel rather than sequentially,
  2. Implement A node SHOULD maintain a diverse set of peers for each column and each slot by verifying responsiveness to sample queries.
  3. Implement If more than one candidate peer is found for a given column, a node SHOULD randomize its peer selection to distribute sample query load in the network. and If possible, it is also recommended to avoid requesting many columns from the same peer in order to avoid relying on and exposing the sample selection to a single peer.

2 and 3 come from ethereum/consensus-specs#3782

@0x00101010
Copy link
Author

failure handling? (IncrementalDAS? Saw that you're implementing that in a separate PR iirc)

Yes, this is precisely the PR I was referring to in my previous comment.

This new PR should retain the incrementalDAS/lossyDAS approach.

Main changes to bring:

  1. Query peers in parallel rather than sequentially,
  2. Implement A node SHOULD maintain a diverse set of peers for each column and each slot by verifying responsiveness to sample queries.
  3. Implement If more than one candidate peer is found for a given column, a node SHOULD randomize its peer selection to distribute sample query load in the network. and If possible, it is also recommended to avoid requesting many columns from the same peer in order to avoid relying on and exposing the sample selection to a single peer.

2 and 3 come from ethereum/consensus-specs#3782

Cool, make sense, I'll get on that, and get a PR out asap

@0x00101010 0x00101010 force-pushed the peerdas-sampling branch 4 times, most recently from cb04501 to ef76268 Compare June 25, 2024 23:12
@0x00101010 0x00101010 marked this pull request as ready for review June 25, 2024 23:20
@0x00101010 0x00101010 requested a review from a team as a code owner June 25, 2024 23:20
@0x00101010 0x00101010 requested review from rauljordan, saolyn and james-prysm and removed request for a team June 25, 2024 23:20
@0x00101010 0x00101010 force-pushed the peerdas-sampling branch 2 times, most recently from 322fa52 to 47126f5 Compare June 26, 2024 03:38
@0x00101010 0x00101010 requested a review from nalepae June 26, 2024 03:47
@0x00101010 0x00101010 force-pushed the peerdas-sampling branch 2 times, most recently from 5d6b2cb to 10d6ae6 Compare July 11, 2024 04:47
@nalepae nalepae merged commit 4b3a0b5 into prysmaticlabs:peerDAS Jul 16, 2024
16 checks passed
@nalepae
Copy link
Contributor

nalepae commented Jul 16, 2024

Thanks!

nalepae pushed a commit that referenced this pull request Jul 17, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Jul 17, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nisdas pushed a commit that referenced this pull request Jul 18, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Jul 18, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Jul 29, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nisdas pushed a commit that referenced this pull request Aug 14, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nisdas pushed a commit that referenced this pull request Aug 15, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nisdas pushed a commit that referenced this pull request Aug 20, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Aug 27, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Aug 28, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Aug 28, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Oct 7, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Oct 7, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Oct 7, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Oct 8, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Oct 23, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Oct 23, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Oct 24, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Nov 20, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Nov 22, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Nov 22, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Nov 25, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Nov 25, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
nalepae pushed a commit that referenced this pull request Nov 27, 2024
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants