Anyone could get 45 bitcoins without knowing private key

Anyone could get 45 bitcoins without knowing private key

Intro For several weeks I tried to play around bitcoin script. Yes, this may be news to you but bitcoin have a scripting language that acts as a very simple smart contract. This is an interesting topic because it reveals the internals of Bitcoin. What you should know is that bitcoins script is a scripting system for transactions. Forth-like, Script is simple, stack-based, and processed from left to right. It is intentionally not Turing-complete, with no loops. ...

December 10, 2022 · 10 min · Vadzim Belski
Start Learning Rust programming language

Start Learning Rust programming language

Intro Rust is a modern programming language that focuses on thread-safety and performance. Unlike in many higher-level programming languages, there is neither a garbage collection nor a virtual machine in Rust. Instead, Rust addresses known problems of long-established low-level programming languages such as C or C++. At the same time, the programming language is known for its steep learning curve, which makes many developers shy away from delving into Rust. We provide four reasons to show that Rust, despite its complexity, has benefits that will make your work (and live) with the language easier. ...

December 3, 2022 · 1 min · Vadzim Belski
Crypto billing system, Monitoring transactions and derrive addresses in Rust for Bitcoin, Ethereum, Solana and Polkadot

Crypto billing system, Monitoring transactions and derrive addresses in Rust for Bitcoin, Ethereum, Solana and Polkadot

Intro Great weekend for great research followup. This article is about how to implement billing system different crypto currencies using Rust pogramming language. Before getting deeper into the details of implementation o would like to define what is standing under the term “billing system” for crypto currencies. Crypto Billing system is a software that us used to organize crypto payments in your organization. It is designed to create derevative addresses (one time payment addresses) and monitor incoming transactions executing business logic for your organization. Typically the scenario could be the following: ...

December 2, 2022 · 9 min · Vadzim Belski
The foreign function interface to call Rust library from Golang

The foreign function interface to call Rust library from Golang

Intro Imagin that you have a project written in C/C++ or even Rust and you would like to call functions from this project library in your Golang application. Wonderful thign is that there is a solution for that called FFI. A foreign function interface (FFI) is a mechanism by which a program written in one programming language can call routines or make use of services written in another. The primary function of a foreign function interface is to mate the semantics and calling conventions of one programming language (the host language, or the language which defines the FFI), with the semantics and conventions of another (the guest language). This process must also take into consideration the runtime environments and/or application binary interfaces of both. This can be done in several ways: ...

August 24, 2022 · 6 min · Vadzim Belski
The Dining Philosophers Problem

The Dining Philosophers Problem

Intro I would like to share classical problem with philosophers. This classic problem shows the various elements of parallelism. The complexity of the implementation of the task lies in the fact that a simple implementation can go into a hopeless state. The problem is defined like this: In ancient times, wealthy philanthropists invited five eminent philosophers to visit. Each of them was given a room in which they could engage in their professional activity—thinking. There was also a common dining room, where there was a large round table, and five chairs around it. Each chair had a plaque with the name of the philosopher who was supposed to sit on it. To the left of each philosopher was a golden fork, and in the center of the table was a large bowl of spaghetti, which was constantly replenished. As befits philosophers, they spent most of their time in thought. But one day they felt hungry and went to the dining room. Everyone sat down on their chair, took a fork and stuck it into the bowl of spaghetti. But the nature of tangled spaghetti is such that a second fork is needed to push the spaghetti into the mouth. That is, the philosopher also needed a fork to his right. The philosophers put down their forks and got up from the table, continuing to think. After all, the fork can only be used by one philosopher at a time. If another philosopher wants to take it, then he will have to wait until she is released. ...

August 16, 2022 · 8 min · Vadzim Belski