Running an eCash Node

阅读时间: 5 分钟

Edit: Since this article was first published, Bitcoin ABC implemented NAT-PMP making it much easier to run a home node. You no longer need to change your router settings and all you need to do to allow inbound connections is add “natpmp=1” to your bitcoin.conf file.

The eCash network wouldn’t be possible without the nodes that run the network. Up until now, it’s been solely up to mining nodes to ensure transactions get confirmed and keep the network secure. But that’s all about to change with the upcoming integration of Avalanche.

To be clear, there has been no announcement of when Avalanche will go live. The most recent information we have is that the first phase will hopefully be completed before the end of this year. But once finished, it will bring new possibilities to the eCash network like subchains, fork-free upgrades, and of course, staking rewards.

By contributing to the security of the network and helping to expand its feature set, staking nodes will be eligible for a share of the coinbase reward (currently 6.25M XEC per block).

Blocks are found every ten minutes on average, or roughly 144 blocks per day. For chains like Bitcoin and Bitcoin Cash, the 6.25 BTC and 6.25 BCH that are rewarded with each block go completely to the miner who found the block. This is not the case with XEC.

As of today, 92% of the block reward, or 5.75M XEC goes to the miner that finds each block. The other 0.5M XEC goes towards paying for development.

But how much should stakers get? For example, if staking nodes are to receive half of what the miners are getting, that would be 2.875M XEC per block. How much you’d earn as a % of your stake will depend on how many coins are staked overall. I won’t attempt to guess what the annual yields will be when staking goes live, but I’m sure the market will provide the answer.

In addition to how much the staking rewards will be, there are plenty of other questions that remain such as how the winning staker will be chosen each block. However, the one thing we can be certain of is that you will need to run an eCash node in order to participate.

So how do you run an eCash node?

It’s actually fairly simple. Step 1: Have a decent computer (you can find minimum requirements here) with at least 500 GB hard disk space. Step 2: Download the latest Bitcoin ABC client. Step 3: Install and launch. Step 4: Wait for the initial block download (this took me roughly 15 hours, but just start it in the morning and it’ll be ready later that night).

Once you launch Bitcoin ABC you will be able to see the peers you’re connected to, watch transactions come through in real time, and a bunch of other stuff I’m not savvy enough to know.

Everything beyond this point may be irrelevant to you if you’re able to use NAT-PMP.

But assuming you’re using a wifi router, chances are you aren’t actually contributing to the network because you’re behind a NAT (Network Address Translation) protocol.

To get around this, you will need to assign a static local IP to your computer so everytime you reboot your computer you don’t get a new IP address.

Step 1: Log onto your router. Since eCash works in much the same way as Bitcoin, you can follow these detailed instructions to learn more, but for me it was simply going to http://192.168.1.1 and logging in. (For my router it was user name: admin, password: my wifi password.)

Step 2: Go to LAN -> DHCP Server. From there, find a section called “Manually Assigned IP” or something similar. On my router it was called “Enable Manual Assignment”. I toggled it from no to yes. Also note what your IP Pool Starting and Ending addresses are as these will be used later.

Step 3: On the same page you should find a section called Manually Assigned IP or something similar. There I hit the drop down menu and found my computer’s MAC address and selected it. On my router, my machine’s IP address automatically populated, but I’m told that with other routers you can set the IP yourself by choosing one that falls between the starting and ending IP addresses noted in step 2. Then hit “Add” and don’t forget to also click “Apply”.

Step 4: Finally, go to a section called WAN (just like you went to LAN in step 2), and then find a tab called Port Forwarding. First, enable port forwarding. Then add a new entry by entering a name for what you want to call it. Next, in the section labeled external port (on my router it was called Port Range) enter 8333, and for internal port (on mine it was called Local Port) you can enter 8333 again. For IP address enter the IP address you assigned to the specific machine you are using in step 3. For protocol, choose TCP/IP, and that’s it. You’re done.

If you want, you can check to see if others are able to connect to your node by Googling your public IP address and having someone else run this command in their console (window > console):

addnode "your public IP from above" onetry

The result will come back “null” and the person should then be able to see your node and you will see a new inbound connection show up as one of your peers. If so, you can be confident that everything is working properly.

Now before you get all excited about running an Avalanche node and one day earning a return on your staked XEC, I want to be sure you understand what you’re getting yourself into. For example, running a public node exposes your public IP address. This means people will be able to get a general idea of where you’re located. My research indicates it won’t reveal your exact address, but it’s still something to keep in mind. Another issue is that your ISP will of course know exactly who you are and where you live, and by looking at your activity would be able to see you’re running an eCash node. So if cryptocurrencies are illegal in your country, you could be putting yourself at risk by doing so.

With that said, the goal of eCash is to be decentralized enough so that no one can take it down, and this can only be achieved if enough people run nodes of their own.

Satoshi once said, “I’m sure that in 20 years there will either be very large transaction volume or no volume.”

That was posted on February 14, 2010. It means we have just over 8 years to get those transaction volumes up. By the year 2030, we will have gone through two more halvings, and the 6.25M XEC block reward will be down to 1.56M XEC.

Hopefully at that point there will be enough transaction volume that transaction fees will be a significant portion of the block reward. I can even envision a world where the majority of the block reward goes to stakers while miners transition from being the only source of network security to mainly acting as archivists or historians of the system through their work as block producers.

I won’t pretend to know how this is all going to play out, but I’m very much looking forward to what the future brings, and the one thing I do know is that once staking goes live, my node will be ready.

分享