Skip to content

Inject headers to alpha network from external source #314

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

Closed
19 of 21 tasks
carver opened this issue Apr 22, 2022 · 2 comments
Closed
19 of 21 tasks

Inject headers to alpha network from external source #314

carver opened this issue Apr 22, 2022 · 2 comments
Assignees

Comments

@carver
Copy link
Collaborator

carver commented Apr 22, 2022

Extract headers (maybe follow the tip of the mainnet chain) from an execution client, and inject them into a trin client, in a way that offers them to other peers on the network.

TODO:

  • Manually generate private keys and node ids to create ~8 nodes spread around the DHT ~evenly (perhaps run with larger than usual buckets? Only if that's easier than running more nodes, which seems a little unlikely)
  • make a bridge-splitter daemon that:
    • at launch:
      • runs the ~8 trin nodes, with custom ipc path and port (and data directory?)
      • connects to 3rd-party service: infura? alchemy? etc
      • listens for new headers to arrive
    • when a header arrives:
      • generate header content-key and content-value
      • call portal_historyStore on all ~8 nodes with the header
      • get the transactions and uncles to build the block body, from 3rd party
      • generate block body content-key and content-value
      • call portal_historyStore on all ~8 nodes with the block body
      • get the receipts from 3rd party
      • generate receipts content-key and content-value
      • call portal_historyStore on all ~8 nodes with the receipts
  • In trin, after receiving data via portal_historyStore, gossip it to relevant nodes in routing table (with matching radius) -- depends on Propagate Gossip implementation #313
    • Propagate the data, even if it's not stored locally
  • Offer history content to all peers over rpc #411 -- Propagate using portal_historyOffer instead of portal_historyStore
  • Use Recursive-Find-Content to confirm that data gets pushed somewhere out to the network from the bridge
@carver carver added this to the Alpha Network Milestone milestone Apr 22, 2022
@carver carver self-assigned this Apr 22, 2022
@carver
Copy link
Collaborator Author

carver commented Apr 25, 2022

It's quick to generate node IDs. I wrote a python script that is generating 10k / second using eth-keys. That was plenty to find these node IDs that seem to be evenly spread:

0001062699225860d6e114c72cae2517e55291148e1ba0357b3ade6827b3f6dd
20026eccb926ffda3c2556597ad5906d4320970f74823722287903e5ab137fba
4002eb4a0645f4f8f3ea2ea75d8b2df567de5a95d7ce9d9a87f2b2f6aa550e77
600122b84f0c22ab6fa95d9747ae76c4c9d4245a88935535039b1b7d861fd534
800048f38a80df283c6100694566532bbb9fb2c8415877530a6dfb161aecd6aa
a0028507e77ed24028ad319176e71792a8423455cd04a5a01bc21ac2d5b789c1
c0020037f5d2261dc391c9a876addceafe51bb64dd9f739433f515939a121718
e000fa0096ffb84e2a148c22ddaa7fff084cef5fd3e2277213d40a82d88d5492

(See the 0, 2, 4, 6... in the upper byte, and 0's in the next bytes)

I have the private keys but will not be posting them here 😆

@njgheorghita
Copy link
Collaborator

closing since this functionality has been completed, 🦩 🪓

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

No branches or pull requests

2 participants