Skip to content

Commit

Permalink
Merge pull request dashpay#96 from cevap/powerppc
Browse files Browse the repository at this point in the history
[bug][regtest][build][gitian][maintenance][launchpad] Powerppc for launchpad and regtest fix
  • Loading branch information
Cevap Master committed Feb 2, 2019
2 parents cd4ebcb + af4b57b commit 6fdb55f
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 50 deletions.
22 changes: 1 addition & 21 deletions contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ packages:
- "g++-8-riscv64-linux-gnu"
- "gcc-8-riscv64-linux-gnu"
- "binutils-riscv64-linux-gnu"
- "g++-powerpc64le-linux-gnu"
- "g++-8-powerpc64le-linux-gnu"
- "gcc-8-powerpc64le-linux-gnu"
- "binutils-powerpc64le-linux-gnu"
- "g++-mipsel-linux-gnu"
- "g++-8-mipsel-linux-gnu"
- "gcc-8-mipsel-linux-gnu"
- "binutils-mipsel-linux-gnu"
- "g++-sparc64-linux-gnu"
- "g++-8-sparc64-linux-gnu"
- "gcc-8-sparc64-linux-gnu"
- "binutils-sparc64-linux-gnu"
- "g++-alpha-linux-gnu"
- "g++-8-alpha-linux-gnu"
- "gcc-8-alpha-linux-gnu"
- "binutils-alpha-linux-gnu"
- "g++-m68k-linux-gnu"
- "g++-8-m68k-linux-gnu"
- "gcc-8-m68k-linux-gnu"
- "binutils-m68k-linux-gnu"
- "g++-8-multilib"
- "gcc-8-multilib"
- "binutils-gold"
Expand All @@ -58,7 +38,7 @@ files: []
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64le-linux-gnu sparc64-linux-gnu alpha-linux-gnu m68k-linux-gnu"
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu"
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
FAKETIME_HOST_PROGS="gcc g++"
FAKETIME_PROGS="date ar ranlib nm"
Expand Down
2 changes: 1 addition & 1 deletion contrib/init/iond.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# It is not recommended to modify this file in-place, because it will
# be overwritten during package upgrades. If you want to add further
# options or overwrite existing ones then use
# $ systemctl edit bitcoind.service
# $ systemctl edit iond.service
# See "man systemd.service" for details.

# Note that almost all daemon options could be specified in
Expand Down
1 change: 1 addition & 0 deletions depends/packages/qt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ $(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform ion-linux-g++
$(package)_config_opts_s390x_linux += -platform linux-g++ -xplatform linux-g++-64
$(package)_config_opts_powerpc_linux += -platform linux-g++ -xplatform linux-g++-32
$(package)_config_opts_powerpc64le_linux += -platform linux-g++ -xplatform linux-g++-64
$(package)_config_opts_sparc64_linux += -platform linux-g++ -xplatform linux-g++-64
$(package)_config_opts_alpha_linux += -platform linux-g++ -xplatform linux-g++-64
Expand Down
1 change: 1 addition & 0 deletions doc/assets-attribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ Jonas Schnelli
src/qt/res/src/ion.ico, src/qt/res/src/ion.png,
src/qt/res/src/ion_testnet.png, docs/ion_logo_doxygen.png,
src/qt/res/images/splash.png, src/qt/res/images/splash_testnet.png
src/qt/res/images/splash_regtest.png
13 changes: 13 additions & 0 deletions snap/patches/Hardening-measures-disable-PrivateTmp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/contrib/init/iond.service b/contrib/init/iond.service
index b289f5b..43429d3 100644
--- a/contrib/init/iond.service
+++ b/contrib/init/iond.service
@@ -24,7 +24,7 @@ Restart=on-failure
####################

# Provide a private /tmp and /var/tmp.
-PrivateTmp=true
+PrivateTmp=false

# Mount /usr, /boot/ and /etc read-only for the process.
ProtectSystem=full
22 changes: 9 additions & 13 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,30 @@ apps:
command: iond
plugs: [network, network-bind, home]
environment:
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:/var/tmp:$XDG_DATA_DIRS
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS
daemon-testnet:
command: iond --testnet
plugs: [network, network-bind, home]
environment:
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:/var/tmp:$XDG_DATA_DIRS
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS
test-daemon:
command: test_ion
plugs: [network, network-bind, home]
environment:
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:/var/tmp:$XDG_DATA_DIRS
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS
test-qt:
command: test_ion-qt
plugs: [network, network-bind, home]
environment:
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:$XDG_DATA_DIRS
qt:
command: desktop-launch ion-qt
plugs: [network, network-bind, unity7, unity8-calendar, unity8-contacts, desktop, desktop-legacy, wayland, x11, opengl, home]
desktop: ion.desktop
environment:
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:/var/tmp:$XDG_DATA_DIRS
qt-testnet:
command: desktop-launch ion-qt --testnet
plugs: [network, network-bind, unity7, unity8-calendar, unity8-contacts, desktop, desktop-legacy, wayland, x11, opengl, home]
desktop: ion-testnet.desktop
environment:
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:/var/tmp:$XDG_DATA_DIRS
test-qt:
command: desktop-launch test_ion-qt
plugs: [network, network-bind, unity7, unity8-calendar, unity8-contacts, desktop, desktop-legacy, wayland, x11, opengl, home]
desktop: ion.desktop
environment:
XDG_DATA_DIRS: $SNAP_USER_DATA:$SNAP/usr/share:/var/tmp:$XDG_DATA_DIRS
cli:
command: ion-cli
plugs: [network, network-bind, home]
Expand All @@ -88,6 +83,7 @@ parts:
# Additionaly we fix funcs.mk
## Patch - Default home folder
git apply $SNAPCRAFT_STAGE/default_data_dir.patch
git apply $SNAPCRAFT_STAGE/Hardening-measures-disable-PrivateTmp.patch
## Patch - Fix Bug extracting sources without ownership
sed -i 's/tar --strip-components/tar --no-same-owner --strip-components/' $SNAPCRAFT_PART_BUILD/depends/funcs.mk
# Build Dependencies
Expand Down
8 changes: 7 additions & 1 deletion src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ RES_ICONS = \
qt/res/icons/ion.png \
qt/res/icons/ion_testnet.ico \
qt/res/icons/ion_testnet.png \
qt/res/icons/ion_regtest.ico \
qt/res/icons/ion_regtest.png \
qt/res/icons/browse.png \
qt/res/icons/clock1.png \
qt/res/icons/clock2.png \
Expand Down Expand Up @@ -272,7 +274,10 @@ RES_ICONS = \
qt/res/icons/unit_uion.png \
qt/res/icons/unit_tion.png \
qt/res/icons/unit_tmion.png \
qt/res/icons/unit_tuion.png
qt/res/icons/unit_tuion.png \
qt/res/icons/unit_rion.png \
qt/res/icons/unit_rmion.png \
qt/res/icons/unit_ruion.png

BITCOIN_QT_BASE_CPP = \
qt/bantablemodel.cpp \
Expand Down Expand Up @@ -353,6 +358,7 @@ RES_IMAGES = \
qt/res/images/about.png \
qt/res/images/splash.png \
qt/res/images/splash_testnet.png \
qt/res/images/splash_regtest.png \
qt/res/images/ion_logo_horizontal.png \
qt/res/images/downArrow_dark.png \
qt/res/images/downArrow_small_dark.png \
Expand Down
36 changes: 25 additions & 11 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,17 +388,32 @@ class CRegTestParams : public CTestNetParams
pchMessageStart[2] = 0x39;
pchMessageStart[3] = 0x9e;
nSubsidyHalvingInterval = 150;
nEnforceBlockUpgradeMajority = 750;
nRejectBlockOutdatedMajority = 950;
nToCheckBlockUpgradeMajority = 1000;
nEnforceBlockUpgradeMajority = 4320; // 75%
nRejectBlockOutdatedMajority = 5472; // 95%
nToCheckBlockUpgradeMajority = 5760; // 4 days
nMinerThreads = 1;
nTargetTimespanMidas = 7 * 24 * 60 * 60; // 1 week
nTargetTimespanDGW = 24 * 60 * 60; // ION: 1 day
nTargetTimespanDGW = 24 * 60 * 60; // ION: 1 day
nTargetSpacing = 1 * 60; // ION: 1 minutes
bnProofOfWorkLimit = ~uint256(0) >> 1;
nLastPOWBlock = 850;
nMasternodeCountDrift = 4;
nModifierUpdateBlock = 51197; //approx Mon, 17 Apr 2017 04:00:00 GMT
nMaxMoneyOut = 38600000 * COIN;
nZerocoinStartHeight = 1;
nZerocoinStartTime = 1521414629;
nBlockEnforceSerialRange = 10000000; //Enforce serial range starting this block
nBlockRecalculateAccumulators = 10000000; //Trigger a recalculation of accumulators
nBlockFirstFraudulent = 99999999; //First block that bad serials emerged
nBlockLastGoodCheckpoint = 10000000; //Last valid accumulator checkpoint
nBlockEnforceInvalidUTXO = 10000000; //Start enforcing the invalid UTXO's
nInvalidAmountFiltered = 0; //Amount of invalid coins filtered through exchanges, that should be considered valid
nBlockZerocoinV2 = 1000; //!> The block that zerocoin v2 becomes active
nEnforceNewSporkKey = 1545361200; //!> Sporks signed after 12/21/2018 @ 3:00am (UTC) must use the new spork key
nRejectOldSporkKey = 1545620400; //!> Reject old spork key after 12/24/2018 @ 3:00am (UTC)

nMidasStartHeight = 75000;
nMidasStartTime = 1497209344;
nMidasStartHeight = 99999999;
nMidasStartTime = 9997209344;
nDGWStartHeight = nZerocoinStartHeight;
nDGWStartTime = nZerocoinStartTime;

Expand All @@ -416,13 +431,12 @@ class CRegTestParams : public CTestNetParams
genesis.vtx.push_back(txNew);

genesis.hashMerkleRoot = genesis.BuildMerkleTree();
genesis.nNonce = 1603027; // hex 57 47 52 in text = ION
genesis.nBits = 0x1e00ffff;
genesis.nNonce = 574752; // hex 57 47 52 in text = ION
genesis.nBits = 0x207ffff;

hashGenesisBlock = genesis.GetHash();
nDefaultPort = 34567;
assert(hashGenesisBlock == uint256("0x0000002bed128b6b2a62bd8edd4e6f8a414eac38e256aa0194adb8c93fe18132"));
// assert(genesis.hashMerkleRoot == uint256("0xa5858fca488dee5e9a0cd0a33287e1049ddf8e0065779a0aacc54581dbeaf59f"));
assert(hashGenesisBlock == uint256("0x47c7c6267ccd4a73c21c696d4bc004f74edc172a470c9c5a4201aa8d3196f99e"));

vFixedSeeds.clear(); //! Testnet mode doesn't have any fixed seeds.
vSeeds.clear(); //! Testnet mode doesn't have any DNS seeds.
Expand All @@ -437,7 +451,7 @@ class CRegTestParams : public CTestNetParams
nPoolMaxTransactions = 2;
strSporkKey = "0430b1f83d3acb90cde0b7e0e1d9365c00bfaf04ab8614457cfa0766a787239dd47ad6ca478659dd5e401fccb7fea6fa83acad23a2c7b451aafe6fa2ae4cfd4a58";
strSporkKeyOld = "0470e14fc60a25e0eb4f6b1fe280e4c3f9427f7bb8b38f14a0c310c2e56402bdce0f25049bf22351dc3d07f389d4d433b339d8e1b991784f11df68f50340185c1d";
strObfuscationPoolDummyAddress = "TMPUBzcsHZawA32XYYDF9FHQp6icv492CV";
strObfuscationPoolDummyAddress = "g9gvvemz52aDkRn4iiGrzTbBRS1HiqcY9r";
nStartMasternodePayments = 1558696183; // GMT: Thursday, 15. February 2018 12:03:03
nBudget_Fee_Confirmations = 3; // Number of confirmations for the finalization fee. We have to make this very short
// here because we only have a 8 block finalization window on testnet
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3194,7 +3194,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
}

//Check that the block does not overmint
if (!IsBlockValueValid(block, nExpectedMint, pindex->nMint)) {
if (!IsBlockValueValid(block, nExpectedMint, pindex->nMint) && Params().NetworkID() != CBaseChainParams::REGTEST) {
return state.DoS(100, error("ConnectBlock() : reward pays too much (actual=%s vs limit=%s)",
FormatMoney(pindex->nMint), FormatMoney(nExpectedMint)),
REJECT_INVALID, "bad-cb-amount");
Expand Down
2 changes: 1 addition & 1 deletion src/pow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
return error("CheckProofOfWork() : nBits below minimum work");

// Check proof of work matches claimed amount
if (hash > bnTarget)
if (hash > bnTarget && Params().NetworkID() != CBaseChainParams::REGTEST)
return error("CheckProofOfWork() : hash doesn't match nBits");

return true;
Expand Down
5 changes: 5 additions & 0 deletions src/qt/ion.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<file alias="editcopy">res/icons/editcopy.png</file>
<file alias="add">res/icons/add.png</file>
<file alias="bitcoin_testnet">res/icons/ion_testnet.png</file>
<file alias="bitcoin_regtest">res/icons/ion_regtest.png</file>
<file alias="edit">res/icons/edit.png</file>
<file alias="history">res/icons/history.png</file>
<file alias="overview">res/icons/overview.png</file>
Expand All @@ -47,6 +48,9 @@
<file alias="unit_tion">res/icons/unit_tion.png</file>
<file alias="unit_tmion">res/icons/unit_tmion.png</file>
<file alias="unit_tuion">res/icons/unit_tuion.png</file>
<file alias="unit_rion">res/icons/unit_rion.png</file>
<file alias="unit_rmion">res/icons/unit_rmion.png</file>
<file alias="unit_ruion">res/icons/unit_ruion.png</file>
<file alias="lock_closed">res/icons/lock_closed.png</file>
<file alias="lock_open">res/icons/lock_open.png</file>
<file alias="key">res/icons/key.png</file>
Expand Down Expand Up @@ -79,6 +83,7 @@
<file alias="walletFrame">res/images/walletFrame.png</file>
<file alias="splash">res/images/splash.png</file>
<file alias="splash_testnet">res/images/splash_testnet.png</file>
<file alias="splash_regtest">res/images/splash_regtest.png</file>
</qresource>
<qresource prefix="/movies">
<file alias="spinner-000">res/movies/spinner-000.png</file>
Expand Down
2 changes: 1 addition & 1 deletion src/qt/networkstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static const struct {
} network_styles[] = {
{"main", QAPP_APP_NAME_DEFAULT, ":/icons/bitcoin", "", ":/images/splash"},
{"test", QAPP_APP_NAME_TESTNET, ":/icons/bitcoin_testnet", QT_TRANSLATE_NOOP("SplashScreen", "[testnet]"), ":/images/splash_testnet"},
{"regtest", QAPP_APP_NAME_TESTNET, ":/icons/bitcoin_testnet", "[regtest]", ":/images/splash_testnet"}};
{"regtest", QAPP_APP_NAME_TESTNET, ":/icons/bitcoin_regtest", QT_TRANSLATE_NOOP("SplashScreen", "[regtest]"), ":/images/splash_regtest"}};
static const unsigned network_styles_count = sizeof(network_styles) / sizeof(*network_styles);

// titleAddText needs to be const char* for tr()
Expand Down
Binary file added src/qt/res/icons/ion_regtest.ico
Binary file not shown.
Binary file added src/qt/res/icons/ion_regtest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/qt/res/icons/unit_rion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/qt/res/icons/unit_rmion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/qt/res/icons/unit_ruion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/qt/res/src/unit_rion.xcf
Binary file not shown.
Binary file added src/qt/res/src/unit_rmion.xcf
Binary file not shown.
Binary file added src/qt/res/src/unit_ruion.xcf
Binary file not shown.
Binary file added src/qt/res/src/unit_tmion.xcf
Binary file not shown.

0 comments on commit 6fdb55f

Please sign in to comment.