Git Product home page Git Product logo

Comments (5)

luhuimao avatar luhuimao commented on June 5, 2024

Receive data from a gossip socket:
Ncp::new() --> streamer::blob_receiver() --> Blob::recv_from(sock);

from bitconch-core.

luhuimao avatar luhuimao commented on June 5, 2024

RPU(Request Processing Unit)

Fetch Stage Request Stage Respond Stage
streamer::receiver(); packets::run_read_from(); RequestStage::process_request_packets();Streamer::recv_batch(); request_processor.process_requests(); streamer::responder();packet::Blob::send_to();

from bitconch-core.

luhuimao avatar luhuimao commented on June 5, 2024

NCP(Network Control Plane)

Receive packets by UDP socket
streamer::blob_receiver();

Send received packets by UDP socket
streamer::responder();

Crdt::listen();
|
handle_blob();
|
Process request based on Request Protocol defined in crdt
Crdt::handle_protocol();

from bitconch-core.

luhuimao avatar luhuimao commented on June 5, 2024

TPU(Transaction Process Unit)

workflow:

Clients --> Fetch Stage --> SigVerify Stage --> Banking Stage --> WriteStage Stage --> Validators

Fetch Stage:
Receive packet from client
streamer::receiver(socket, exit.clone(), sender.clone(), "fetch-stage"))

SigVerify Stage:
Verify received packets
let r = if sigverify_disabled {
sigverify::ed25519_verify_disabled(&batch)
} else {
sigverify::ed25519_verify(&batch)
};

Banking Stage:
Start NUM_THREADS thread to processing packets:
BankingStage::process_packets();

BankingStage::process_transactions();
bank.process_transactions();

Write Stage:
recover and open the ledger for writing
LedgerWriter::recover(ledger_path);

Process any Entry items that have been published by the RecordStage.
WriteStagei::write_and_send_entries()

vote_stage::send_leader_vote()

from bitconch-core.

luhuimao avatar luhuimao commented on June 5, 2024

Transaction Validation Unit

Fetch Stage:
Picked up incoming blobs from the replicate socket and repair socketJ:
BlobFetchStage::new_multi_socket(blob_sockets, exit.clone()); -->
streamer::blob_receiver(socket, exit.clone(), sender.clone());

Retransmit Stage:
RetransmitStage::new(
&crdt,
window,
entry_height,
Arc::new(retransmit_socket),
repair_socket,
blob_fetch_receiver,
); ----->
Crdt::retransmit(&crdt, b, sock);

Replicate Stage:
Transactions in blobs are processed and applied to the bank:
ReplicateStage::new(
keypair,
bank.clone(),
crdt,
blob_window_receiver,
ledger_path,
exit.clone(),
); --->

  • streamer::responder("replicate_stage", Arc::new(send), vote_blob_receiver);
  • LedgerWriter::open(p, false);

from bitconch-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.