How to start on-chain permissioning with ibft consensus - blockchain

I am try to start besu blockchain with ibft consensus protocol.
For enabling on-chain permissioning, I followed the steps descrived in totorial.
But I couldn't deploy permissing-related contracts.
ibft requires at least 4 validators for transaction mint.
But the tutorial guides contract migration when only Node-1 is started.
With only a single node, I guess the trasaction never complete.
Could you kindly provide guide to start ibft blockchain with on-chain permissiong?

https://github.com/ConsenSys/permissioning-smart-contracts
I failed to deploy permissioned smart contracts on besu network.
When i tried with ganache. I was able setup the ui. Add node is disabled though.
Mining can happen with single node as well with bootnode. It needs 4 to become Byzantine fault tolerant

Related

Where to get rpc server ethereum

I am new to cryptocurrency development.Today I learned that the ETH transaction requires an RPC server. I found a list of RPC servers like Binance. But is there any official RPC server? Or do you need to create it yourself? What is the difference? Where to get the official exchange rate eth to USD? Many thanks.
There is no official centralised server, because peer-to-peer cryptocurrencies are about decentralisation. Creating single points of failure is bad.
Ethereum software-as-a-service node alternatives can found on:
https://ethereumnodes.com
I also recommend you to try to host the node yourself.

Truffle Suit, real network simulation?

I'm working on a Dapp for testing Ethereum smart contracts.
I have followed along with this tutorial: https://github.com/Quintor/angular-truffle-box and got the Truffle Dapp working with Ganache-CLI, making me able to do Crypto (I.e. Ethereum) transactions from one to another wallet on this blockchain.
*Note, this is a testing environment so no real Eth are transferred.
The problem I currently encounter is that transactions are direct, and not like the times that are displayed as an option. (Like here, https://ibb.co/ccR8k0J)
The idea is that the more Ethereum (Cryptocurrency) you pay as a fee, the faster the transaction will be done. I wonder if anyone knows how to simulate these times, but on a local blockchain instead of a deployed one.
"ganache doesn't have options to set the consensus mechanism. You could look at puppeth to quickly spin up a geth instance with whatever consensus you want."
By #Stephen S

Difference of Geth or Ganache

Hi I am new to blockchain topic and I am trying to make an Ethereum smart contract. First step I installed truffle and when I try to migrate it throws an error because I have no ethereum client.
For solving this problem truffle develop, ganache, geth are recommended but I couldnt decide to which one is more suitable and I dont understand the difference of ganache and geth. Basically are they serving same thing or not? Here is error:
Could not connect to your Ethereum client with the following parameters:
- host > 127.0.0.1
- port > 7545
- network_id > *
Please check that your Ethereum client:
- is running
- is accepting RPC connections (i.e., "--rpc" option is used in geth)
- is accessible over the network
- is properly configured in your Truffle configuration file (truffle-config.js)
Truffle
As you already did, you migrated a contract. So Truffle can be used for contract compilation and migration. It aims for easy and fast migration.
Geth
Is an Ethereum-client, which means that you can run your own private blockchain with it. You can adjust your needs by defining for example the amount of threads you offer for mining.
Geth itself is a command line tool, which can run a full Ethereum node implemented in Go. It provides the command lines, a Json-rpc server and an interactive console, where you can run your own scripts written in javascript.
Ganache
If you want a GUI, where you can track all deployments and transactions on your blockchain, you can choose Ganache.
It allows you to create your own private blockchain mainly for testing purposes.
It is used for deployment-testing for example, because there are no real miners on a "ganache-blockchain", so you can test if your contracts work.
I would suggest you to use Geth and Truffle if you want to set up your own blockchain on your local node and then deploy some contracts on it.
There are plenty of manuals online on how to set up your own local node.
For example:
Create your own local node with geth
Setting up Ethereum development environment
After you created your node, you can deploy some contracts with truffle to it. I hope I could help you.
TLDR : start with Ganache and learn Geth along the way.
Truffle is a compiler and out of question.
But between Geth and Ganache :
Why Ganache ? Because it is easy !
Geth is a real deal , for a small local chain you have to run it's service first then create genesis block then you need to bring some miner to mine the transaction to the blockchain and generate some eath! then you can migrate smart contract to it but Ganache will do all of that for you!
Why use Geth? from here :
1- Geth is the official client software provided by the Ethereum
foundation.
2- Comes with a JavaScript console (run it with geth console).
3- Has an interoperable JavaScript client (web3js).
4- Built-in access to the Rinkeby test net (or build your own private
Ethereum network).
5- It is generally considered to be the reference implementation for
other Ethereum nodes.
From my experience at this time/date, Ganache cloud be buggy and will give you some errors irrelevant to your code , but if you need to migrate your code to a test nest like Rinkeby Testnet, eventually you need to learn Geth.

How is a hyperledger fabric blockchain stored on a PC?

I'm trying to get my head around blockchain and I'm finding it difficult to get a straight forward answer to this. Say I create a web application that interacts with a blockchain. A user opens my web app, logs in and uses that web application and so a transaction occurs and a new block is added to the chain. How is that blockchain stored on their PC, since the point of blockchain is that it is stored on every participating node? In what format is it stored?
Your web application will interact with the blockchain as a client (likely using one of the Hyperledger Fabric SDKs). The "blocks" will be stored on one or more peer nodes (depending on how many peers are connected to a given channel) not on your client nor on the server hosting your web application.
I'd recommend looking at this to understand the overall transaction flow and this to understand the ledger.

How can I add a node to an existing network?

I created a network with 4 peers using docker-compose and docker for Mac.
I deploy my blockchain on this network successfully.
Now I'm launching a 5th peer using another yml file using the details of one of the previous peer as discovery node.
It appears in the list returned by http://localhost:7050/network/peers however my blockchain is not deployed on this peer and I cannot use it to process transactions.
Do I have to deploy the chaincode again on this peer? Did I miss something?
This is limitation in Fabric’s versions 0.5 and 0.6
Network configuration cannot be changed in realtime. In case If you use PBFT consensus, network configuration is hardcoded in:
“fabric/consensus/pbft/config.yaml"
# Maximum number of validators/replicas we expect in the network
# Keep the "N" in quotes, or it will be interpreted as "false".
"N": 4
The challenge is in updating configuration on all peers synchronously, otherwise they will not be able to reach consensus.
In one of next Fabric versions this configuration’s parameter will be moved to blockchain and it will be possible to add new peers and modify consensus configuration on the fly.
Update for question in comment:
Saw only this high level Roadmap proposal: