Git Product home page Git Product logo

microbitcoinorg / microbitcoin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bitcoin/bitcoin

20.0 15.0 18.0 190.77 MB

MicroBitcoin

Home Page: http://microbitcoin.org

License: MIT License

Makefile 0.92% Shell 1.27% M4 1.55% QMake 0.01% Python 18.52% C++ 67.23% C 9.36% HTML 0.16% Objective-C++ 0.04% Assembly 0.21% Java 0.01% Sage 0.30% Scheme 0.20% CMake 0.22% Cap'n Proto 0.01% Dockerfile 0.01%

microbitcoin's Introduction

MicroBitcoin Technical Specs

New network is using Bitcoin Core 22 codebase and include following features:

  • UTXO Snapshot from legacy network from block 525001 (first MBC block) to most recent block at the moment of new network start.
  • New emission schedule
  • Smaller block size
  • YesPower Proof-of-Work algorightm
  • Taproot activation

Prerequisites

There couple reasons which prerequisites for launching new network:

  • Launch of new network will create natural growth of userbase.
  • Current total MBC supply is over-minted for the current userbase. To improve this situation coins which haven't been moved since hardfork will be burned and block emission schedule will be adjusted which would create more fair distributrion of supply.
  • Inefficiently slow validation of new blocks caused by RFv2 PoW algorightm.
  • Premine will be locked with OP_CHECKLOCKTIMEVERIFY output script.

UTXOs snapshot

Snapshot will be done in following maner: all UTXO set starting after block 525000 (fist MBC block) to most recent block at the moment of new network start will be copied and merged. For example if you had 3 unspent outputs on your address in old network, they will be merged into one output with sum amount. All merged outputs will be set into genesis block of new network. To make them spendable genesis block will be added to database as an actual block.

Example:

Output #1
Script: OP_DUP OP_HASH160 84169602ccd51a35c2ba54bb209320dddce62660 OP_EQUALVERIFY OP_CHECKSIG
Amount: 3700000

Output #2
Script: OP_DUP OP_HASH160 84169602ccd51a35c2ba54bb209320dddce62660 OP_EQUALVERIFY OP_CHECKSIG
Amount: 120000

Output #3
Script: OP_DUP OP_HASH160 84169602ccd51a35c2ba54bb209320dddce62660 OP_EQUALVERIFY OP_CHECKSIG
Amount: 34052

Will be merged:

Merged output
Script: OP_DUP OP_HASH160 84169602ccd51a35c2ba54bb209320dddce62660 OP_EQUALVERIFY OP_CHECKSIG
Amount: 3854052

Emission

Reward for each new block will be calculated using following function:

#include <iostream>
#include <cmath>

// Amounts of satoshit per coins
const int64_t COIN = 10000;

int64_t reward(int height) {
	// Initial reward per block
	const int64_t reward = 5500 * COIN;
	// Reward decreasing epoch (2 years)
	const int epoch = 525960 * 2;
	// Decrease amount by 30% each epoch
	const long double r = 1 + (std::log(1 - 0.3) / epoch);
	return reward * std::pow(r, height);
}

Graph for reward and total supply:

Emission

Block size

To make network more reliable, prevent block spamming and create better fee market block size will be decreased to 300kb.

Reference implementation.

Power2b PoW

Rainforest v2 aka RFv2 is causing inefficiently slow validation of blocks thats why YesPower was picked as new PoW algo.

Yespower in particular is designed to be CPU-friendly, GPU-unfriendly, and FPGA/ASIC-neutral. In other words, it's meant to be relatively efficient to compute on current CPUs and relatively inefficient on current GPUs. Unfortunately, being GPU-unfriendly also means that eventual FPGA and ASIC implementations will only compete with CPUs, and at least ASICs will win over the CPUs (FPGAs might not because of this market's peculiarities - large FPGAs are even more "over-priced" than large CPUs are), albeit by far not to the extent they did e.g. for Bitcoin and Litecoin.

We are using Power2b modification which is replaces sha256 with blake2b.

Source.

microbitcoin's People

Contributors

cryptozeny avatar itwysgsl avatar volbil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microbitcoin's Issues

갑자기 make 에러 뜨는데요?

CXX libbitcoin_common_a-chainparams.o
CXX libbitcoin_common_a-coins.o
chainparams.cpp: In constructor ‘CMainParams::CMainParams()’:
chainparams.cpp:117:19: error: ‘struct Consensus::Params’ has no member named ‘replyFixHeight’
consensus.replyFixHeight = 999999999;
^
chainparams.cpp: In constructor ‘CTestNetParams::CTestNetParams()’:
chainparams.cpp:244:19: error: ‘struct Consensus::Params’ has no member named ‘replyFixHeight’
consensus.replyFixHeight = 999999999;
^
chainparams.cpp: In constructor ‘CRegTestParams::CRegTestParams()’:
chainparams.cpp:340:19: error: ‘struct Consensus::Params’ has no member named ‘replyFixHeight’
consensus.replyFixHeight = 999999999;
^
Makefile:5064: recipe for target 'libbitcoin_common_a-chainparams.o' failed
make[2]: *** [libbitcoin_common_a-chainparams.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/root/MicroBitcoin/src'
Makefile:9347: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/MicroBitcoin/src'
Makefile:747: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

MicroBitcoin version v2.1.0.0-16aae3e (64-bit)

Wallet not able to synch - 5 days behind

My current micro.conf file :

addnode=54.169.196.33:6403
addnode=52.52.107.217:6403
addnode=13.57.248.201:6403
addnode=52.78.59.6:6403
addnode=52.79.198.217:6403
addnode=122.57.100.174:6403
addnode=46.23.35.70:6403
addnode=54.180.14.12:6403
addnode=207.148.28.6:6403
addnode=176.9.102.244:6403
addnode=107.150.60.146:6403
addnode=86.57.193.186:6403
addnode=94.50.162.164:6403
addnode=112.218.69.202:6403
addnode=194.19.235.71:6403
addnode=85.25.133.32:6403
addnode=95.179.163.111:6403
addnode=88.99.192.38:6403
addnode=5.196.66.162:6403
addnode=144.217.73.92:6403
addnode=69.197.128.74:6403
addnode=211.39.150.242:6403
addnode=34.201.170.73:6403
addnode=45.77.149.219:6403
addnode=18.191.69.189:6403
addnode=211.39.150.241:6403
addnode=64.113.174.186:6403
addnode=195.201.212.176:6403
addnode=163.172.11.62:6403
addnode=52.53.141.12:6403
addnode=95.216.33.111:6403
addnode=52.194.177.217:6403
addnode=207.180.248.77:6403

make check fail

$ make check
Making check in src
make[1]: Entering directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/src'
make[2]: Entering directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/src'
make[3]: Entering directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin'
make[3]: Leaving directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin'
make  check-TESTS
make[3]: Entering directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/src'
make[4]: Entering directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/src'
make[5]: Entering directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin'
make[5]: Leaving directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin'
FAIL: test/test_microbitcoin
PASS: qt/test/test_microbitcoin-qt
============================================================================
Testsuite summary for MicroBitcoin 0.16.3
============================================================================
# TOTAL: 2
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See src/test-suite.log
Please report to https://github.com/MicroBitcoinOrg/MicroBitcoin/issues
============================================================================
Makefile:9542: recipe for target 'test-suite.log' failed
make[4]: *** [test-suite.log] Error 1
make[4]: Leaving directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/src'
Makefile:9648: recipe for target 'check-TESTS' failed
make[3]: *** [check-TESTS] Error 2
make[3]: Leaving directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/src'
Makefile:9753: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/src'
Makefile:9435: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/src'
Makefile:747: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1
$

MBC Wallet Security

Hi and sorry for my english, I use Micro-Qt 3.0 wallet on windows and I have this question (proposal):

Why the wallet never ask for the password after closing and reopen? (I have a encrypted wallet ) Imagine if someone stoling or have acces on PC.

Thank you

Network is unreachable

Hello,

The current block stops at 579999 and does not go up.

2018-10-17 02:18:07 UpdateTip: new best=000000000002ee3d397b986c21337bb7e0bc846280a49446146238254d06bafa height=579999 version=0x20000000 log2_work=88.912214 tx=319299439 date='2018-09-12 02:43:12' progress=0.967931 cache=231.1MiB(1339019txo)
2018-10-17 02:18:27 connect() to [2804:14c:5b94:86bb:ad32:563c:4f2a:72e4]:6403 failed: Network is unreachable (101)
2018-10-17 02:18:28 connect() to 115.93.29.38:6403 failed after select(): Connection refused (111)
2018-10-17 02:18:45 connect() to [2804:14c:5b94:86bb:10bf:d4c9:d1ab:8914]:6403 failed: Network is unreachable (101)
2018-10-17 02:18:58 connect() to [2804:14c:5b94:86bb:9d34:3705:1c42:8af5]:6403 failed: Network is unreachable (101)
2018-10-17 02:19:23 connect() to 195.201.212.176:6403 failed after select(): Connection refused (111)
2018-10-17 02:19:30 Timeout downloading headers from peer=85, disconnecting
2018-10-17 02:19:35 connect() to 115.93.29.34:6403 failed after select(): Connection refused (111)
2018-10-17 02:19:37 connect() to 46.28.70.225:6403 failed after select(): Connection refused (111)
2018-10-17 02:20:02 connect() to [2804:14c:5b94:86bb:dc0:3e10:1714:669f]:6403 failed: Network is unreachable (101)
2018-10-17 02:20:41 connect() to [240e:100:39:1bf:1cf0:92d5:8f9c:c112]:6403 failed: Network is unreachable (101)
2018-10-17 02:20:51 connect() to [2804:14c:5b94:86bb:ad1f:7b7a:5815:5b4d]:6403 failed: Network is unreachable (101)
2018-10-17 02:20:58 connect() to [2a02:c207:2017:8232::1]:6403 failed: Network is unreachable (101)
2018-10-17 02:21:00 connect() to 175.193.245.156:6403 failed after select(): Connection refused (111)

How can I fix it?

QT welcome message

image

Hi MBCdevs,

I run MBC for the first time, but it seems you need to fix it. 😃

test_runner.py fail

$ ./test/functional/test_runner.py 
Temporary test directory at /tmp/bitcoin_test_runner_20190219_155608
Traceback (most recent call last):
  File "./test/functional/test_runner.py", line 532, in <module>
    main()
  File "./test/functional/test_runner.py", line 270, in main
    run_tests(test_list, config["environment"]["SRCDIR"], config["environment"]["BUILDDIR"], config["environment"]["EXEEXT"], tmpdir, args.jobs, args.coverage, passon_args)
  File "./test/functional/test_runner.py", line 304, in run_tests
    subprocess.check_output([tests_dir + 'create_cache.py'] + flags + ["--tmpdir=%s/cache" % tmpdir])
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 708, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/test/functional/create_cache.py', '--srcdir=/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/src', '--configfile=/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/test/functional/../config.ini', '--cachedir=/home/ak/git/TEST-OTHER-COIN/MicroBitcoin/test/cache', '--tmpdir=/tmp/bitcoin_test_runner_20190219_155608/cache']' returned non-zero exit status 1
$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.