Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Support discovery & peering with untrusted nodes #7

Open
CDDelta opened this issue Feb 6, 2021 · 2 comments
Open

Support discovery & peering with untrusted nodes #7

CDDelta opened this issue Feb 6, 2021 · 2 comments
Labels
backlog Backlogged deliverables enhancement New feature or request

Comments

@CDDelta
Copy link

CDDelta commented Feb 6, 2021

For my use case, I want to be able to discover and peer with untrusted Arweave nodes to retrieve data as opposed to defining my own list of trusted nodes.

To do so, the gateway will need to first discover nodes to peer with then it will need to verify that the data it receives from those nodes are correct.

  • Blocks can be verified to be valid by checking that a majority of the peers agree on it (that's my understanding at least)
  • Transactions and their inclusion in blocks can be checked with the blocks that have been indexed (though how this works in block format v3 is a bit less obvious to me).
  • The actual transaction data can be verified for ANS-102 unbundling and client streaming using the generateTransactionChunksAsync() function I wrote here. Though for client streaming whether or not the data is valid can only be known once the entire stream has completed.
@samcamwilliams
Copy link

Very nice idea. Would love to see this.

Blocks can be verified to be valid by checking that a majority of the peers agree on it (that's my understanding at least)

Not even necessary -- just validate the deephash of the block structure you are given matches its ID.

PRs welcome!!

@CDDelta
Copy link
Author

CDDelta commented Feb 6, 2021

Not even necessary -- just validate the deephash of the block structure you are given matches its ID.

Ahh, I phrased myself wrongly here. What I meant was the gateway needs to somehow check that the block it has is the longest chain/the one miners will extend.

I believe the only way to do this is to check with node peers?

@TheLoneRonin TheLoneRonin added backlog Backlogged deliverables enhancement New feature or request labels Feb 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backlog Backlogged deliverables enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants