Skip to content

Instantly share code, notes, and snippets.

View hebasto's full-sized avatar
🇺🇦
Bitcoin, Math

Hennadii Stepanov hebasto

🇺🇦
Bitcoin, Math
View GitHub Profile
@hebasto
hebasto / ask.sh
Created July 27, 2018 17:45
Bash General-Purpose Yes/No Prompt Function ("ask")
# This is a general-purpose function to ask Yes/No questions in Bash, either
# with or without a default answer. It keeps repeating the question until it
# gets a valid answer.
ask() {
# https://djm.me/ask
local prompt default reply
while true; do
@hebasto
hebasto / start_electrum.sh
Last active September 8, 2018 09:18
Convenient script to run Electrum on Tails
#!/bin/bash
set -o errexit
#set -o xtrace
#
# start_electrum.sh
#
# This script launches Electrum Bitcoin Wallet on Tails OS.
# Ledger Nano S hardware wallet is supported.
#
# Tails 3.9 (2018-09-04), https://tails.boum.org
@hebasto
hebasto / ThreadSafeMessageBox.md
Last active April 30, 2019 11:21
Details of ThreadSafeMessageBox using in Bitcoin Core

The ThreadSafeMessageBox() messages are rendered in two ways:

  • by noui_ThreadSafeMessageBox() using LogPrintf() and fprintf(stderr, ...) with adding translated type prefix ("Error" / "Warning" / "Information")
  • by BitcoinGUI::message() using QMessageBox with adding translated type suffix ("Error" / "Warning" / "Information") to the window title. Note: On macOS, the window title is ignored (as required by the macOS Guidelines)

The ThreadSafeMessageBox() is called by some functions:

  • AbortNode() and InitRPCAuthentication() pass translated messages with "Error: " prefix
  • FatalError() passes non-translated messages with "Error: " prefix
  • InitError(); some passed messages are translated, some are not
@hebasto
hebasto / bitcoin-builds-meeting-2020-03-18.md
Created March 19, 2020 23:18
IRC #bitcoin-builds meeting on 2020-03-18
@hebasto
hebasto / carbon
Created March 21, 2020 23:28 — forked from fanquake/carbon
dyld: bind: bitcoin-qt:0x10A9BB198 = CarbonCore:_LocaleRefFromLocaleString, *0x10A9BB198 = 0x7FFF3400E559
dyld: bind: bitcoin-qt:0x10A9BB278 = LaunchServices:_ReleaseIconRef, *0x10A9BB278 = 0x7FFF34302CD8
dyld: bind: bitcoin-qt:0x10A9BB298 = CarbonCore:_UCCompareText, *0x10A9BB298 = 0x7FFF33FB5FCB
dyld: bind: bitcoin-qt:0x10A9BB2A0 = CarbonCore:_UCCreateCollator, *0x10A9BB2A0 = 0x7FFF33FB5A14
dyld: bind: bitcoin-qt:0x10A9BB2A8 = CarbonCore:_UCDisposeCollator, *0x10A9BB2A8 = 0x7FFF33FB8C62
dyld: bind: bitcoin-qt:0x10A9BB2B0 = CarbonCore:_UCKeyTranslate, *0x10A9BB2B0 = 0x7FFF33FBBBD0
diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui
index 77e9afe89..8b7080083 100644
--- a/src/qt/forms/debugwindow.ui
+++ b/src/qt/forms/debugwindow.ui
@@ -216,17 +216,17 @@
</widget>
</item>
<item row="7" column="0">
- <widget class="QLabel" name="labelNetwork">
- <property name="font">
@hebasto
hebasto / bitcoincore-hmp.md
Created April 4, 2020 09:59
The Bitcoin Core on Heterogeneous Multi-Processing platforms

The Bitcoin Core on Heterogeneous Multi-Processing platforms

Consider a system on the heterogeneous computing ARM big.LITTLE architecture, e.g., ODROID-HC1 powered by Samsung Exynos 5 Octa 5422.

As the Bitcoin Core is a highly computationally intensive application, the usage of ultra-low power and slower LITTLE cores could lead to a substantial lagging and errors (see: bitcoin/bitcoin#16008).

Also there are report about other flaws in LITTLE cores design.

The suggested solution of the described problem is to force the CPU core affinity of the Bitcoin Core processes. On Linux this could be achieved by the [taskset](https://linux.die.net/man/1/t

@hebasto
hebasto / arm-log.md
Created May 2, 2020 20:39
Testing pr18851 on ODROID-HC1
2020-05-02T19:38:40Z [init] Bitcoin Core version v0.20.99.0-68ef9523d (release build)
2020-05-02T19:38:40Z [init] InitParameterInteraction: parameter interaction: -externalip set -> setting -discover=0
2020-05-02T19:38:40Z [init] Assuming ancestors of block 0000000000000000000f2adce67e49b0b6bdeb9de8b7c3d7e93b21e7fc1e819d have valid signatures.
2020-05-02T19:38:40Z [init] Setting nMinimumChainWork=00000000000000000000000000000000000000000e1ab5ec9348e9f4b8eb8154
2020-05-02T19:38:40Z [init] Using the 'standard' SHA256 implementation
2020-05-02T19:38:40Z [init] Default data directory /home/core/.bitcoin
2020-05-02T19:38:40Z [init] Using data directory /var/lib/bitcoind
2020-05-02T19:38:40Z [init] Config file: /etc/bitcoin/bitcoin.conf
2020-05-02T19:38:40Z [init] Config file arg: debug="rpc"