GithubHelp home page GithubHelp logo

blocker's Introduction

Context

Putting in practice some blockchain concepts:

  • Blockchain Structure:

The blockchain structure consists of blocks linked together through hashes. Each block contains a header and a list of transactions. The proto.Block and proto.Header structures define the block and header formats respectively.

  • Cryptographic Operations:

Cryptographic operations are implemented using the crypto package, including key generation, signing, verification, and address generation. It utilizes the Ed25519 elliptic curve digital signature algorithm for generating key pairs and signing transactions.

  • Networking:

The networking functionality is implemented using gRPC, a high-performance RPC (Remote Procedure Call) framework. Nodes communicate with each other through gRPC calls. Each node exposes an RPC service with methods such as HandleTransaction and HandShake. Peers exchange information about the blockchain, transactions, and network topology through these RPC calls.

  • Node Management:

The node package handles the management and operation of individual nodes in the blockchain network. Each node maintains a list of peers it is connected to, manages its own mempool for storing pending transactions, and handles incoming transactions and block validation.

  • Consensus and Validation:

Consensus mechanisms are not fully implemented in this code. However, basic block validation is performed to ensure the integrity of the blockchain. Blocks are validated to ensure that transactions are properly signed and that the previous block's hash matches the hash specified in the current block.

  • Genesis Block:

The CreateGenesisBlock function initializes the blockchain with a genesis block. This is the first block in the blockchain and typically has special properties compared to regular blocks.

  • Mempool:

The Mempool structure is used to store pending transactions that have been received by the node but have not yet been included in a block. Transactions are added to the mempool upon receipt and removed when they are included in a block.

  • Bootstrapping:

Nodes bootstrap the network by connecting to known peers during startup. This helps in establishing initial connections and discovering other nodes in the network. Peers exchange version information during the handshake process, including the node's version, height, and peer list.

blocker's People

Watchers

Wilson Valencia avatar

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.