Architecture and Best Practices Question

ethkitethkit Member Posts: 18
I'm trying to understand how we mine...and have a few high level questions.

1.) Are we iterating through blocks to find in the DAG, or as we find/mine a 'nugget' it is assigned a block # in the sequence.

2.) If we are iterating through blocks, at the beginning of the iteration are we all racing to solve the same block #

I read a little about the DAG and how the 'work' is contained there and resets after 30k but...

In other words is this a lottery where every hash is a ticket increasing your chance to win the draw or is it a race?

Is it better to have the client on a separate machine and the GPU workers on another?

On a side note, I gave up on Ubuntu 15.10 and I'm really frustrated...will give it another try in the future Windows was really easy.

Thanks!

ASRock H81 Pro BTC, 5 R9 380s

Comments

  • mista66mista66 Member Posts: 117
    edited June 2016
    Ubuntu is easy once you've negotiated the learning curve. For running a client I think it's a lot more stable requiring infrequent reboots.

    a separate client is preffered, have it mining with one GPU and backed up by a UPS to protect against power failures. Then point those GPU workers on another machine at it.

    It's said to be a lottery, one way you might improve the chance of finding blocks, is to look at the Parity client which might be more efficiant than Geth.

    In addition, if you want to try solo mining in an enviroment where you can find fequent blocks take a look at the ethereum alt coin Shift.
  • ethkitethkit Member Posts: 18
    Thanks, which is better? Running one client or multiple instances. What is the best ratio of workers to client?
    I've read that there is a penalty for leaving a pool for maintenance...is there any penalty in solo down time other than opportunity cost?
  • mista66mista66 Member Posts: 117
    sure, none that i can think of other than you already identified, time/opportunity. Don't know the best ratio of workers to client, depending on number of rigs, just point everything at the client. Easier to run one client than multiple instances.
  • ethkitethkit Member Posts: 18
    Thanks, one more question that I believe falls under this topic.
    I understand what GAS is, and why it is required. But who receives the GAS that is spent to run a contract?
    I see many of these questions asked, and they are generally answered by explaining what GAS is, but never come out a definitively say that a miner or node that the code runs on receives the GAS.

    Also I would imagine that complex contracts would require CPU cycles, so how does this work and can it impede node performance thus impacting mining? How does this impact architecture decisions?
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    Miners receive (on a good pool or solo) gas in the form of transaction fees.

    Yes, a node does expend CPU resources processing transactions. Even though mining itself doesn't take much in terms of CPU, a node can, and you should consider running it on a decent multi-core/threaded processor. I'm not say it needs to be a kick-ass i7, but you really don't want to be running your node on an old pentium, either, if you want decent responsiveness when processing transactions. This can be seen easily when you're downloading the blockchain "fresh".
  • ethkitethkit Member Posts: 18
    I'm currently running an older i7 for the node (I intend to upgrade my workstation), so I'm wondering if I should tinker with GAS thresholds if I will indeed receive GAS for running contracts. I was considering running some VMs on it otherwise for testing purposes.

  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    Sorry, you misunderstood. The node doesn't get paid, the miner that mines the block gets paid.
  • ethkitethkit Member Posts: 18
    Who receives the gas a contract owner/developer spends to 'run/execute' their contract? I understand the miner gets payed for the block...isn't there other computation happening to run/execute the contracts code?
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    The node runs the transactions, but they aren't valid until an miner mines the block. The node gets paid nothing. The miner get 5 ETH for the block and whatever transaction fees are included in that block. The amount of work necessary for the node to run a transaction is less than trivial compared to the amount of work a miner expends to mine a block.
  • ethkitethkit Member Posts: 18
    Best explanation yet I've seen. Many Thanks!
Sign In or Register to comment.