Pages:
Author

Topic: Make Bitcoin Green! (Read 432 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
March 25, 2021, 04:29:39 AM
#22
thx it works

Great Smiley

Another question: How to auto-restart the bitcoin-core client on Ubuntu-core?

I tried this:

Code:
sudo nano /etc/systemd/system/BTC.service
Code:
[Unit]
Description=Bitcoin Blockchain Service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=geojanbv
ExecStart=/usr/bin/env bitcoin-core.daemon -daemon

[Install]
WantedBy=multi-user.target

Then:
Code:
sudo systemctl enable BTC

This works on Ubuntu-desktop but not on Ubuntu-core

Have a nice day,

Jan

I'm not really familiar by setup your own service or ubuntu-core, but try this post

As for starting at boot, there is no such option in bitcoin.conf, however you can make a systemd service that starts bitcoind as the "bitcoin" user at system startup.

1. In your VM create a file called bitcoind.service with the following contents:

Code:
[Unit]
Description=Run Bitcoin Core as daemon
Wants=network-online.target
After=network.target network-online.target

[Service]
Type=simple
# you may have to change the path of bitcoind
ExecStart=/usr/local/bin/bitcoind    # Add command line options here at your will
RemainAfterExit=no

[Install]
WantedBy=multi-user.target

2. Put this file in /usr/lib/systemd/system
3. Run the following commands:

Code:
sudo systemctl daemon-reload
sudo systemctl enable bitcoind.service
sudo systemctl start bitcoind.service  # alternatively just restart the VM
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
March 24, 2021, 06:46:58 AM
#20
..

That works, but i have 2 suggestion
1. I'm not sure what do you mean by "default map", but you can set Snap to allow Bitcoin Core access external drive with this command.

Code:
sudo snap connect bitcoin-core:removable-media

2. You might want to modify /etc/fstab to ensure the drive mounted at correct directory during boot. See https://wiki.archlinux.org/index.php/Fstab#External_devices

I did this and I get these messages:
Code:
pi@raspberrypi:~ $ sudo nano /etc/fstab
pi@raspberrypi:~ $ sudo mount /dev/sda1 /mnt/bitcoin
pi@raspberrypi:~ $ bitcoin-core.daemon -daemon -datadir=/mnt/bitcoin
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
Bitcoin Core starting



After a few minutes

Code:
pi@raspberrypi:~ $ bitcoin-core.cli -getinfo -datadir=/mnt/bitcoin
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
{
  "version": 210000,
  "blocks": 675943,
  "headers": 675946,
  "verificationprogress": 0.9999944798959487,
  "timeoffset": 0,
  "connections": {
    "in": 1,
    "out": 2,
    "total": 3
  },
  "proxy": "",
  "difficulty": 21865558044610.55,
  "chain": "main",
  "keypoolsize": 1000,
  "paytxfee": 0.00000000,
  "balance": 0.00000000,
  "relayfee": 0.00001000,
  "warnings": ""
}
pi@raspberrypi:~ $

So the CLI-Bitcoin client starts but gives some messages.
I switch to the GUI for the RaspberryPI

I don't know why the error happened, but the error isn't directly related with Bitcoin Core and sometimes happens with application running on Raspberry Pi.

Common "solution" is by modifying this file

Code:
/etc/ld.so.preload

Then delete or add command (with "#" to this line)

Code:
/usr/lib/arm-linux-gnueabihf/libarmmem.so

P.S. i don't know side effect of doing this, DO NOT do it unless you fairly sure it's not dangerous to do so
legendary
Activity: 2453
Merit: 1026
Energy coin master
March 24, 2021, 12:37:25 PM
#19


I don't know why the error happened, but the error isn't directly related with Bitcoin Core and sometimes happens with application running on Raspberry Pi.

Common "solution" is by modifying this file

Code:
/etc/ld.so.preload

Then delete or add command (with "#" to this line)

Code:
/usr/lib/arm-linux-gnueabihf/libarmmem.so

P.S. i don't know side effect of doing this, DO NOT do it unless you fairly sure it's not dangerous to do so

thx it works
Code:
i@raspberrypi:~/snap/bitcoin-core/common $ sudo nano /etc/ld.so.preload
pi@raspberrypi:~/snap/bitcoin-core/common $ bitcoin-core.cli -datadir=/mnt/bitcoin -getinfo
{
  "version": 210000,
  "blocks": 676124,
  "headers": 676124,
  "verificationprogress": 0.9999986473165158,
  "timeoffset": 0,
  "connections": {
    "in": 5,
    "out": 10,
    "total": 15
  },
  "proxy": "",
  "difficulty": 21865558044610.55,
  "chain": "main",
  "keypoolsize": 1000,
  "paytxfee": 0.00000000,
  "balance": 0.00000000,
  "relayfee": 0.00001000,
  "warnings": ""
}
pi@raspberrypi:~/snap/bitcoin-core/common $

I run also on NUC with Ubuntu-core and there no problem.

Another question: How to auto-restart the bitcoin-core client on Ubuntu-core?

I tried this:

Code:
sudo nano /etc/systemd/system/BTC.service
Code:
[Unit]
Description=Bitcoin Blockchain Service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=geojanbv
ExecStart=/usr/bin/env bitcoin-core.daemon -daemon

[Install]
WantedBy=multi-user.target

Then:
Code:
sudo systemctl enable BTC

This works on Ubuntu-desktop but not on Ubuntu-core

Have a nice day,

Jan
legendary
Activity: 2453
Merit: 1026
Energy coin master
March 23, 2021, 09:07:40 AM
#18
..

That works, but i have 2 suggestion
1. I'm not sure what do you mean by "default map", but you can set Snap to allow Bitcoin Core access external drive with this command.

Code:
sudo snap connect bitcoin-core:removable-media

2. You might want to modify /etc/fstab to ensure the drive mounted at correct directory during boot. See https://wiki.archlinux.org/index.php/Fstab#External_devices

I did this and I get these messages:
Code:
pi@raspberrypi:~ $ sudo nano /etc/fstab
pi@raspberrypi:~ $ sudo mount /dev/sda1 /mnt/bitcoin
pi@raspberrypi:~ $ bitcoin-core.daemon -daemon -datadir=/mnt/bitcoin
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
Bitcoin Core starting



After a few minutes

Code:
pi@raspberrypi:~ $ bitcoin-core.cli -getinfo -datadir=/mnt/bitcoin
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
{
  "version": 210000,
  "blocks": 675943,
  "headers": 675946,
  "verificationprogress": 0.9999944798959487,
  "timeoffset": 0,
  "connections": {
    "in": 1,
    "out": 2,
    "total": 3
  },
  "proxy": "",
  "difficulty": 21865558044610.55,
  "chain": "main",
  "keypoolsize": 1000,
  "paytxfee": 0.00000000,
  "balance": 0.00000000,
  "relayfee": 0.00001000,
  "warnings": ""
}
pi@raspberrypi:~ $

So the CLI-Bitcoin client starts but gives some messages.
I switch to the GUI for the RaspberryPI



legendary
Activity: 2453
Merit: 1026
Energy coin master
March 22, 2021, 10:33:22 AM
#17
Bitcoin-core snap expects the blockchain in the default map.
When the size of the disk is not enough you can choose to prune.
In this way, I was able to run a full node on a 16GB microSD-card.
But I found out that it is also possible to mount an external disk on the default location.


Code:
sudo mount /dev/sda1 /home/pi/snap/bitcoin-core/common/.bitcoin



As you can see it works fine.

Have a nice day,

Jan


legendary
Activity: 2453
Merit: 1026
Energy coin master
March 21, 2021, 08:45:50 AM
#16
Most of the energy concerns are not related to the electricity used to run full nodes, but rather the massive amounts of ASIC mining farms that are processing the transactions.... hashing it out every day.

The day when someone can make some kind of ASIC that can hash at a fraction of the electricity that it is currently doing this, then I reckon people will stop complaining about this. (The more ASIC's they add, the higher the difficulty increase and the more ASIC's they need)

OP... your idea for the full nodes will still make a small impact and we need small changes to make a difference in the long run.  Wink  (Your configuration is very streamlined and inexpensive)

I'm aware that the full-node network consumes a fraction of the total energy of the ASIC mining farms but it is a start to Make Bitcoin Green.

The full-nodes are the barebone of the network and essential for the Bitcoin ecosystem.

If there comes an innovation for mining equipment that uses a fraction of the energy a new rat race will start and it not good for the environment.
All the old mining equipment has to be recycled and what to do with the energy surplus that has no purpose.
  
My idea is a smart Green Bitcoin Network where everybody can contribute and earn value (Bitcoin) by acting on consuming or not consuming energy by environmental and economic constraints.  So start mining when there is an energy surplus with no purpose and save energy when there is a shortage of energy and this is done by economical motivation.

Have a nice day,

Jan
legendary
Activity: 3542
Merit: 1965
Leading Crypto Sports Betting & Casino Platform
March 21, 2021, 06:47:38 AM
#15
Most of the energy concerns are not related to the electricity used to run full nodes, but rather the massive amounts of ASIC mining farms that are processing the transactions.... hashing it out every day.

The day when someone can make some kind of ASIC that can hash at a fraction of the electricity that it is currently doing this, then I reckon people will stop complaining about this. (The more ASIC's they add, the higher the difficulty increase and the more ASIC's they need)

OP... your idea for the full nodes will still make a small impact and we need small changes to make a difference in the long run.  Wink  (Your configuration is very streamlined and inexpensive)
legendary
Activity: 2453
Merit: 1026
Energy coin master
March 21, 2021, 03:46:58 AM
#14
It was already said a couple posts ago that the nodes aren't the ones drawing much energy. The topic is greatly misleading.
And you guys should not make this thread an altcoin fiesta, unless you want to move it to altcoins section.


Now back to topic:

I like the idea of this project: a silent Bitcoin node.
And while reading another topic something has occurred to me: how is the HDD doing over time? If it would not be an old HDD, wouldn't a 512GB microSD card be more appropriate for this setup?

And something else: if this setup is already done and running, wouldn't an ElectrumX (or similar) service come as an obvious "next step"? Is the overhead/extra disk space significant?

I do research for several storage solutions on 12 devices in my home and 2 on other locations.
Some simple USB can handle a pruned version of the Bitcoin blockchain and some can't.
Clients with an HDD or SSD with the complete blockchain get much more connections when port 8333 is forwarded to the router.
Also with wired connection more connections than with WiFi.

For energy efficiency, an SSD or microSD/USB-stick is better than HDD I guess.

I have another challenge:
Ubuntu-core on my NUC's does updates with an automatic reboot.
On this platform, I'm not able to program automatically restart the snap wallets I run.
A possible solution is to prevent automatic updates or create a custom Ubuntu-core-blockchain platform.
On Ubuntu-desktop you can set a restart of the wallet but that only triggers when you log in again.

Are there people here who have suggestions to solve this?

It is important for mass adoption that IoT-devices running on Ubuntu-core-blockchain are easy to manage.
The IoT-Blockchain device can earn value in your house by trading your energy surplus from solar panels or increase consumption (mining) when there is too much energy available.

Have a nice day,

Jan





 


full member
Activity: 196
Merit: 101
Crypto is the next evolution of mankind
March 19, 2021, 06:20:17 AM
#13
just let's use the heat we have got from mining
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
March 04, 2021, 11:33:59 AM
#12
It was already said a couple posts ago that the nodes aren't the ones drawing much energy. The topic is greatly misleading.
And you guys should not make this thread an altcoin fiesta, unless you want to move it to altcoins section.


Now back to topic:

I like the idea of this project: a silent Bitcoin node.
And while reading another topic something has occurred to me: how is the HDD doing over time? If it would not be an old HDD, wouldn't a 512GB microSD card be more appropriate for this setup?

And something else: if this setup is already done and running, wouldn't an ElectrumX (or similar) service come as an obvious "next step"? Is the overhead/extra disk space significant?
legendary
Activity: 3346
Merit: 3130
March 04, 2021, 11:14:38 AM
#11
I don't feel the nodes are the problem here, we can run a node on a virtual machine on a phone and consume the minimum, but the problem is the miners, Just think about it, the 99% of the energy consumed by bitcoin is in their miners and not in their nodes. So, the right way to make bitcoin green is to follow the steps of ETH and move from PoW to PoS. That's the right way to turn off those miners and make from bitcoin something friendly for the world (While we keep using our fuel cars  Grin).
legendary
Activity: 2453
Merit: 1026
Energy coin master
March 04, 2021, 09:45:30 AM
#10
With the enormous increase in decentralized energy generation, the grid operators can support decentral small mining for balancing the electricity network.
The full nodes can contribute to balancing by routing the incoming transactions to eco-miners.
Besides bitcoin also EnergyCoin and Stakecoin are on the fullnode.
See my project: https://bitcointalksearch.org/topic/m.56403331

Have a nice day,

Jan
full member
Activity: 196
Merit: 101
Crypto is the next evolution of mankind
March 03, 2021, 07:15:30 AM
#9
 cool you guys are running full node but I wonder if really great investors do it will it help
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
February 10, 2021, 07:51:07 AM
#8
The PSU is the computer part that draws all the energy so by getting one rated for a lower amount of watts, you automatically reduce power usage of the whole system.

CPUs, hard drives, memory controllers etc have a small power draw. Just omit the dedicated graphics card and you can make an Intel-based system as power efficient as a Pi.

Full nodes are not the ones that draw obscene amounts of power anyway, it's the miners. And if the power usage of full nodes are a problem, then we got a bigger electricity problem with the number of gaming PCs in use right now, which is much higher than the combined power draw of all 10K active full nodes.
legendary
Activity: 2453
Merit: 1026
Energy coin master
February 10, 2021, 04:34:19 AM
#7
...
I need a prove that it helps transactions to accelerate

Prove is hard to give.
If the network was only supported by mining farms, nobody was aware of the existence of Bitcoin today.
The small nodes are the capillaries in the network and important for mass adoption and making the network more secure.

I work on a personal project to check the possibilities to manage the flow of blockchain information.
Now running 8 Bitcoin nodes behind my router and 1 is a full node.
Each of the 8 internal nodes is connected to another internal node and I play with the adjustments.
The challenge is that I want to send/coach transactions/information to eco-BTC miners when they are ready and available.
This is a multi-blockchain application I have in mind.
More info in the future.

Have a nice day,

Jan


full member
Activity: 196
Merit: 101
Crypto is the next evolution of mankind
February 10, 2021, 01:02:27 AM
#6
uh, even when I spare the hardware for this, and no way to dedicate myself to it and put it to work. maybe soon  Grin 500GB Hard drive for blockchain files seem is enough, right?

but I was thinking something, whether such a node can be used for help with transaction acceleration?
Same idea I need a prove that it helps transactions to accelerate
legendary
Activity: 2453
Merit: 1026
Energy coin master
December 22, 2020, 06:53:38 AM
#5
Thank you all for your contribution to this topic.

I read the suggestion to use a 1TB disk instead of a 500 GB.
Running 2 years a node on Raspberrypi is a long time but possible maybe.
I used a 5.25 inch HDD from an old PC configuration and on my second RPI node a Samsung T3 500GB.
On the 3rd RasberryPI, I just run the pruned blockchain as a test and not for the full node.
The challenge was also to use used v3 raspberry pi and give them a second life as Bitcoin full node.
I apply some other tests on two of the RPI's to see if they are able to run more blockchain tasks besides being a Bitcoin full node.
If these tests are successful I shall share them.

I noticed that the full node collected more transactions in the mem-pool.
Maybe that is good for making the network faster?

See the screenshot:

Left is my desktop PC with a pruned blockchain
In the middle the RaspberryPI Bitcoin full node
On the right the Raspberry Bitcoin-CLI full node

I'm a noob in bitcoin-cli so I know only the get-info command.
Is there maybe a localhost bitcoin-cli application that can simulate (more or less) a normal wallet and gives a lot of useful information?

That's it for today,
Jan




full member
Activity: 196
Merit: 101
Crypto is the next evolution of mankind
December 22, 2020, 05:11:12 AM
#4
uh, even when I spare the hardware for this, and no way to dedicate myself to it and put it to work. maybe soon  Grin 500GB Hard drive for blockchain files seem is enough, right?

but I was thinking something, whether such a node can be used for help with transaction acceleration?

have the same I guess but at some I noticed that full node kinda slows down CPU
legendary
Activity: 3472
Merit: 3507
Crypto Swap Exchange
December 22, 2020, 05:01:55 AM
#3
but I was thinking something, whether such a node can be used for help with transaction acceleration?

No, unless you mean rebroadcasting transaction (either manually or use script which do it automatically)

Yes, I mean that.
the last time we very often get a stuck transaction, last time I wait almost 48 hours for the first confirmation it sometimes complicates things for me. if it can help me speed up with tx confirmation, I will run it for sure.
legendary
Activity: 3472
Merit: 3507
Crypto Swap Exchange
December 21, 2020, 04:18:23 PM
#2
uh, even when I spare the hardware for this, and no way to dedicate myself to it and put it to work. maybe soon  Grin 500GB Hard drive for blockchain files seem is enough, right?

but I was thinking something, whether such a node can be used for help with transaction acceleration?
Pages:
Jump to: