Any platforms that do validator selection using pre-committed hash chains?

Has this mechanism for selecting validators been proposed and/or implemented in any distributed ledgers? Validators pre-commit hash chains of length w. When creating a block, validators commit the pre-image to the current hash in their hash chain, and combines it with the random number Selector, hash(x) ⊕ Selector. This random number selects the next validator.…

Error while buying test ether from https://faucet.metamask.io/ – Mastering Ethereum

I am using Ethereum wallet MetaMask chrome extension and I am connected to Ropsten test network. I am following the instructions from the book Mastering Ethereum: Building Smart Contracts and DApps book by Andreas Antonopoulos and Gavin Wood. When requesting 1 ether from faucet I get the following error: {“error”:”[ethjs-query] while formatting outputs from RPC…

Is there a way for a function to perform some code to a point and then revert without conditions (more details below…)?

I want to create a payable function that acts similarly to onlyowner modifier, or: function owner() public payable{ if(msg.sender != owner) { balances[owner] += msg.value; revert(); } } What I want to accomplish: 1. when called by anyone except owner function will add funds to owner… 2. and after that it reverts, returning ‘unsuccessful’ or…

What kind of messages should be expected when using ‘expectRevert’ by OpenZeppelin Test Helpers

When I test smartcontract with OpenZeppelin Test Helpers and use expectRevert as follows, I got this message. What does it mean? Code context(“when querying the zero address”, function() { it(“throws”, async function() { await expectRevert( item.balanceOf(ZERO_ADDRESS), “ERCX: balance query for the zero address” ); }); }); Result Wrong kind of exception received + expected -…