-
Notifications
You must be signed in to change notification settings - Fork 298
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
P2P module #36
P2P module #36
Conversation
* Helper to tranform Buffer IDs to a bigint. | ||
*/ | ||
// TODO: place in/use from foundation repo | ||
const toBigInt = (buf: Buffer): bigint => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably make an eslint rule for this, but I'm recommending we import {Buffer} from "buffer"
as the rules for how modules are poly-filled is clearer than for globals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, that actually sounds nice as I'm often fighting with the IDE to recognise that Buffer
is a node
env global.
This particular case will be removed shortly as I'm moving these into the foundation
repo but I think this is a good idea 👍
* Initial work on synching world state * WIP * WIP * WIP * WIP * docs: fixed memory_fifo docs * refactor+docs: updated naming + fixed docs in L2BlockDownloader * refactor+docs: updated naming + fixed docs in Synchronizer * docs: fixed Semaphore docs * docs: fixed SerialQueue docs * docs: fixed docs in InterruptableSleep * docs: fixed WorldStateSynchroniser interface * docs: fixed WorldStatedB docs * docs: finished fixing world state docs * docs: fixed StandardMerkleTree docs * docs: fixed SiblingPath docs * docs: fixed docs of serialise.ts * docs: fixed MerkleTree docs * docs: fixed IndexedTree docs * docs: other merkle tree fixes * docs: fixed archiver * docs: fixed running promise docs * WIP * P2P module (#36) * add basic p2p client declarations for starting * WIP adding basic properties to p2p client * basic in-memory tx pool * super high-level implementation of p2p client initial sync * add public stop function to p2p client * add txPool to p2p client constructor * add functions to get all txs from tx pool & p2p client * add base p2p test * add yarn start - start:dev * consolidate some temp types etc * reject txs after being stopped * p2p running sync promise * add client state to status response * tx pool tests + cleanup * add world-state to yarn-project-base dockerfile * add merkle-tree to yarn-project-base-dockerfile * update project references + VERY BASIC implementation of Accumulated Tx Data * use types from data-archiver * merge fixes * update to use l2 blocks from archiver * WIP * WIP * WIP * WIP * WIP * WIP * WIP * Renamed public client * Removed serialisation code from merkle tree project * WIP * WIP * WIP --------- Co-authored-by: benesjan <[email protected]> Co-authored-by: spypsy <[email protected]>
Description
P2PClient
and in-memory implementationP2PMemoryClient
Engineer can start the P2P module #3
Checklist: