pbft | Implementation of the Practical Byzantine Fault Tolerant | Continuous Deployment library

 by   luckydonald HTML Version: Current License: GPL-3.0

kandi X-RAY | pbft Summary

kandi X-RAY | pbft Summary

pbft is a HTML library typically used in Devops, Continuous Deployment, Docker applications. pbft has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

Implementation of the ~~Peters~~ Practical Byzantine Fault Tolerant Algorithm    .
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pbft has a low active ecosystem.
              It has 95 star(s) with 37 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 9 open issues and 5 have been closed. On average issues are closed in 81 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of pbft is current.

            kandi-Quality Quality

              pbft has no bugs reported.

            kandi-Security Security

              pbft has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              pbft is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              pbft releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pbft
            Get all kandi verified functions for this library.

            pbft Key Features

            No Key Features are available at this moment for pbft.

            pbft Examples and Code Snippets

            No Code Snippets are available at this moment for pbft.

            Community Discussions

            QUESTION

            is the Digest of Prepare messages is that of a replica or is it the same signature of the pre-prepare sent by the primary in PBFT?
            Asked 2020-Aug-11 at 10:24

            im learning PBFT From this paper osdi99 Pbft which is the original paper that proposes the protocol

            after the primary sends a pre-prepare message the replicas would create a prepare message that includes a digital signature

            so im wondering if this digest is that of a replica or that that was included in the pre-preare Message(the primary digital signature of the client request)?

            i am also confused what would happen if for example a non-faulty node would get disconnected from the network for a while ,what would he do if gets back online ?

            ...

            ANSWER

            Answered 2020-Aug-11 at 10:24

            I actually found the answer for those who are interested, it is actually both, so when you send any Kind message there must be wrapper around that message.

            that wrapper itself contains the replica digest, and inside that wrapper you must have the preprepare message sent by the primary (in case you want to send Prepare or Commit ,in this case you need the whole preprepare message as an inner message for security reasons) , that preprepare message contains the primary digest.

            Source https://stackoverflow.com/questions/62635189

            QUESTION

            ReceiveActor Receive in Akka.net is not working
            Asked 2020-Jul-21 at 15:25

            im new to Akka.net, im running on linux and using .NET Core 3.1, i have written a very simple code but it does not work and i dont know why.

            this my program.cs where i created the ActorSystem and simply called another actor

            ...

            ANSWER

            Answered 2020-Jul-21 at 15:04

            Messages to and between actors in Akka.NET are passed asynchronously. What happens in your example, is that you're Telling a message to an actor and exiting the program immediately afterwards, before actor got a chance to process the message.

            You can either suspend main thread (using eg. Console.ReadLine()) in your example, or - if you need to be sure that actor had processed the message before going forward - use combination of actor.Ask(message, cancellationToken) on the caller side (which will return Task, that completes once actor sends a response back) and Sender.Tell(response) inside your actor's receive method:

            Source https://stackoverflow.com/questions/63016878

            QUESTION

            In Hyperledger Fabric, does a client send a transaction to all orders or only to one orderer node?
            Asked 2019-Dec-19 at 18:21

            When a client orders a transaction, does he send it to all the orderers (like in PBFT) or only to one/few orderers?

            ...

            ANSWER

            Answered 2019-Dec-19 at 18:21

            The answer is: "It depends".

            In Fabric, the consensus mechanism is pluggable, and as a result - anyone can implement its own ordering service as long as it implements the AtomicBroadcast gRPC API:

            Source https://stackoverflow.com/questions/59408805

            QUESTION

            PBFT consensus algorithm and double spending
            Asked 2019-Nov-11 at 04:44

            I am trying to figure out how PBFT consensus algorithm deals with the problem of double spending. I've read lots of literature but cannot seem to find an answer

            ...

            ANSWER

            Answered 2019-Nov-10 at 05:48

            pbft is a consensus algorithm given by Barbara Liskov and Miguel Castro in 1999 in order to prevent malicious attacks as malicious attacks and software errors can cause faulty nodes to exhibit Byzantine (i.e., arbitrary) behavior. pBFT was designed to work efficiently in asynchronous systems as compared to previous bft algorithms which only worked on synchronous systems.

            here is the research paper which states that

            Practical algorithm for state machine replication that tolerates Byzantine faults. The algorithm offers both liveness and safety provided at most ⌊n-1 / 3⌋ out of a total of replicas are simultaneously faulty. This means that clients eventually receive replies to their requests and those replies are correct according to linearizability. The algorithm works in asynchronous systems like the Internet and it incorporates important optimizations that enable it to perform efficiently

            Double-spending is a potential flaw in a digital or electronic cash scheme in which the same single digital token can be spent more than once. Unlike physical cash, a digital token consists of a digital file that can be duplicated or falsified.

            A double-spending attack is a potential attack against cryptocurrencies that has happened to several cryptocurrencies, e.g. due to the 51% attack.

            But this problem can be prevented using consensus algorithms and blockchain

            If two transactions attempt to spend the same tokens, each node will consider the first transaction it sees to be valid, and the other invalid. Once the nodes disagree, there is no way to determine true balances, as each node's observations are considered equally valid , a way to bring the nodes back in sync is using consensus algorithms and with blockchain the transactions in this system are never technically "final" as a conflicting chain of blocks can always outgrow the current canonical chain, however as blocks are built on top of a transactions, it becomes increasingly unlikely/costly for another chain to overtake it and hence preventing the double spending problem.

            Source https://stackoverflow.com/questions/58774207

            QUESTION

            How to decide the maximum number of faulty replicas in Practical Byzantine Fault Tolerance?
            Asked 2019-May-31 at 08:29

            In PBFT consensus, we know that there should be 3f+1 replicas out of which 2f+1 correct ones and f are the maximum number of faulty replicas network can tolerate. I wonder while setting up fabric how to keep this thing in mind. What are the parameters on which we can predict the chances of faulty replicas?

            ...

            ANSWER

            Answered 2019-May-31 at 08:29

            I assume you are setting up your orderers with a BFT consensus plugin such as BFT-SMART. BFT algorithms are only required if you want to tolerate malicious faults. If you're only concerned about crash faults, you can also use Kafka consensus, which tolerates up to 50% crashing nodes.

            So if you're setting up a business network, each partner should be running one ordering node. The number of tolerated malicious partners depends on your total number of partners. So if you have 4 partners, one of them can be malicious without your network breaking down, if you have 7 partners, you tolerate two, etc.

            So it's not really a conscious choice that you're making in how many replicas to run. The number of tolerated malicious nodes depends on the number of independent partners you have running ordering nodes. There is no point in having one organization run multiple ordering nodes, since they could manipulate all of them if they were acting maliciously.

            Source https://stackoverflow.com/questions/56383207

            QUESTION

            BFT and PBFT and BA consensus algorithm
            Asked 2019-Feb-28 at 22:59

            I've been digging into some of the most used consensus algorithms in permissioned blockchains and I got stuck.

            I understood that BFT (Byzantine Fault Tolerance) is a property of some algorithms and pBFT is an algorithm itself. Is that right?

            This rule that 2/3 of the nodes in the network are enough to reach consensus, is it for all BFT algorithms or just pBFT?

            Also what is the difference between Byzantine Agreement and BFT?

            If you could provide a reliable source of information, I'd be thankful.

            ...

            ANSWER

            Answered 2019-Feb-28 at 22:59

            I understood that BFT (Byzantine Fault Tolerance) is a property of some algorithms and pBFT is an algorithm itself. Is that right?

            Yes.

            This rule that 2/3 of the nodes in the network are enough to reach consensus, is it for all BFT algorithms or just pBFT?

            Algorithms for Byzantine agreement can tolerate at most f failures in 3f+1 nodes, but they may not even be able to tolerate that many. The reasoning is that, if the Byzantine nodes stop participating, then n-f nodes have to be able to reach consensus, but if message delays temporarily hide f good nodes, then the remaining good nodes should be in the majority (so n-f >= 2f+1, and n >= 3f+1).

            Also what is the difference between Byzantine Agreement and BFT?

            The former is a distributed computing problem, more often referred to as consensus. The latter is a property of a protocol.

            Source https://stackoverflow.com/questions/54932868

            QUESTION

            What if 2/3 of the validators are malicious in tendermint and a fraudlent transaction takes place?
            Asked 2018-Dec-05 at 12:26

            So, i have this condition where 2/3 of the validators are not honest and they can carry out a fraud transaction. What can be done to prevent it and how do i know which 2/3 are fraud? PBFT isn't working out then, right?

            What if 2/3 are not honest?

            Any solution?

            ...

            ANSWER

            Answered 2018-Dec-05 at 12:04

            If more than 2/3 of validators are malicious, there's not much hope. Expect maybe for minority to fork out.

            We're currently working on #200 which is suppose to help address the case where 1/3+ of validators are malicious. "We need to boot into a "recovery mode" protocol so validators can publish evidence, find out who shit the bed, kick them out and restart". You can read more on proof of fork accountability here

            Source https://stackoverflow.com/questions/53626336

            QUESTION

            How does each backup/nodes get 2f replies in PBFT?
            Asked 2018-May-08 at 05:37

            In Practical Byzantine Fault Tolerance(PBFT), the reason why 3f+1 is needed as the way I understand is to allow for the worst case scenario where:

            ...

            ANSWER

            Answered 2018-May-08 at 05:37

            The following assertion is incorrect

            Source https://stackoverflow.com/questions/50170379

            QUESTION

            if transaction was refused in orderer, how world state (KVS or CouchDB) value rollback?
            Asked 2018-Apr-20 at 22:57

            I'm studying Hyperledger Fabric.

            And I have two questions in transaction flow.

            (I'm so sorry that my english is not good)

            [Simple example] -> transaction flow

            • A : 100 , B : 50
            • A send 10 point to B.
            • Ordering service has a consensus (PBFT, kafka, SBFT, etc...)

            1) Client request a transaction.

            2) Peer checks the transaction and executes the chaincode function.

            And Peer saves the result in world state(KVS or CouchDB -> A : 90, B : 60).

            3) Return result to client. Client sends the result to ordering service.

            4) Ordering service collects transactions and sorts them by time.

            (Does consensus also.)

            4-1) Create a block.

            5) Ordering service broadcasts the block to peers, and peers commit the block to ledger.

            [Question]

            1. In flow2, the transaction's result was stored in the KVS or CouchDB.

              If I query about remains point of A before block creation is complete,

              Is the response {A : 90} ? or {A : 100}

              (requests query between flow3 and flow4. before flow4,5)

            2. In flow4 and flow4-1, ordering service checks the transactions (by consensus?) and sort them.

              If one transaction was refused, (by consensus or some errors or etc...)

              and the block was created.

              Then how the world state (KVS or CouchDB) value rollback ?

              (rollback by transaction log??)

            Thank you for reading my post.

            ...

            ANSWER

            Answered 2018-Apr-20 at 14:45

            In your step 2, the peer does not store the state. Rather, it has simulated the proposal and records the read and write sets for the transaction (the read set being the state prior to the simulation, the write set being what will be committed/written to the ledger after ordering and subsequent validation against endorsement policy (in step 5).

            The flow is:

            1. client submits transaction proposal to 1-n endorsing peers in channel

            2. endorsing peers simulate transaction, returning signed read/write set to client

            3. client compares results, packages up simulated transactions and sends to ordering service

            4. ordering service performs consensus and adds transaction to a block ordering service broadcasts to validating peers in channel

            5. validating peers validate the transactions in a block to ensure that a) the read set is unchanged, b) the endorsement policy is satisfied and c) all signatures are valid.

            6. finally the validating peer applies the write-set to update world state and the block is added to the ledger even with invalid (uncommitted) transactions.

            Hope this helps. You can find more information in the documentation.

            Source https://stackoverflow.com/questions/49935411

            QUESTION

            How PBFT applied in block chain?
            Asked 2018-Feb-10 at 14:02

            I am trying to understand how PBFT(practical byzantine fault tolerance) applied in block chain. After reading paper, I found that process for PBFT to reach a consensus is like below:

            1. A client sends a request to invoke a service operation to the primary
            2. The primary multicasts the request to the backups
            3. Replicas execute the request and send a reply to the client
            4. The client waits for f + 1 replies from different replicas with the same result; this is the result of the operation.

            This is how I understand how it is applied in block chain:

            1. At first, the elected primary node wants to write transaction A to chain, it will broadcast transaction A to other nodes.
            2. Any node receives the transaction checks if the transaction legal. If the transaction is thought as legal, the node will broadcast a legal signal to all of nodes in this round of consensus.
            3. Any node that receives equal or greater than f + 1 responds will write the transaction to the its own chain.

            Here are my questions:

            For malfunctioned nodes, if they keep failing to write block into its chain, they will hold a different chains with healthy node. In next consensus, the existing chain will be picked up at first. How do nodes know which one is the correct chain?

            In step 1, the elected node send transaction to other nodes. Does "other nodes" means all nodes in the network? How to make sure if all nodes included in the consensus because there is not a centralized agency.

            ...

            ANSWER

            Answered 2018-Feb-10 at 14:02

            How do nodes know which one is the correct chain?

            For tolerating Byzantine faulty nodes, It needs at least 3f+1 nodes in the network. PBFT is one of the algorithms which can tolerate Byzantine failure. So PBFT can tolerate up to f Byzantine nodes. f number of malicious nodes can be tolerated if you use PBFT. If there are f number of malicious nodes which keep failing to write block into its chain, resulting in inconsistency with correct nodes, then one can figure that the same chains from rest 2f + 1 nodes are correct. (Correct nodes always output exactly same data to the same request in same order).

            Does "other nodes" means all nodes in the network? How to make sure if all nodes included in the consensus because there is not a centralized agency.

            In PBFT setup, identities of all nodes should be established. To do that, there should be central authority to determine whether a node can join the network or not. (Important: central authority only engages in identity management, not the algorithm itself)

            Why this is needed? It's because PBFT works by voting mechanism and voting is not secure when anyone (including malicious node) can join the network. For example, a proposed value by the primary only can be recorded to all nodes in the way of state machine replication, which it means that there needs at least 2f + 1 agreed matching messages for the value to be accepted to the correct nodes.

            Without the trusted identity management, Sybil attack is possible. And this is the main reason why PBFT is not for the open blockchain which allows any node can freely join or leave the network.

            Source https://stackoverflow.com/questions/48696144

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pbft

            You can download it from GitHub.

            Support

            The whole project: https://github.com/luckydonald/pbft. The Java node implementation: https://github.com/luckydonald/PBFT-JAVA. DB Struktur (for debugging and powering the web gui): https://editor.ponyorm.com/user/luckydonald/pbft.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/luckydonald/pbft.git

          • CLI

            gh repo clone luckydonald/pbft

          • sshUrl

            git@github.com:luckydonald/pbft.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link