Posted on Leave a comment

Are MicroSD cards worth to store the Blockchain of Bitcoin?

This is the question you have asked us the most, so we are going to answer it.

MicroSD cards have a bad reputation for long-term storage of information, this comes from old cards that had a low write limit and low-end cards that are very cheap but have high failure rates, there are only We do have to review the comments on the sales websites for these cards, but current and quality cards are valid for storing long-term information.

In the case of BCubium the card that comes is high-end, we only use two

Samsung Memory MB-MC512GAEU cards – Micro SD 512 GB Evo plus  

Lexar High-Performance 512GB 633x microSDXC UHS-I

These cards that cost between 4 and 5 times more than the low-end ones and have very good references by consumers.

Both Samsung and Lexar give a 10-year warranty on these cards.

These microSD are normally used in video and still cameras where the writing volume is very high and they respond very well.

In our case, the operating system is in the eMMC memory of the NanoPI Neo Plus 2 motherboard and the MicroSD card is used to store the Blockchain and it is already preloaded from our laboratory, so the read and write ratios are due to the operation. derived from the writing of the blocks every 10 minutes (approx.), the indexing of the transactions and the communication between the different full nodes of the network. This functionality involves an average number of card reads and a very low number of writes, which means that the card suffers very little because what most affects microSD is the writing of information.

Choosing a day at random the average rate of io per second is 742 kB of reading and only 53 kB of writing.

We can also see it at the moment by running the dstat tool, obtaining similar values:

So, making the full node functionality of Bitcoin plus a Lightning Network Daemon as it is done in BCubium, we have an average ratio of reads and very low write range microSD cards alta are a fully valid device for safe storage in the short, medium and long term. Commenting that the personal information of the node is not stored in the microSD, only the Blockchain is stored, so if it were damaged, another card could be inserted and the history of Bitcoin could be resynchronized.

Posted on 1 Comment

Why don’t we use Docker in BCubium full node

Docker is a virtualization technology that allows the packaging of an application along with all its dependencies and libraries in one container. This resulting software container can be run on machines other than where it was created with the sole premise that they have the Docker containerization system.

Containerization technology is more efficient than virtualization of the entire operating system because it does not need to replicate the entire system but only what is necessary for the execution of the container. Docker uses Linux cgroups technology to manage container resources and achieve isolation between them.

The main advantages that containerization offers us are the following:

It provides consistency, since it contains both the application code and the libraries it uses, whether they are its own or those of third parties, plus the complete execution environment, for example in a Java application we would have the developed code, plus all the libraries it uses, plus the complete application server. Much fewer points of failure when running the application.

We achieve standardization and productivity, by using the same image for all environments, development, integration, quality, pre-production, production or whatever it is, it is easier for us to manage it, label it, make backups, rollbacks … It 

helps in continuous integration and application of the DevOps philosophy because it facilitates the automated execution of tests on the software and the promotion among the different existing environments.

It improves security by having separate and isolated containers since if an intruder compromises the application that runs inside a container, its scope is limited to that container and not to the entire system.

It is multi cloud, since in all public and private clouds they have environments that allow the execution of Docker containers.

On the other hand, as the number of containers grows, a system that manages and automates operations with them begins to be needed, which is why platforms such as Kubernetes, Rancher, Openshift appeared …

With containers and the platform for their management, the Greater advantage provided by this technological system, which is dynamic autoscaling depending on the load, very useful for large websites with many visits and with an irregular load. I explain it with an example, if we have a web application of a company where the number of visits is different depending on the time of day, the day of the month or the month of the year, which is normal, with containerization technology we can configure that when the system load grows and exceeds a certain threshold, new containers are installed to absorb this increase in demand and when that load decreases, the created containers are eliminated, thereby using only the necessary resources at all times and thus reducing the cost hardware provisioning.

So far everything very nice but … what do we have in most of the Bitcoin full nodes?

A basic hardware to run a full node along with other applications to extend functionality and facilitate management, are usually basic boards with a processor with few resources, with little CPU and with little RAM. In the case of BCubium even more because our hardware is very limited because we want to have a small node and we are running bitcoin-core, LND, BTC-RPC-Explorer, RTL, the node administration website and some other tool, and We do not see any gain for running it with Docker because:

The applications that are run have been developed by third parties, they already give them fully functional, they install without problems without the need to containerize them.

When they are already installed, they automatically incorporate all the libraries they need and those they need from the Linux operating system with their package system, allowing them to self-install.

We are not going to make modifications to these applications, that is, they are not going to have a development made by us, so I do not have to run any continuous integration system, test batteries, or promotion between environments.

The fact of executing them containerized supposes an extra consumption of resources since each container comes with its own operating system plus the tools that the container management needs, plus the libraries necessary for its execution, causing it to have duplicate libraries and tools in the different containers and in the end forces us to have a system with more powerful hardware when what we want is just the opposite, a minimal system.

For our part, at BGeometrics we carry out a development that is the node administration website, which is a small website, so there is no great profit for developing it using containers and we also have a set of scripts that use many applications and utilities of the operating system and It does not matter that they run in an isolated container because it would mean having to install all these tools in the containers and some of them need to have access to the guest operating system.

Docker execution complicates management as we now have, in addition to having to perform the operation of the installed software, we must monitor the execution of each container and the communications between them, which among other things means that we have to have another network interface in the system. . 

In our case, our system runs on a motherboard and a processor, and we have no interest in running it on a public cloud, so we lose the ease that migration containers bring to the cloud.

There is no point in dynamic autoscaling which is the great advantage of containerization since you are not going to install a system like Kubernetes when we have a few containers, the load is very low and constant and access to applications like BTC-RPC-Explorer or RTL is done very occasionally and by a single person …

Summarizing Docker is a great technology that is already here and will continue with us for a long time, if we add to that the orchestrators like Kubernetes and on these Ranchers, Openshift … we have the complete kit to achieve a customized dimensioning, but in a case like ours where what we want is to run software on minimal hardware we do not need those advantages and we avoid adding complexity to the system and having a greater consumption of resources.

Posted on Leave a comment

Por qué no utilizamos Docker en BCubium full node

Docker es una tecnología de virtualización que permite el empaquetado de una aplicación junto con todas sus dependencias y librerías en un contenedor. Este contenedor de software resultante puede ejecutarse en otras máquinas distintas a donde se creó con la única premisa que tengan el sistema de contenerización de Docker.

La tecnología de contenerización es más eficiente que la de virtualización del sistema operativo completo porque no necesita replicar todo el sistema sino únicamente lo necesario para la ejecución del contenedor. Docker utiliza la tecnología cgroups de Linux para gestionar los recursos de los contenedores y conseguir el aislamiento entre ellos.

Las principales ventajas que nos ofrece la contenerización son las siguientes:

Aporta consistencia, al contener tanto el código de la aplicación como las librerías que utiliza, ya sean propias o de terceros, más el entorno completo de ejecución por ejemplo en una aplicación Java tendríamos el código desarrollado, más todas las librerías que utiliza, más el servidor de aplicaciones completo. Muchos menos puntos de fallo a la hora de ejecutar la aplicación.

Conseguimos estandarización y productividad, al utilizar la misma imagen para todos los entornos, desarrollo, integración, calidad, preproducción, producción o los que haya nos es más sencillo gestionarla, etiquetarla, hacer backups, rollbacks… 

Ayuda en la Integración continua y la aplicación de la filosofía DevOps porque facilita la ejecución automatizada de pruebas sobre el software y la promoción entre los distintos entornos existentes.

Mejora la seguridad al tener contenedores independientes y aislados ya que si un intruso compromete la aplicación que se ejecuta dentro de un contenedor su ámbito de acción se limita a ese contenedor y no a todo el sistema.

Es multi cloud, ya que en todos los clouds públicos y privados tienen entornos que permiten la ejecución de contenedores Docker.

Por contra a medida que el número de contenedores crece se empieza a necesitar un sistema que gestione y automatice las operación con estos y por ello aparecieron plataformas como Kubernetes, Rancher, Openshift…

Con los contenedores más la plataforma para su gestión se consigue la mayor ventaja que nos aporta este sistema tecnológico que es el autoescalado dinámico en función de la carga, muy útil para websites grandes con muchísimas visitas y con una carga irregular. Lo explico con un ejemplo, si tenemos una aplicación web de una empresa donde el número de visitas sea distinto en función de la hora del día, del día del mes o del mes del año, que es lo normal, con la tecnología de contenerización podemos configurar que cuando la carga del sistema crezca y supere un determinado umbral se instancien nuevos contenedores para absorber ese aumento de la demanda y cuando esa carga decrezca se eliminen los contenedores creados consiguiendo con ello utilizar sólo los recursos necesarios en cada momento y así reducir el coste del aprovisionamiento de hardware.

Hasta ahora todo muy bonito pero… ¿qué tenemos en la mayor parte de los Bitcoin full nodes?

Un hardware básico para ejecutar un full node junto con otras aplicaciones para ampliar funcionalidad y facilitar la gestión, normalmente son placas básicas con un procesador con pocos recursos, con poca CPU y con poca RAM. En el caso de BCubium todavía más porque nuestro hardware es muy limitado porque queremos tener un nodo pequeño y en él estamos ejecutando bitcoin-core, LND, BTC-RPC-Explorer, RTL, la web de administración del nodo y alguna herramienta más, y no vemos ninguna ganancia por ejecutarlo con Docker por:

Las aplicaciones que se ejecutan han sido desarrolladas por terceros, ya nos las dan totalmente funcionales, se instalan sin problemas sin necesidad de contenerizarlas.

Cuando se instalan ya auto incorporan todas las librerías que necesitan y las que necesitan del sistema operativo Linux con su sistema de paquetes permite que se autoinstalen.

No vamos a hacer modificaciones sobre estas aplicaciones es decir no van a tener un desarrollo hecho por nosotros por lo que no tengo que ejecutar ningún sistema de integración continua, ni baterías de pruebas, ni promoción entre entornos.

El hecho de ejecutarlas contenerizadas supone un consumo extra de recursos ya que cada contenedor viene con su propio sistema operativo más las herramientas que necesita la gestión de los contenedores, más las librerías necesarias para su ejecución, lo provoca que tenga librerías y herramientas duplicadas en los distintos contenedores y al final nos obliga a tener un sistema con un hardware más potente cuando lo que queremos es justo lo contrario, un sistema mínimo.

Por nuestra parte desde BGeometrics realizamos un desarrollo que es la web de administración del nodo que es un website pequeño por lo que no hay una gran ganancia por desarrollarlo utilizando contenedores y también tenemos un conjunto de scripts que utilizan muchas aplicaciones y utilidades del sistema operativo y que no interesa que se ejecuten en un contenedor aislado porque supondría tener que instalar todas estas herramientas en los contenedores y algunas de ellas necesitan tener acceso al sistema operativo huésped.

La ejecución de Docker complica la gestión ya que tenemos ahora además de tener que realizar la operación del software instalado hay que vigilar la ejecución de cada contenedor y las comunicaciones entre ellos que entre otras cosas significa que tenemos que tener otro interfaz de red en el sistema. 

En nuestro caso nuestro sistema se ejecuta en una placa base y en un procesador y no tenemos ningún interés en ejecutarlo en una cloud pública por lo cual perdemos la facilidad que nos aportan los contenedores de migrado al cloud.

No tiene sentido el autoescalado dinámico que es la gran ventaja de la contenerización ya que no vas a instalar un sistema como Kubernetes cuando tenemos unos pocos contenedores, la carga es muy baja y constante y el acceso a las aplicaciones como BTC-RPC-Explorer o RTL se realiza muy de vez en cuando y por una una única persona…

Resumiendo Docker es una gran tecnología que ya está aquí y va a continuar con nosotros durante un buen tiempo, si a eso le sumamos los orquestadores como Kubernetes y sobre estos Rancher, Openshift… tenemos el kit completo para conseguir un dimensionamiento a medida, pero en un caso como el nuestro donde lo que queremos es ejecutar un software en un hardware mínimo no necesitamos esas ventajas y nos evitamos añadir complejidad al sistema y tener un mayor consumo de recursos.

La versión del artículo en inglés Why don’t we use Docker in BCubium full node

Posted on 1 Comment

BCubium start

We start the journey with BCubium our full node in a wenge wood cube in Indiegogo BCubium, “Bitcoin in wood”

At BGeometrics we want to combine Bitcoin functionality with aesthetics and design. The functionality is provided by Bitcoin Core, Lightning Network Daemon, Wireguard VPN, Tor and the administration of everything on the web that is in BCubium.

All of this is contained in a beautiful wenge cube of only 62 mm (2.4 inches) on each side.

We are not in a good time for full nodes, their number has been decreasing progressively over the last three years, it is a good time to buy one or to give it to a friend and put it decorating your desk or decorating the living room, it is a good gift Bitcoin and also will contribute to the increase of the Bitcoin node network, you can connect to it from your wallet and gain privacy and you will know that it has the complete complete history of the Bitcoin Blockchain, that is to say that there are all the transactions that have taken place since the genesis block.

To have more information it is best to go to the project Bitcoin in wood in Indiegogo or directly to the BGeometrics website.

Posted on Leave a comment

Another full node Bitcoin?

Yes. Summarizing. Full nodes are responsible for verifying transactions and storing them on Blockchain and the more there are, the more secure the Bitcoin network will be and it will show that the Bitcoin project has more support. The Bitcoin network is made up of miners, wallets and full nodes. This project is going to provide full nodes.

The current full node network is: bitnodes.io

If you connect your wallet to your own full node, you will get greater security since entry into the Bitcoin network will be done through your own node thus obtaining greater privacy and avoiding the possibility that any malicious node could identify the IP addresses stored in your wallet. You will have financial sovereignty by having a full and independent node with all the verification rules along with the entire history of the Bitcoin Blockchain.

The larger the offer of full nodes there is in the market, the more people or organizations may be interested in them. BCubium is a full Bitcoin node by the company BGeometrics and it is aimed at the enthusiastic public of the Bitcoin world but without the need of having a technical profile. The rest of the full nodes in the market are aimed more at experts.

BCubium takes great care of the design. The box is made of exotic woods like wengé or ebony, so in addition to having all the operations of a full node, it can be a beautiful object to decorate the house or office and does not have to be hidden behind the television or in a closet. It is a very geeky gift for Bitcoin friends. It is possibly the smallest full node in the world as it is a cube with a 60 mm side.

BCubium is not only a full node, it also has:

  • Wireguard VPN server
  • Lightning Network Daemon (LND)
  • The BTC-RPC-Explorer web client to view block, transaction, and address details, and analysis tools to view statistics on blocks, transactions, and mining activity, a node management website
  • Bitcoin price charts in real time
  • And it will even allow you to write text messages that will last forever in Bitcoin Blockchain

We would like the Bitcoin network not only to be made up of large organizations with high investments and infrastructures. Therefore, we find it interesting that many home users with their elegant full nodes also participate in the Bitcoin network from their homes, offices or wherever they want.