I hereby claim:
- I am gakonst on github.
- I am gakonst (https://keybase.io/gakonst) on keybase.
- I have a public key ASAigclj3x7AuazeWQkVupHUdx1XOv8oAUilNCSMaL3eTgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import Web3 from 'web3' | |
| import { Contract, Account, Signature } from 'web3/types'; | |
| // Converts any contract to a signed contract | |
| class SignedContract { | |
| account: Account | |
| contract: Contract | |
| address: string | |
| web3: Web3 |
| Verifying my identity on Peepeth.com 0x867b5ec95ef7d6cfe460e5ae2b88fc3d10ac9098 |
For the people that have not been following the news, it is now confirmed that Bitmain is selling an Ethereum mining ASIC. This can be potentially harmful for Ethereum's decentralization and thus the community is currently discussing on how this should be approached, potentially through a hard-fork change in the hashing algorithm used to achieve consensus.
There are valid arguments on both sides. I'll refer to bits and pieces I have extracted from my reading and understanding so far. This is where we should discuss with concrete arguments on each case.
My assumption is that full PoS, and not PoW/PoS Casper with epochs, is not close enough to be considered a remedy.
| pragma solidity ^0.4.21; | |
| library TestLibPublic { | |
| struct Data { | |
| uint n; | |
| } | |
| function Set(Data storage self, uint a) public { | |
| self.n = a; | |
| } |
| pragma solidity ^0.4.18; | |
| contract EventTest { | |
| event LogEventTest(uint _x); | |
| event LogOtherEventTest(address indexed _sender); | |
| function emitEvent(uint x) public { | |
| LogEventTest(x); | |
| } |
| // Highest bidder becomes the Leader. | |
| // Vulnerable to DoS attack by an attacker contract which reverts all transactions to it. | |
| contract CallToTheUnknown { | |
| address currentLeader; | |
| uint highestBid; | |
| function() payable { | |
| require(msg.value > highestBid); | |
| require(currentLeader.send(highestBid)); // Refund the old leader, if it fails then revert |
| pragma solidity 0.4.18; | |
| contract ForceEther { | |
| bool youWin = false; | |
| function onlyNonZeroBalance() { | |
| require(this.balance > 0); | |
| youWin = true; | |
| } |
| function withdraw(uint _amount) public { | |
| if(balances[msg.sender] >= _amount) { | |
| if(msg.sender.call.value(_amount)()) { | |
| _amount; | |
| } | |
| balances[msg.sender] -= _amount; | |
| } | |
| } |
| pragma solidity ^0.4.11; | |
| // Credits to OpenZeppelin for this contract taken from the Ethernaut CTF | |
| // https://ethernaut.zeppelin.solutions/level/0x68756ad5e1039e4f3b895cfaa16a3a79a5a73c59 | |
| contract Delegate { | |
| address public owner; | |
| function Delegate(address _owner) { | |
| owner = _owner; |