Alguien ha cogido el BIP 148 propuesto por shaolinfry y ha hecho un
fork (en el sentido de código fuente
) de bitcoin core implementándolo. En
bitnodes se puede ver que ya hay unos cuantos nodos ejecutando este código. Ahora no sale pero antes había uno de Barcelona, gracias!!
Me he bajado el fuente de core y el de core+bip148:
$ git clone https://github.com/bitcoin/bitcoin.git bitcoin-core
Cloning into 'bitcoin-core'...
remote: Counting objects: 89168, done.
remote: Total 89168 (delta 0), reused 0 (delta 0), pack-reused 89167
Receiving objects: 100% (89168/89168), 78.18 MiB | 1.64 MiB/s, done.
Resolving deltas: 100% (66482/66482), done.
Checking connectivity... done.
$ git clone https://github.com/UASF/bitcoin.git bitcoin-UASF
Cloning into 'bitcoin-UASF'...
remote: Counting objects: 89176, done.
remote: Total 89176 (delta 0), reused 0 (delta 0), pack-reused 89175
Receiving objects: 100% (89176/89176), 78.18 MiB | 299.00 KiB/s, done.
Resolving deltas: 100% (66488/66488), done.
Checking connectivity... done.
Cambié a la rama 0.14 en ambos repositorios:
$ cd bitcoin-core
$ git checkout 0.14
Branch 0.14 set up to track remote branch 0.14 from origin.
Switched to a new branch '0.14'
$ cd ..
$ cd bitcoin-UASF
$ git checkout 0.14
Branch 0.14 set up to track remote branch 0.14 from origin.
Switched to a new branch '0.14'
$ cd ..
Comprobé las diferencias entre core y core+bip148:
$ diff -urpN bitcoin-core bitcoin-UASF
[blah blah cosas de git]
diff -urpN bitcoin-core/src/clientversion.cpp bitcoin-UASF/src/clientversion.cpp
--- bitcoin-core/src/clientversion.cpp 2017-03-26 00:33:00.222894462 +0000
+++ bitcoin-UASF/src/clientversion.cpp 2017-03-26 00:40:56.349650311 +0000
@@ -13,7 +13,7 @@
* for both bitcoind and bitcoin-core, to make it harder for attackers to
* target servers or GUI users specifically.
*/
-const std::string CLIENT_NAME("Satoshi");
+const std::string CLIENT_NAME("Satoshi BIP148");
/**
* Client version number
@@ -82,8 +82,8 @@ std::string FormatFullVersion()
return CLIENT_BUILD;
}
-/**
- * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki)
+/**
+ * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki)
*/
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments)
{
diff -urpN bitcoin-core/src/validation.cpp bitcoin-UASF/src/validation.cpp
--- bitcoin-core/src/validation.cpp 2017-03-26 00:40:49.453668289 +0000
+++ bitcoin-UASF/src/validation.cpp 2017-03-26 00:40:56.397650186 +0000
@@ -1851,6 +1851,13 @@ bool ConnectBlock(const CBlock& block, C
flags |= SCRIPT_VERIFY_NULLDUMMY;
}
+ // mandatory segwit activation between Oct 1st 2017 and Nov 15th 2017 inclusive
+ if (pindex->GetMedianTimePast() >= 1506816000 && pindex->GetMedianTimePast() <= 1510704000 && !IsWitnessEnabled(pindex->pprev, chainparams.GetConsensus())
+ if (!((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (pindex->nVersion & VersionBitsMask(chainparams.GetConsensus(), Consensus::D
+ return state.DoS(0, error("ConnectBlock(): relayed block must signal for segwit, please upgrade"), REJECT_INVALID, "bad-no-segwit");
+ }
+ }
+
int64_t nTime2 = GetTimeMicros(); nTimeForks += nTime2 - nTime1;
LogPrint("bench", " - Fork checks: %.2fms [%.2fs]\n", 0.001 * (nTime2 - nTime1), nTimeForks * 0.000001);
Y a compilarrrrr:
$ cd bitcoin-UASF
$ ./autogen.sh
$ ./configure --without-miniupnpc --disable-wallet --without-gui
$ time make -j 3
$ file src/bitcoind
src/bitcoind: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=1a4233b81430d232090c7dd53895121064520914, not stripped