Figuring out how to mine ETH

It turns out to be very easy to set up a miner node. There are a few ways to do this:

  1. From the javascript console:
    1. Start the javascript console
      1. geth –verbosity 5 console 2>> /tmp/eth.log
        1. This starts the console with a new geth process
      2. geth attach
        1. This attaches the console to an existing geth process
    2. run the following commands in the javascript console
      1. miner.start(4)
        1. opens 4 threads for mining
      2. miner.stop()
        1. stops mining
  2. From the linux shell
    1. geth –etherbase ‘0xD5c55DF2Ed5320553855aB4D9C9B20448870Fbf2’ –mine 2>>geth.log
      1. The etherbase does not need to be local! It can be any wallet’s hash (the reward from mining will go to this wallet)

In order to mine, your computer’s clock needs to be synchronized to the ntp (Network Time Protocol)

If everything has gone right, in your geth logs you should see “Starting mining operation”

ethermining

 

 

 

Advertisement

My first ETH transaction!

I’ve done my first transaction, from my kraken.com account to my wallet! 😀 This is pretty cool stuff.. from my kraken account I only needed to insert the hash of my wallet and thanks to the magic of the blockchain, the transaction was added to the next block and arrived at my wallet 0xD5c55DF2Ed5320553855aB4D9C9B20448870Fbf2

If I go to Etherscan.io and enter my wallet’s hash I can see the transaction details.

etherscanio

txHash: This is the hash identifying uniquely this p2p transaction in the blockchain

Timestamp: The blockchain keeps a timestamped record of this transaction which will be impossible to modify by anyone in the future. This transaction’s record is now permanent history! 😀

From: The hash of the kraken site. It’s interesting that Etherscan knows that this hash belongs to kraken. How is this possible? This could resolve many regulatory problems linked to “Know your customer” (KYC) or “Anti Money Laundering” (AML) regulations.. One of the problems today is that it’s difficult to link a wallet’s hash to a peson who owns this wallet.

To: My wallet’s hash! 😀

Value: The amount of ether transferred. I wanted to transfer 5 ETH, but I only got 4.995 ETH. Some of this missing ETH has gone to the miners who mined my block in the form of gas (see below) and the major part of this cut I believe has been kept by kraken.com to fund their business model.

Gas: 150000 this represents the amount of work that went into the operation (transfer of ETH)

Gas Price: 0.00000002 ETH This represents the price that I was willing to pay for the operation to be done per unit of gas. If you offer a price which is too low, no one will process your transaction. Gas price is measured in szabo (10^-6 ETH)

Gas Used by transaction: 21000 I think this is the actual gas that was consumed. (as opposed to Gas which was the gas estimated) TODO: investigate and update this

Actual Tx Cost/Fee: 0.00042 Ether

Cumulative Gas Used 341714

Nonce: 43556

Input Data: 0x This means that I did not add any additional data to the transaction. TODO: Investigate what data attached to a transaction can do. Is this some executable code?

 

Ethereum

I’m doing this MIT training about the future of fintech, and through it I am discovering the amazing potential of Ethereum as a source of fun. I think it could be cool to log here my ramblings with it. Maybe it can help others in their path.

Yesterday, I was able to set up an Ethereum wallet in my AWS virtual machine, and I managed to buy 3.000€ worth of ETH (205) and XBT (1,7), my bet is that in one years time these 3.000€ will have transformed into 30.000€. But my goal is not to make money through speculation. My goal is to learn about Ethereum and be able to program smart contracts that automate payments.

My milestones are:

  1. Open an account at kraken.com and buy some ETH and XBT [ Done ]
  2. Install an ethereum wallet in my windows computer [ Done ]
  3. Install an ethereum wallet in my Amazon Web Services VM [ Done ]
  4. Figure out how to mine ETH [ Pending ]
  5. Figure out how to develop smart contracts [ Pending ]

ethereum