CRYPTO NEWS

Why is Proof of Work, Proof of Stake associated with Consensus Mechanisms/Algorithms?

Many often associate Proof of Work, Proof of Stake, etc with blockchain consensus algorithm/mechanisms.

I find that association to be inaccurate. Yes, proof of work / proof of stake are mechanisms by which leaders are elected to validate transactions. It is a crucial part in building consensus but not the only thing. For example, in bitcoin blockchain, the longest chain wins — this to me is also considered as a crucial part in building consensus across the nodes.

As a blockchain nazi, to me, it only makes sense to call the distributed consensus algorithms such as Paxos, Raft, PBFT, etc as consensus algorithm/mechanisms because of its theoretical/mathematical underpinnings.

Why then is Proof of Work, Proof of Stake used interchangeably with Consensus Mechanisms/Algorithms?

How to simulate multiple consecutive transactions and get the resulting state?

I’m trying to simulate a transaction on the public blockchain that invokes a contract’s method with certain parameters. Then I want to make a follow-up transaction with some other method call. I figured that I can use call() function in the JavaScript console to invoke a method without actually publishing a real transaction, e.g: var::Listen

I’m trying to simulate a transaction on the public blockchain that invokes a contract’s method with certain parameters. Then I want to make a follow-up transaction with some other method call.

I figured that I can use call() function in the JavaScript console to invoke a method without actually publishing a real transaction, e.g:

var abi = [...]; var contractAddress = "0x..."; var contract = web3.eth.contract(abi).at(contractAddress); contract.updateSomething.call(...);    // change some values 

The problem now is: How can I make another call that uses the updated state of the contract?

If I just use another call() it returns the old value, not the updated one.

... contract.updateSomething.call(...);    // change some values contract.readSomething.call();         // returns old value 

Why is Proof of Work, Proof of Stake associated with Consensus Mechanisms/Algorithms?

Shopping cart
There are no products in the cart!
Continue shopping
0