Compare commits
179 commits
Author | SHA1 | Date | |
---|---|---|---|
31afd13311 | |||
b6abd84935 | |||
90f5b87806 | |||
d700e9a1a2 | |||
0c09e2a57a | |||
97c98cf0a6 | |||
df8adf098e | |||
09f86e7494 | |||
b4b98d7ad0 | |||
434ae2d95e | |||
3f6754262e | |||
efbd5271b7 | |||
2b543db997 | |||
7750dba2c6 | |||
28989f1dc4 | |||
e92aba9190 | |||
0f7c23e1e5 | |||
b5d69ab693 | |||
0e917fcf1b | |||
a92f2dcde4 | |||
d2b1a61753 | |||
49e947f282 | |||
6c752caf90 | |||
abb99e6ddb | |||
6c053f4bc6 | |||
fbf07173b4 | |||
4213f7584b | |||
5280e456f5 | |||
56c2ac1263 | |||
60618c5099 | |||
5bb3112c68 | |||
ba2c8c0fa6 | |||
8e4ea27962 | |||
2076361f88 | |||
d3d688deae | |||
5df1b6af3e | |||
c86f68df76 | |||
27ac4a1e79 | |||
097d87df2f | |||
85226b80bd | |||
2291b6a7cc | |||
e90d4437a2 | |||
8efd7e62bd | |||
c2532d3f6a | |||
e254dd665b | |||
8971b04ae8 | |||
4c94a061c0 | |||
c3cead8737 | |||
b2a55984f8 | |||
c909ac2e09 | |||
1ec3f19fc0 | |||
12202c61bb | |||
9e6a8bc5c4 | |||
2e082af18e | |||
71edb4cc79 | |||
ca6297be97 | |||
16761956ce | |||
791be7b57d | |||
1eede33ce8 | |||
79f5d63fa6 | |||
57446a21f6 | |||
cc082a7678 | |||
976474f28b | |||
edd0da7968 | |||
d81d2329f2 | |||
d29583af8f | |||
0d563c7dcd | |||
35754ca98f | |||
38aba25232 | |||
3e2ce7b7aa | |||
1d231e1d9f | |||
32c55e2ac8 | |||
4bcd9daf5d | |||
a5fc0d8f56 | |||
fdd1211cdd | |||
2c71909290 | |||
6286491490 | |||
e481bf28bb | |||
b945c0b208 | |||
e6e2f460c3 | |||
dbb81ea357 | |||
40d2a4ea42 | |||
60f821fe73 | |||
7739221064 | |||
b5b1e0426a | |||
2cdacb07ab | |||
c338c5e6c4 | |||
7f33b17cd1 | |||
6912d93940 | |||
a72aba3bea | |||
1806f0965e | |||
0ff5375296 | |||
a4d965547e | |||
6173ca37cd | |||
fd6da81954 | |||
2799811ab1 | |||
84157f3df2 | |||
e83ddb7e8f | |||
c05cd54411 | |||
5f390bde2a | |||
56bc526b59 | |||
8632c83881 | |||
8e326ac96b | |||
7dae118b0a | |||
d1075955b2 | |||
bef1ae5f3c | |||
a8c035e88f | |||
aae64a9937 | |||
0c92645c9c | |||
5dd1a6283b | |||
d8809182e6 | |||
a7ed71e78f | |||
4598ec33fc | |||
10f64e120e | |||
b4569c0730 | |||
557a921835 | |||
6003cdea85 | |||
16764d6e80 | |||
dcc22f1696 | |||
0d0c5e5a7f | |||
5dee6f61b1 | |||
52f2f3c72b | |||
fccd2b46b6 | |||
c31ff0f095 | |||
bde7442526 | |||
19c4ff8cb9 | |||
0fb46507b3 | |||
065574d672 | |||
08e7d784da | |||
478115a63b | |||
029c83da14 | |||
c2c71b2f21 | |||
14a7cd1ba1 | |||
f1acd77583 | |||
8caee7ecee | |||
7b27476601 | |||
043ce9a2c2 | |||
cbc3aaeed8 | |||
61c1cf3a3c | |||
15f0fc62ac | |||
36e39a395d | |||
661197f502 | |||
13a5cc8589 | |||
dd18d5c962 | |||
0589466f76 | |||
9508da5d81 | |||
b0d9b4627a | |||
36d8b7bd72 | |||
c6f3cbbf49 | |||
88e79c9cc5 | |||
1b9bc8fada | |||
07406ddd36 | |||
9c6af6d841 | |||
7a0b3034c7 | |||
7cd56df174 | |||
97190c0ae6 | |||
16a2776ea8 | |||
84be09269b | |||
03a7605d8a | |||
18dbe3291b | |||
6efc333ffe | |||
24d9b1c4e3 | |||
f8a5488be3 | |||
3564eebeca | |||
523d346857 | |||
82ed8e0cc5 | |||
5f41105096 | |||
b8dcff1104 | |||
622d1cc126 | |||
d8643a4129 | |||
a9a5736df8 | |||
aeccc23943 | |||
1a6738f920 | |||
7a83a2363f | |||
20d2cbc2fe | |||
beccd79ca4 | |||
6591f8ed67 | |||
d5446c1a27 | |||
25dada932a |
72
.github/workflows/ci.yml
vendored
72
.github/workflows/ci.yml
vendored
|
@ -28,6 +28,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
name:
|
||||
- aarch64-linux
|
||||
- armhf-linux
|
||||
- i686-linux
|
||||
- i686-win
|
||||
|
@ -35,74 +36,107 @@ jobs:
|
|||
- x86_64-linux-nowallet
|
||||
- x86_64-macos
|
||||
- x86_64-win
|
||||
- x86_64-linux-experimental
|
||||
include:
|
||||
- name: i686-linux
|
||||
host: i686-pc-linux-gnu
|
||||
os: ubuntu-20.04
|
||||
os: ubuntu-18.04
|
||||
packages: g++-multilib bc python3-zmq
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: true
|
||||
dep-opts: "NO_QT=1"
|
||||
config-opts: "--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
|
||||
config-opts: "--enable-zmq --enable-glibc-back-compat LDFLAGS=-static-libstdc++"
|
||||
goal: install
|
||||
- name: armhf-linux
|
||||
host: arm-linux-gnueabihf
|
||||
os: ubuntu-20.04
|
||||
os: ubuntu-18.04
|
||||
packages: g++-arm-linux-gnueabihf
|
||||
run-tests: false
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: "NO_QT=1"
|
||||
config-opts: "--enable-glibc-back-compat --enable-reduce-exports --disable-tests"
|
||||
config-opts: "--enable-glibc-back-compat --disable-tests LDFLAGS=-static-libstdc++"
|
||||
goal: install
|
||||
- name: aarch64-linux
|
||||
host: aarch64-linux-gnu
|
||||
os: ubuntu-18.04
|
||||
packages: g++-aarch64-linux-gnu
|
||||
run-tests: false
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: "NO_QT=1"
|
||||
config-opts: "--enable-zmq --enable-glibc-back-compat --disable-tests LDFLAGS=-static-libstdc++"
|
||||
goal: install
|
||||
- name: x86_64-linux-nowallet
|
||||
host: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-20.04
|
||||
os: ubuntu-18.04
|
||||
packages: python3
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: true
|
||||
dep-opts: "NO_WALLET=1"
|
||||
config-opts: "--enable-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --disable-wallet"
|
||||
config-opts: "--enable-gui=qt5 --enable-glibc-back-compat --disable-wallet LDFLAGS=-static-libstdc++"
|
||||
goal: install
|
||||
- name: x86_64-linux-dbg
|
||||
host: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-20.04
|
||||
os: ubuntu-18.04
|
||||
packages: bc python3-zmq
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: "DEBUG=1"
|
||||
config-opts: "--enable-gui=qt5 --enable-zmq --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER"
|
||||
config-opts: "--enable-gui=qt5 --enable-zmq --enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
|
||||
goal: install
|
||||
- name: i686-win
|
||||
host: i686-w64-mingw32
|
||||
arch: "i386"
|
||||
os: ubuntu-20.04
|
||||
packages: python3 nsis g++-mingw-w64-i686 wine bc wine-binfmt
|
||||
os: ubuntu-18.04
|
||||
packages: python3 nsis g++-mingw-w64-i686 wine-stable bc wine-binfmt
|
||||
postinstall: |
|
||||
sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
|
||||
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
|
||||
sudo update-binfmts --import /usr/share/binfmts/wine
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: ""
|
||||
config-opts: "--enable-reduce-exports --enable-gui=qt5"
|
||||
config-opts: "--enable-gui=qt5"
|
||||
goal: install
|
||||
- name: x86_64-win
|
||||
host: x86_64-w64-mingw32
|
||||
arch: "i386"
|
||||
os: ubuntu-20.04
|
||||
os: ubuntu-18.04
|
||||
packages: python3 nsis g++-mingw-w64-x86-64 wine64 bc wine-binfmt
|
||||
postinstall: |
|
||||
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
|
||||
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
||||
sudo update-binfmts --import /usr/share/binfmts/wine
|
||||
run-tests: true
|
||||
check-security: true
|
||||
check-symbols: false
|
||||
dep-opts: ""
|
||||
config-opts: "--enable-reduce-exports --enable-gui=qt5"
|
||||
config-opts: "--enable-gui=qt5"
|
||||
goal: install
|
||||
- name: x86_64-macos
|
||||
host: x86_64-apple-darwin11
|
||||
os: ubuntu-18.04
|
||||
packages: cmake imagemagick libcap-dev librsvg2-bin libz-dev libtiff-tools libtinfo5 python3-setuptools xorriso libtinfo5
|
||||
run-tests: false
|
||||
check-security: false
|
||||
check-symbols: false
|
||||
dep-opts: ""
|
||||
config-opts: "--enable-gui=qt5 --enable-reduce-exports"
|
||||
config-opts: "--enable-gui=qt5 --disable-tests"
|
||||
goal: deploy
|
||||
sdk: 10.11
|
||||
- name: x86_64-linux-experimental
|
||||
host: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-20.04
|
||||
packages: bc python3-zmq
|
||||
run-tests: true
|
||||
dep-opts: "AVX2=1"
|
||||
config-opts: "--with-intel-avx2 --enable-gui=qt5 --enable-zmq --enable-glibc-back-compat --enable-reduce-exports"
|
||||
goal: install
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
|
@ -166,7 +200,7 @@ jobs:
|
|||
run: |
|
||||
depends/${{ matrix.host }}/native/bin/ccache --max-size=$CCACHE_SIZE
|
||||
./autogen.sh
|
||||
./configure --prefix=`pwd`/depends/${{ matrix.host }} ${{ matrix.config-opts }} || ( cat config.log && false)
|
||||
./configure --prefix=`pwd`/depends/${{ matrix.host }} ${{ matrix.config-opts }} --enable-reduce-exports || ( cat config.log && false)
|
||||
make $MAKEJOBS ${{ matrix.goal }} || ( echo "Build failure. Verbose build follows." && make ${{ matrix.goal }} V=1 ; false )
|
||||
|
||||
- name: Run tests
|
||||
|
@ -176,6 +210,14 @@ jobs:
|
|||
qa/pull-tester/install-deps.sh
|
||||
qa/pull-tester/rpc-tests.py --coverage
|
||||
|
||||
- name: Check security
|
||||
if: ${{ matrix.check-security }}
|
||||
run: make -C src check-security
|
||||
|
||||
- name: Check symbols
|
||||
if: ${{ matrix.check-symbols }}
|
||||
run: make -C src check-symbols
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
|
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -21,7 +21,7 @@ on:
|
|||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-18.04
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
|
|
|
@ -153,7 +153,7 @@ and consensus building requirements.
|
|||
### Peer Review
|
||||
|
||||
Anyone may participate in peer review which is expressed by comments in the pull
|
||||
request. Typically reviewers will review the code for obvious errors, as well as
|
||||
request. Typically, reviewers will review the code for obvious errors, as well as
|
||||
test out the patch set and opine on the technical merits of the patch.
|
||||
Repository maintainers take into account the peer review when determining if
|
||||
there is consensus to merge a pull request.
|
||||
|
|
|
@ -34,7 +34,7 @@ OSX_BACKGROUND_IMAGE_DPIS=36 72
|
|||
OSX_DSSTORE_GEN=$(top_srcdir)/contrib/macdeploy/custom_dsstore.py
|
||||
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
|
||||
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
|
||||
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
|
||||
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/dogecoin.icns
|
||||
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
|
||||
OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
|
||||
|
||||
|
@ -82,13 +82,13 @@ $(OSX_APP)/Contents/PkgInfo:
|
|||
|
||||
$(OSX_APP)/Contents/Resources/empty.lproj:
|
||||
$(MKDIR_P) $(@D)
|
||||
@touch $@
|
||||
@touch $@
|
||||
|
||||
$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
|
||||
$(OSX_APP)/Contents/Resources/dogecoin.icns: $(OSX_INSTALLER_ICONS)
|
||||
$(MKDIR_P) $(@D)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
|
@ -101,7 +101,7 @@ $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings:
|
|||
echo '{ CFBundleDisplayName = "$(PACKAGE_NAME)"; CFBundleName = "$(PACKAGE_NAME)"; }' > $@
|
||||
|
||||
OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
|
||||
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
|
||||
$(OSX_APP)/Contents/Resources/dogecoin.icns $(OSX_APP)/Contents/Info.plist \
|
||||
$(OSX_APP)/Contents/MacOS/Dogecoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
|
||||
|
||||
osx_volname:
|
||||
|
|
14
README.md
14
README.md
|
@ -13,16 +13,18 @@ Dogecoin Core [DOGE, Ð]
|
|||
|
||||
Select language: EN | [CN](./README_zh_CN.md)
|
||||
|
||||
Dogecoin is a cryptocurrency like Bitcoin, although it does not use SHA256 as
|
||||
its proof of work (POW). Taking development cues from Tenebrix and Litecoin,
|
||||
Dogecoin currently employs a simplified variant of scrypt.
|
||||
Dogecoin is a community-driven cryptocurrency that was inspired by a Shiba Inu meme. The Dogecoin Core software allows anyone to operate a node in the Dogecoin blockchain networks and uses the Scrypt hashing method for Proof of Work. It is adapted from Bitcoin Core and other cryptocurrencies.
|
||||
|
||||
For information about the default fees used on the Dogecoin network, please
|
||||
refer to the [fee recommendation](doc/fee-recommendation.md).
|
||||
|
||||
**Website:** [dogecoin.com](https://dogecoin.com)
|
||||
|
||||
## Installation 💻
|
||||
## Usage 💻
|
||||
|
||||
Please see [the installation guide](INSTALL.md) for information about installing
|
||||
Dogecoin Core.
|
||||
To start your journey with Dogecoin Core, see the [installation guide](INSTALL.md) and the [getting started](doc/getting-started.md) tutorial.
|
||||
|
||||
The JSON-RPC API provided by Dogecoin Core is self-documenting and can be browsed with `dogecoin-cli help`, while detailed information for each command can be viewed with `dogecoin-cli help <command>`. Alternatively, see the [Bitcoin Core documentation](https://developer.bitcoin.org/reference/rpc/) - which implement a similar protocol - to get a browsable version.
|
||||
|
||||
### Such ports
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
AC_DEFUN([BITCOIN_FIND_BDB51],[
|
||||
AC_DEFUN([BITCOIN_FIND_BDB53],[
|
||||
AC_MSG_CHECKING([for Berkeley DB C++ headers])
|
||||
BDB_CPPFLAGS=
|
||||
BDB_LIBS=
|
||||
bdbpath=X
|
||||
bdb51path=X
|
||||
bdb53path=X
|
||||
bdbdirlist=
|
||||
for _vn in 5.1 51 5 ''; do
|
||||
for _vn in 5.3 53 5 ''; do
|
||||
for _pfx in b lib ''; do
|
||||
bdbdirlist="$bdbdirlist ${_pfx}db${_vn}"
|
||||
done
|
||||
|
@ -15,8 +15,8 @@ AC_DEFUN([BITCOIN_FIND_BDB51],[
|
|||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <${searchpath}db_cxx.h>
|
||||
]],[[
|
||||
#if !((DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR > 5)
|
||||
#error "failed to find bdb 5.1+"
|
||||
#if !((DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR >= 3) || DB_VERSION_MAJOR > 5)
|
||||
#error "failed to find bdb 5.3+"
|
||||
#endif
|
||||
]])],[
|
||||
if test "x$bdbpath" = "xX"; then
|
||||
|
@ -28,32 +28,32 @@ AC_DEFUN([BITCOIN_FIND_BDB51],[
|
|||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <${searchpath}db_cxx.h>
|
||||
]],[[
|
||||
#if !(DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR == 1)
|
||||
#error "failed to find bdb 5.1"
|
||||
#if !(DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR == 3)
|
||||
#error "failed to find bdb 5.3"
|
||||
#endif
|
||||
]])],[
|
||||
bdb51path="${searchpath}"
|
||||
bdb53path="${searchpath}"
|
||||
break
|
||||
],[])
|
||||
done
|
||||
if test "x$bdbpath" = "xX"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([libdb_cxx headers missing, Dogecoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
|
||||
elif test "x$bdb51path" = "xX"; then
|
||||
elif test "x$bdb53path" = "xX"; then
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
|
||||
AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[
|
||||
AC_MSG_WARN([Found Berkeley DB other than 5.1; wallets opened by this build will not be portable!])
|
||||
AC_MSG_WARN([Found Berkeley DB other than 5.3; wallets opened by this build will not be portable!])
|
||||
],[
|
||||
AC_MSG_ERROR([Found Berkeley DB other than 5.1, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)])
|
||||
AC_MSG_ERROR([Found Berkeley DB other than 5.3, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)])
|
||||
])
|
||||
else
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb51path}],db_cxx)
|
||||
bdbpath="${bdb51path}"
|
||||
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb53path}],db_cxx)
|
||||
bdbpath="${bdb53path}"
|
||||
fi
|
||||
AC_SUBST(BDB_CPPFLAGS)
|
||||
|
||||
# TODO: Ideally this could find the library version and make sure it matches the headers being used
|
||||
for searchlib in db_cxx-5.1 db_cxx; do
|
||||
for searchlib in db_cxx-5.3 db_cxx; do
|
||||
AC_CHECK_LIB([$searchlib],[main],[
|
||||
BDB_LIBS="-l${searchlib}"
|
||||
break
|
23
configure.ac
23
configure.ac
|
@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
|||
AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 1)
|
||||
define(_CLIENT_VERSION_MINOR, 14)
|
||||
define(_CLIENT_VERSION_REVISION, 4)
|
||||
define(_CLIENT_VERSION_REVISION, 5)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2021)
|
||||
|
@ -177,6 +177,12 @@ AC_ARG_ENABLE([zmq],
|
|||
[use_zmq=$enableval],
|
||||
[use_zmq=yes])
|
||||
|
||||
AC_ARG_WITH([intel-avx2],
|
||||
[AS_HELP_STRING([--with-intel-avx2],
|
||||
[Build with intel avx2 (default is no)])],
|
||||
[intel_avx2=$withval],
|
||||
[intel_avx2=no])
|
||||
|
||||
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
|
||||
|
||||
AC_ARG_ENABLE(man,
|
||||
|
@ -487,6 +493,8 @@ if test x$use_glibc_compat != xno; then
|
|||
[ fdelt_type="long int"])
|
||||
AC_MSG_RESULT($fdelt_type)
|
||||
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"])
|
||||
else
|
||||
AC_SEARCH_LIBS([clock_gettime],[rt])
|
||||
fi
|
||||
|
@ -597,7 +605,7 @@ AC_SUBST(LIBMEMENV)
|
|||
|
||||
if test x$enable_wallet != xno; then
|
||||
dnl Check for libdb_cxx only if wallet enabled
|
||||
BITCOIN_FIND_BDB51
|
||||
BITCOIN_FIND_BDB53
|
||||
fi
|
||||
|
||||
dnl Check for libminiupnpc (optional)
|
||||
|
@ -785,6 +793,16 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test x$intel_avx2 = xyes; then
|
||||
case $host in
|
||||
x86_64-*-linux*)
|
||||
AC_CHECK_LIB([IPSec_MB],[sha1_one_block_avx2],LIBS=-lIPSec_MB, AC_MSG_ERROR(IPSec_MB missing))
|
||||
AC_CHECK_LIB([IPSec_MB],[sha256_one_block_avx2],LIBS=-lIPSec_MB, AC_MSG_ERROR(IPSec_MB missing))
|
||||
AC_CHECK_LIB([IPSec_MB],[sha512_one_block_avx2],LIBS=-lIPSec_MB, AC_MSG_ERROR(IPSec_MB missing))
|
||||
AC_DEFINE(USE_AVX2, 1, [Define this symbol if intel axv2 works])
|
||||
esac
|
||||
fi
|
||||
|
||||
if test x$use_pkgconfig = xyes; then
|
||||
: dnl
|
||||
m4_ifdef(
|
||||
|
@ -1090,6 +1108,7 @@ AC_SUBST(BITCOIN_CLI_NAME)
|
|||
AC_SUBST(BITCOIN_TX_NAME)
|
||||
|
||||
AC_SUBST(RELDFLAGS)
|
||||
AC_SUBST(COMPAT_LDFLAGS)
|
||||
AC_SUBST(ERROR_CXXFLAGS)
|
||||
AC_SUBST(HARDENED_CXXFLAGS)
|
||||
AC_SUBST(HARDENED_CPPFLAGS)
|
||||
|
|
47
contrib/devtools/commit-script-check.sh
Executable file
47
contrib/devtools/commit-script-check.sh
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) 2017-2020 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# This simple script checks for commits beginning with: scripted-diff:
|
||||
# If found, looks for a script between the lines -BEGIN VERIFY SCRIPT- and
|
||||
# -END VERIFY SCRIPT-. If no ending is found, it reads until the end of the
|
||||
# commit message.
|
||||
|
||||
# The resulting script should exactly transform the previous commit into the current
|
||||
# one. Any remaining diff signals an error.
|
||||
|
||||
export LC_ALL=C
|
||||
if test -z $1; then
|
||||
echo "Usage: $0 <commit>..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RET=0
|
||||
PREV_BRANCH=$(git name-rev --name-only HEAD)
|
||||
PREV_HEAD=$(git rev-parse HEAD)
|
||||
for commit in $(git rev-list --reverse $1); do
|
||||
if git rev-list -n 1 --pretty="%s" $commit | grep -q "^scripted-diff:"; then
|
||||
git checkout --quiet $commit^ || exit
|
||||
SCRIPT="$(git rev-list --format=%b -n1 $commit | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d')"
|
||||
if test -z "$SCRIPT"; then
|
||||
echo "Error: missing script for: $commit"
|
||||
echo "Failed"
|
||||
RET=1
|
||||
else
|
||||
echo "Running script for: $commit"
|
||||
echo "$SCRIPT"
|
||||
(eval "$SCRIPT")
|
||||
git --no-pager diff --exit-code $commit && echo "OK" || (echo "Failed"; false) || RET=1
|
||||
fi
|
||||
git reset --quiet --hard HEAD
|
||||
else
|
||||
if git rev-list "--format=%b" -n1 $commit | grep -q '^-\(BEGIN\|END\)[ a-zA-Z]*-$'; then
|
||||
echo "Error: script block marker but no scripted-diff in title of commit $commit"
|
||||
echo "Failed"
|
||||
RET=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
git checkout --quiet $PREV_BRANCH 2>/dev/null || git checkout --quiet $PREV_HEAD
|
||||
exit $RET
|
|
@ -40,14 +40,16 @@ MAX_VERSIONS = {
|
|||
'GCC': (4,4,0),
|
||||
'CXXABI': (1,3,3),
|
||||
'GLIBCXX': (3,4,13),
|
||||
'GLIBC': (2,11)
|
||||
'GLIBC': (2,11),
|
||||
'V': (0,5,0) # xkb (qt only)
|
||||
}
|
||||
# See here for a description of _IO_stdin_used:
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#109
|
||||
|
||||
# Ignore symbols that are exported as part of every executable
|
||||
IGNORE_EXPORTS = {
|
||||
b'_edata', b'_end', b'_init', b'__bss_start', b'_fini', b'_IO_stdin_used'
|
||||
b'_edata', b'_end', b'_init', b'__bss_start', b'_fini', b'_IO_stdin_used',
|
||||
b'stdin', b'stdout', b'stderr'
|
||||
}
|
||||
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
|
||||
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
|
||||
|
@ -66,6 +68,8 @@ b'ld-linux.so.2', # 32-bit dynamic linker
|
|||
b'libX11-xcb.so.1', # part of X11
|
||||
b'libX11.so.6', # part of X11
|
||||
b'libxcb.so.1', # part of X11
|
||||
b'libxkbcommon.so.0', # keyboard keymapping
|
||||
b'libxkbcommon-x11.so.0', # keyboard keymapping
|
||||
b'libfontconfig.so.1', # font support
|
||||
b'libfreetype.so.6', # font parsing
|
||||
b'libdl.so.2' # programming interface to dynamic linker
|
||||
|
@ -160,5 +164,3 @@ if __name__ == '__main__':
|
|||
retval = 1
|
||||
|
||||
exit(retval)
|
||||
|
||||
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
name: "dogecoin-linux-1.14"
|
||||
enable_cache: true
|
||||
suites:
|
||||
- "trusty"
|
||||
- "bionic"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
- "curl"
|
||||
- "g++-aarch64-linux-gnu"
|
||||
- "g++-4.8-aarch64-linux-gnu"
|
||||
- "gcc-4.8-aarch64-linux-gnu"
|
||||
- "g++-7-aarch64-linux-gnu"
|
||||
- "gcc-7-aarch64-linux-gnu"
|
||||
- "binutils-aarch64-linux-gnu"
|
||||
- "g++-arm-linux-gnueabihf"
|
||||
- "g++-4.8-arm-linux-gnueabihf"
|
||||
- "gcc-4.8-arm-linux-gnueabihf"
|
||||
- "g++-7-arm-linux-gnueabihf"
|
||||
- "gcc-7-arm-linux-gnueabihf"
|
||||
- "binutils-arm-linux-gnueabihf"
|
||||
- "g++-4.8-multilib"
|
||||
- "gcc-4.8-multilib"
|
||||
- "g++-7-multilib"
|
||||
- "gcc-7-multilib"
|
||||
- "binutils-gold"
|
||||
- "git-core"
|
||||
- "pkg-config"
|
||||
|
@ -24,6 +24,7 @@ packages:
|
|||
- "libtool"
|
||||
- "automake"
|
||||
- "faketime"
|
||||
- "bison"
|
||||
- "bsdmainutils"
|
||||
- "ca-certificates"
|
||||
- "python"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
name: "dogecoin-dmg-signer"
|
||||
suites:
|
||||
- "trusty"
|
||||
- "bionic"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name: "dogecoin-osx-1.14"
|
||||
enable_cache: true
|
||||
suites:
|
||||
- "trusty"
|
||||
- "bionic"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
name: "dogecoin-win-signer"
|
||||
suites:
|
||||
- "trusty"
|
||||
- "bionic"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name: "dogecoin-win-1.14"
|
||||
enable_cache: true
|
||||
suites:
|
||||
- "trusty"
|
||||
- "bionic"
|
||||
architectures:
|
||||
- "amd64"
|
||||
packages:
|
||||
|
@ -21,6 +21,7 @@ packages:
|
|||
- "zip"
|
||||
- "ca-certificates"
|
||||
- "python"
|
||||
- "rename"
|
||||
remotes:
|
||||
- "url": "https://github.com/dogecoin/dogecoin.git"
|
||||
"dir": "dogecoin"
|
||||
|
@ -29,7 +30,7 @@ script: |
|
|||
WRAP_DIR=$HOME/wrapped
|
||||
HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
|
||||
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
|
||||
FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip objcopy"
|
||||
FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy"
|
||||
FAKETIME_PROGS="date makensis zip"
|
||||
HOST_CFLAGS="-O2 -g"
|
||||
HOST_CXXFLAGS="-O2 -g"
|
||||
|
@ -70,21 +71,13 @@ script: |
|
|||
done
|
||||
}
|
||||
|
||||
function create_per-host_linker_wrapper {
|
||||
# This is only needed for trusty, as the mingw linker leaks a few bytes of
|
||||
# heap, causing non-determinism. See discussion in https://github.com/bitcoin/bitcoin/pull/6900
|
||||
function create_per-host_compiler_wrapper {
|
||||
# -posix variant is required for c++11 threading.
|
||||
for i in $HOSTS; do
|
||||
mkdir -p ${WRAP_DIR}/${i}
|
||||
for prog in collect2; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog}
|
||||
REAL=$(${i}-gcc -print-prog-name=${prog})
|
||||
echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog}
|
||||
echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog}
|
||||
chmod +x ${WRAP_DIR}/${i}/${prog}
|
||||
done
|
||||
for prog in gcc g++; do
|
||||
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
|
||||
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
||||
echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
|
||||
|
@ -98,7 +91,7 @@ script: |
|
|||
export PATH_orig=${PATH}
|
||||
create_global_faketime_wrappers "2000-01-01 12:00:00"
|
||||
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
||||
create_per-host_linker_wrapper "2000-01-01 12:00:00"
|
||||
create_per-host_compiler_wrapper "2000-01-01 12:00:00"
|
||||
export PATH=${WRAP_DIR}:${PATH}
|
||||
|
||||
cd dogecoin
|
||||
|
@ -112,7 +105,7 @@ script: |
|
|||
export PATH=${PATH_orig}
|
||||
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
|
||||
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
|
||||
create_per-host_linker_wrapper "${REFERENCE_DATETIME}"
|
||||
create_per-host_compiler_wrapper "${REFERENCE_DATETIME}"
|
||||
export PATH=${WRAP_DIR}:${PATH}
|
||||
|
||||
# Create the release tarball using (arbitrarily) the first host
|
||||
|
|
73
contrib/init/dogecoind.local.service
Normal file
73
contrib/init/dogecoind.local.service
Normal file
|
@ -0,0 +1,73 @@
|
|||
# This variant of the unit file is for local installations that are installed with `make install`.
|
||||
#
|
||||
# The relevant paths are:
|
||||
#
|
||||
#/usr/local/bin/dogecoind
|
||||
#/usr/local/etc/dogecoin/
|
||||
#/var/local/dogecoin/
|
||||
|
||||
[Unit]
|
||||
Description=Dogecoin's distributed currency daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/dogecoind -conf=/usr/local/etc/dogecoin/dogecoin.conf -datadir=/var/local/dogecoin
|
||||
|
||||
KillSignal=SIGINT
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
TimeoutStopSec=60
|
||||
TimeoutStartSec=5
|
||||
StartLimitIntervalSec=120
|
||||
StartLimitBurst=5
|
||||
|
||||
User=dogecoin
|
||||
Group=dogecoin
|
||||
|
||||
### Restrict resource consumption
|
||||
MemoryAccounting=yes
|
||||
MemoryLimit=3g
|
||||
|
||||
### Restrict access to host file system.
|
||||
#
|
||||
# Hide the entire root file system by default, and *only* mount in exactly what is needed.
|
||||
#
|
||||
|
||||
TemporaryFileSystem=/:ro
|
||||
|
||||
# Add core dependencies
|
||||
BindReadOnlyPaths=/etc/ /lib/ /lib64/
|
||||
|
||||
# Add daemon paths
|
||||
BindReadOnlyPaths=/usr/local/bin/dogecoind /usr/local/etc/dogecoin/
|
||||
BindPaths=/var/local/dogecoin/
|
||||
|
||||
### Restrict access to system.
|
||||
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
PrivateUsers=true
|
||||
DevicePolicy=closed
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectControlGroups=true
|
||||
ProtectClock=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelLogs=true
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
MemoryDenyWriteExecute=true
|
||||
LockPersonality=true
|
||||
|
||||
# ProtectSystem=strict would normally be used, however it nullifies TemporaryFileSystem,
|
||||
# since it remounts root as read only over the top.
|
||||
# In this case, do not enable ProtectSystem.
|
||||
#ProtectSystem=strict
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
74
contrib/init/dogecoind.opt.service
Normal file
74
contrib/init/dogecoind.opt.service
Normal file
|
@ -0,0 +1,74 @@
|
|||
# This variant of the unit file is for "opt" add-on installations that do not form part of the default installation.
|
||||
# (i.e. out of band installations by the user, not installed by a system package manager like "apt")
|
||||
#
|
||||
# The relevant paths are:
|
||||
#
|
||||
#/opt/dogecoin/dogecoind
|
||||
#/etc/opt/dogecoin/
|
||||
#/var/opt/dogecoin/
|
||||
|
||||
[Unit]
|
||||
Description=Dogecoin's distributed currency daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/opt/dogecoin/bin/dogecoind -conf=/etc/opt/dogecoin/dogecoin.conf -datadir=/var/opt/dogecoin
|
||||
|
||||
KillSignal=SIGINT
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
TimeoutStopSec=60
|
||||
TimeoutStartSec=5
|
||||
StartLimitIntervalSec=120
|
||||
StartLimitBurst=5
|
||||
|
||||
User=dogecoin
|
||||
Group=dogecoin
|
||||
|
||||
### Restrict resource consumption
|
||||
MemoryAccounting=yes
|
||||
MemoryLimit=3g
|
||||
|
||||
### Restrict access to host file system.
|
||||
#
|
||||
# Hide the entire root file system by default, and *only* mount in exactly what is needed.
|
||||
#
|
||||
|
||||
TemporaryFileSystem=/:ro
|
||||
|
||||
# Add core dependencies
|
||||
BindReadOnlyPaths=/etc/ /lib/ /lib64/
|
||||
|
||||
# Add daemon paths
|
||||
BindReadOnlyPaths=/opt/dogecoin/ /etc/opt/dogecoin/
|
||||
BindPaths=/var/opt/dogecoin/
|
||||
|
||||
### Restrict access to system.
|
||||
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
PrivateUsers=true
|
||||
DevicePolicy=closed
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectControlGroups=true
|
||||
ProtectClock=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelLogs=true
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
MemoryDenyWriteExecute=true
|
||||
LockPersonality=true
|
||||
|
||||
# ProtectSystem=strict would normally be used, however it nullifies TemporaryFileSystem,
|
||||
# since it remounts root as read only over the top.
|
||||
# In this case, do not enable ProtectSystem.
|
||||
#ProtectSystem=strict
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,22 +1,73 @@
|
|||
# This variant of the unit file is for package installations.
|
||||
#
|
||||
# The relevant paths are:
|
||||
#
|
||||
#/usr/bin/dogecoind
|
||||
#/etc/dogecoin/
|
||||
#/var/lib/dogecoin/
|
||||
|
||||
[Unit]
|
||||
Description=Dogecoin's distributed currency daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/dogecoind -conf=/etc/dogecoin/dogecoin.conf -datadir=/var/lib/dogecoin
|
||||
|
||||
KillSignal=SIGINT
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
TimeoutStopSec=60
|
||||
TimeoutStartSec=5
|
||||
StartLimitIntervalSec=120
|
||||
StartLimitBurst=5
|
||||
|
||||
User=dogecoin
|
||||
Group=dogecoin
|
||||
|
||||
Type=forking
|
||||
PIDFile=/var/lib/dogecoind/dogecoind.pid
|
||||
ExecStart=/usr/bin/dogecoind -daemon -pid=/var/lib/dogecoind/dogecoind.pid \
|
||||
-conf=/etc/dogecoin/dogecoin.conf -datadir=/var/lib/dogecoind -disablewallet
|
||||
### Restrict resource consumption
|
||||
MemoryAccounting=yes
|
||||
MemoryLimit=3g
|
||||
|
||||
Restart=always
|
||||
### Restrict access to host file system.
|
||||
#
|
||||
# Hide the entire root file system by default, and *only* mount in exactly what is needed.
|
||||
#
|
||||
|
||||
TemporaryFileSystem=/:ro
|
||||
|
||||
# Add core dependencies
|
||||
BindReadOnlyPaths=/etc/ /lib/ /lib64/
|
||||
|
||||
# Add daemon paths
|
||||
BindReadOnlyPaths=/usr/bin/dogecoind /etc/dogecoin/
|
||||
BindPaths=/var/lib/dogecoin
|
||||
|
||||
### Restrict access to system.
|
||||
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
TimeoutStopSec=60s
|
||||
TimeoutStartSec=2s
|
||||
StartLimitInterval=120s
|
||||
StartLimitBurst=5
|
||||
PrivateDevices=true
|
||||
PrivateUsers=true
|
||||
DevicePolicy=closed
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectControlGroups=true
|
||||
ProtectClock=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelLogs=true
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
MemoryDenyWriteExecute=true
|
||||
LockPersonality=true
|
||||
|
||||
# ProtectSystem=strict would normally be used, however it nullifies TemporaryFileSystem,
|
||||
# since it remounts root as read only over the top.
|
||||
# In this case, do not enable ProtectSystem.
|
||||
#ProtectSystem=strict
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -4,15 +4,21 @@ All the commands I used for building and pushing to Snapcraft. I've only tested
|
|||
|
||||
## Building Locally
|
||||
|
||||
```
|
||||
sudo apt install snapd
|
||||
sudo snap install --classic snapcraft
|
||||
snapcraft
|
||||
```
|
||||
|
||||
### To Install Locally
|
||||
```
|
||||
snap install \*.snap --devmode
|
||||
```
|
||||
|
||||
### To Push to Snapcraft
|
||||
```
|
||||
snapcraft login
|
||||
snapcraft register dogecoin-core
|
||||
snapcraft push \*.snap --release=edge
|
||||
sudo snap install dogecoin-core --channel=edge
|
||||
```
|
|
@ -1,5 +1,5 @@
|
|||
name: dogecoin-core # you probably want to 'snapcraft register <name>'
|
||||
version: '1.14.4'
|
||||
version: '1.14.5'
|
||||
summary: Reference client of Dogecoin, a peer-to-peer digital currency like Bitcoin.
|
||||
description: |
|
||||
Dogecoin is a cryptocurrency like Bitcoin, although it does not use SHA256 as its proof of work (POW). Taking development cues from Tenebrix and Litecoin, Dogecoin currently employs a simplified variant of scrypt. MIT licenced.
|
||||
|
@ -39,19 +39,26 @@ parts:
|
|||
unzip master.zip
|
||||
echo "Verifying secure hash matches signed values..."
|
||||
checksum=$(sha256sum dogecoin-${SNAPCRAFT_PROJECT_VERSION}-${SNAPCRAFT_ARCH_TRIPLET}.tar.gz)
|
||||
if ! grep -r $checksum *; then
|
||||
if ! (grep -r $checksum * | grep dogecoin-${SNAPCRAFT_PROJECT_VERSION}-${SNAPCRAFT_ARCH_TRIPLET}.tar.gz); then
|
||||
echo "Secure hash not verified."
|
||||
return
|
||||
else
|
||||
echo "Secure hash verified."
|
||||
fi
|
||||
tar -xvf dogecoin-${SNAPCRAFT_PROJECT_VERSION}-${SNAPCRAFT_ARCH_TRIPLET}.tar.gz
|
||||
echo "Running tests..."
|
||||
dogecoin-${SNAPCRAFT_PROJECT_VERSION}/bin/test_dogecoin
|
||||
if ! (dogecoin-${SNAPCRAFT_PROJECT_VERSION}/bin/test_dogecoin); then
|
||||
echo "Dogecoin tests failed."
|
||||
return
|
||||
else
|
||||
echo "Dogecoin tests passed."
|
||||
fi
|
||||
echo "Installing Dogecoin..."
|
||||
install -m 0755 -D -t $SNAPCRAFT_PART_INSTALL/bin dogecoin-${SNAPCRAFT_PROJECT_VERSION}/bin/dogecoind
|
||||
install -m 0755 -D -t $SNAPCRAFT_PART_INSTALL/bin dogecoin-${SNAPCRAFT_PROJECT_VERSION}/bin/dogecoin-qt
|
||||
install -m 0755 -D -t $SNAPCRAFT_PART_INSTALL/bin dogecoin-${SNAPCRAFT_PROJECT_VERSION}/bin/dogecoin-cli
|
||||
wget https://raw.githubusercontent.com/dogecoin/dogecoin/v${SNAPCRAFT_PROJECT_VERSION}/share/pixmaps/bitcoin128.png
|
||||
install -m 0644 -D -t $SNAPCRAFT_PART_INSTALL/share/pixmaps bitcoin128.png
|
||||
wget https://raw.githubusercontent.com/dogecoin/dogecoin/master/share/pixmaps/dogecoin128.png
|
||||
install -m 0644 -D -t $SNAPCRAFT_PART_INSTALL/share/pixmaps dogecoin128.png
|
||||
build-packages:
|
||||
- unzip
|
||||
- wget
|
||||
|
|
|
@ -6,6 +6,7 @@ SDK_PATH ?= $(BASEDIR)/SDKs
|
|||
NO_QT ?=
|
||||
NO_WALLET ?=
|
||||
NO_UPNP ?=
|
||||
AVX2 ?=
|
||||
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
|
||||
|
||||
BUILD = $(shell ./config.guess)
|
||||
|
@ -92,14 +93,19 @@ $(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null)
|
|||
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages)
|
||||
wallet_packages_$(NO_WALLET) = $(wallet_packages)
|
||||
upnp_packages_$(NO_UPNP) = $(upnp_packages)
|
||||
avx2_packages_$(AVX2) = $(avx2_$(host_arch)_$(host_os)_packages)
|
||||
|
||||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
|
||||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(avx2_packages_1) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
|
||||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
|
||||
|
||||
ifneq ($(qt_packages_),)
|
||||
native_packages += $(qt_native_packages)
|
||||
endif
|
||||
|
||||
ifneq ($(avx2_packages_1),)
|
||||
native_packages += $(avx2_native_packages)
|
||||
endif
|
||||
|
||||
all_packages = $(packages) $(native_packages)
|
||||
|
||||
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
|
||||
|
@ -119,11 +125,35 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
|
|||
$(AT)cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); )
|
||||
$(AT)touch $@
|
||||
|
||||
# $PATH is not preserved between ./configure and make by convention. Its
|
||||
# modification and overriding at ./configure time is (as I understand it)
|
||||
# supposed to be captured by the AC_{PROG_{,OBJ}CXX,PATH_{PROG,TOOL}} macros,
|
||||
# which will expand the program names to their full absolute paths. The notable
|
||||
# exception is command line overriding: ./configure CC=clang, which skips the
|
||||
# program name expansion step, and works because the user implicitly indicates
|
||||
# with CC=clang that clang will be available in $PATH at all times, and is most
|
||||
# likely part of the user's system.
|
||||
#
|
||||
# Therefore, when we "seed the autoconf cache"/"override well-known program
|
||||
# vars" by setting AR=<blah> in our config.site, either one of two things needs
|
||||
# to be true for the build system to work correctly:
|
||||
#
|
||||
# 1. If we refer to the program by name (e.g. AR=riscv64-gnu-linux-ar), the
|
||||
# tool needs to be available in $PATH at all times.
|
||||
#
|
||||
# 2. If the tool is _**not**_ expected to be available in $PATH at all times
|
||||
# (such as is the case for our native_cctools binutils tools), it needs to
|
||||
# be referred to by its absolute path, such as would be output by the
|
||||
# AC_PATH_{PROG,TOOL} macros.
|
||||
#
|
||||
# Minor note: it is also okay to refer to tools by their absolute path even if
|
||||
# we expect them to be available in $PATH at all times, more specificity does
|
||||
# not hurt.
|
||||
$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id)
|
||||
$(AT)@mkdir -p $(@D)
|
||||
$(AT)sed -e 's|@HOST@|$(host)|' \
|
||||
-e 's|@CC@|$(toolchain_path)$(host_CC)|' \
|
||||
-e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
|
||||
-e 's|@CC@|$(host_CC)|' \
|
||||
-e 's|@CXX@|$(host_CXX)|' \
|
||||
-e 's|@AR@|$(toolchain_path)$(host_AR)|' \
|
||||
-e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
|
||||
-e 's|@NM@|$(toolchain_path)$(host_NM)|' \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
### Prerequisites
|
||||
|
||||
The depends system is maintained and tested using Ubuntu Trusty. Both generic
|
||||
The depends system is maintained and tested using Ubuntu Bionic. Both generic
|
||||
apt packages, and packages specific to the target architecture are required to
|
||||
successfully compile all dependencies. Listed packages are tested and known to
|
||||
work.
|
||||
|
@ -9,27 +9,27 @@ work.
|
|||
|
||||
```
|
||||
sudo apt-get install autoconf automake binutils-gold ca-certificates curl \
|
||||
faketime git-core libtool pkg-config python
|
||||
faketime git-core libtool pkg-config python bison
|
||||
```
|
||||
|
||||
#### Generic linux: i686-pc-linux-gnu and x86_64-linux-gnu
|
||||
|
||||
```
|
||||
sudo apt-get install g++-4.8-multilib gcc-4.8-multilib
|
||||
sudo apt-get install g++-7-multilib gcc-7-multilib
|
||||
```
|
||||
|
||||
#### ARM7 32bit: arm-linux-gnueabihf
|
||||
|
||||
```
|
||||
sudo apt-get install g++-arm-linux-gnueabihf g++-4.8-arm-linux-gnueabihf \
|
||||
gcc-4.8-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
|
||||
sudo apt-get install g++-arm-linux-gnueabihf g++-7-arm-linux-gnueabihf \
|
||||
gcc-7-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
|
||||
```
|
||||
|
||||
#### ARM 64bit: aarch64-linux-gnu
|
||||
|
||||
```
|
||||
sudo apt-get install g++-aarch64-linux-gnu g++-4.8-aarch64-linux-gnu \
|
||||
gcc-4.8-aarch64-linux-gnu binutils-aarch64-linux-gnu
|
||||
sudo apt-get install g++-aarch64-linux-gnu g++-7-aarch64-linux-gnu \
|
||||
gcc-7-aarch64-linux-gnu binutils-aarch64-linux-gnu
|
||||
```
|
||||
|
||||
#### Windows: i686-w64-mingw32 and x86_64-w64-mingw32
|
||||
|
|
|
@ -2,8 +2,12 @@ OSX_MIN_VERSION=10.8
|
|||
OSX_SDK_VERSION=10.11
|
||||
OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
|
||||
LD64_VERSION=253.9
|
||||
darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
|
||||
darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -stdlib=libc++
|
||||
|
||||
clang_prog=$(build_prefix)/bin/clang
|
||||
clangxx_prog=$(clang_prog)++
|
||||
|
||||
darwin_CC=$(build_prefix)/bin/clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
|
||||
darwin_CXX=$(clang_prog)++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -stdlib=libc++
|
||||
|
||||
darwin_CFLAGS=-pipe
|
||||
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package=bdb
|
||||
$(package)_version=5.1.29
|
||||
$(package)_version=5.3.28
|
||||
$(package)_download_path=http://download.oracle.com/berkeley-db
|
||||
$(package)_file_name=db-$($(package)_version).NC.tar.gz
|
||||
$(package)_sha256_hash=08238e59736d1aacdd47cfb8e68684c695516c37f4fbe1b8267dde58dc3a576c
|
||||
$(package)_sha256_hash=76a25560d9e52a198d37a31440fd07632b5f1f8f9f2b6d5438f4bc3e7c9013ef
|
||||
$(package)_build_subdir=build_unix
|
||||
|
||||
define $(package)_set_vars
|
||||
|
@ -24,7 +24,7 @@ define $(package)_config_cmds
|
|||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) libdb_cxx-5.1.a libdb-5.1.a
|
||||
$(MAKE) libdb_cxx-5.3.a libdb-5.3.a
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
|
|
|
@ -5,7 +5,7 @@ $(package)_file_name=$(package)-$($(package)_version).tar.bz2
|
|||
$(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--without-zlib --without-png --disable-static
|
||||
$(package)_config_opts=--without-zlib --without-png --without-harfbuzz --without-bzip2 --disable-static
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
endef
|
||||
|
||||
|
|
19
depends/packages/intel-ipsec-mb.mk
Normal file
19
depends/packages/intel-ipsec-mb.mk
Normal file
|
@ -0,0 +1,19 @@
|
|||
package=intel-ipsec-mb
|
||||
$(package)_version=1.0
|
||||
$(package)_download_path=https://github.com/intel/intel-ipsec-mb/archive/refs/tags
|
||||
$(package)_file_name=v$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=03501aea472d3c8fdf8f1f207816eefeaf5e4ebbdc71d88dcb26b2519841bb74
|
||||
$(package)_patches=remove_digest_init.patch
|
||||
$(package)_dependencies=native_nasm
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/remove_digest_init.patch
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) NASM=$(build_prefix)/bin/nasm
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) NASM=$(build_prefix)/bin/nasm PREFIX=$($(package)_staging_prefix_dir) SHARED=n NOLDCONFIG=y install
|
||||
endef
|
31
depends/packages/libxkbcommon.mk
Normal file
31
depends/packages/libxkbcommon.mk
Normal file
|
@ -0,0 +1,31 @@
|
|||
package=libxkbcommon
|
||||
$(package)_version=0.8.4
|
||||
$(package)_download_path=https://xkbcommon.org/download/
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.xz
|
||||
$(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b
|
||||
$(package)_dependencies=libxcb
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts = --enable-option-checking --disable-dependency-tracking
|
||||
$(package)_config_opts += --disable-static --disable-docs
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf lib/*.la
|
||||
endef
|
21
depends/packages/native_nasm.mk
Normal file
21
depends/packages/native_nasm.mk
Normal file
|
@ -0,0 +1,21 @@
|
|||
package=native_nasm
|
||||
$(package)_version=2.15.05
|
||||
$(package)_download_path=http://nasm.us/pub/nasm/releasebuilds/$($(package)_version)
|
||||
$(package)_file_name=nasm-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=3c4b8339e5ab54b1bcb2316101f8985a5da50a3f9e504d43fa6f35668bee2fd0
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share
|
||||
endef
|
|
@ -1,9 +1,10 @@
|
|||
package=openssl
|
||||
$(package)_version=1.0.1
|
||||
$(package)_version_suffix=l
|
||||
$(package)_version=1.0.2
|
||||
$(package)_version_suffix=u
|
||||
$(package)_download_path=https://www.openssl.org/source/old/$($(package)_version)
|
||||
$(package)_file_name=$(package)-$($(package)_version)$($(package)_version_suffix).tar.gz
|
||||
$(package)_sha256_hash=b2cf4d48fe5d49f240c61c9e624193a6f232b5ed0baf010681e725963c40d1d4
|
||||
$(package)_sha256_hash=ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
|
||||
$(package)_patches=secure_getenv.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
|
||||
|
@ -58,12 +59,14 @@ $(package)_config_opts_i686_mingw32=mingw
|
|||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/secure_getenv.patch && \
|
||||
sed -i.old "/define DATE/d" util/mkbuildinf.pl && \
|
||||
sed -i.old "s|engines apps test|engines|" Makefile.org
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
./Configure $($(package)_config_opts)
|
||||
./Configure $($(package)_config_opts) && \
|
||||
make depend
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
|
|
|
@ -4,7 +4,7 @@ native_packages := native_ccache
|
|||
qt_native_packages = native_protobuf
|
||||
qt_packages = qrencode protobuf zlib
|
||||
|
||||
qt_x86_64_linux_packages:=qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
|
||||
qt_x86_64_linux_packages:=qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans libxkbcommon
|
||||
qt_i686_linux_packages:=$(qt_x86_64_linux_packages)
|
||||
|
||||
qt_darwin_packages=qt
|
||||
|
@ -14,6 +14,9 @@ wallet_packages=bdb
|
|||
|
||||
upnp_packages=miniupnpc
|
||||
|
||||
avx2_native_packages:=native_nasm
|
||||
avx2_x86_64_linux_packages:=intel-ipsec-mb
|
||||
|
||||
darwin_native_packages = native_biplist native_ds_store native_mac_alias
|
||||
|
||||
ifneq ($(build_os),darwin)
|
||||
|
|
|
@ -5,7 +5,7 @@ $(package)_suffix=opensource-src-$($(package)_version).tar.gz
|
|||
$(package)_file_name=qtbase-$($(package)_suffix)
|
||||
$(package)_sha256_hash=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
|
||||
$(package)_dependencies=openssl zlib
|
||||
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
|
||||
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext libxkbcommon
|
||||
$(package)_build_subdir=qtbase
|
||||
$(package)_qt_libs=corelib network widgets gui plugins testlib printsupport
|
||||
$(package)_patches=mac-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch fix_qt_pkgconfig.patch
|
||||
|
@ -73,6 +73,7 @@ $(package)_config_opts += -prefix $(host_prefix)
|
|||
$(package)_config_opts += -qt-libpng
|
||||
$(package)_config_opts += -qt-libjpeg
|
||||
$(package)_config_opts += -qt-pcre
|
||||
$(package)_config_opts += -qt-harfbuzz
|
||||
$(package)_config_opts += -system-zlib
|
||||
$(package)_config_opts += -reduce-exports
|
||||
$(package)_config_opts += -static
|
||||
|
@ -89,8 +90,7 @@ $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
|
|||
$(package)_config_opts_darwin += -device-option MAC_LD64_VERSION=$(LD64_VERSION)
|
||||
endif
|
||||
|
||||
$(package)_config_opts_linux = -qt-xkbcommon
|
||||
$(package)_config_opts_linux += -qt-xcb
|
||||
$(package)_config_opts_linux = -qt-xcb
|
||||
$(package)_config_opts_linux += -system-freetype
|
||||
$(package)_config_opts_linux += -no-sm
|
||||
$(package)_config_opts_linux += -fontconfig
|
||||
|
|
|
@ -4,7 +4,6 @@ $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($
|
|||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5
|
||||
$(package)_patches=remove_libstd_link.patch clock-unused-nsecs.patch 0002-disable-pthread_set_name_np.patch
|
||||
$(package)_patches+=trusty-add-win32-inethdr.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
|
||||
|
@ -16,7 +15,6 @@ define $(package)_preprocess_cmds
|
|||
patch -p1 < $($(package)_patch_dir)/clock-unused-nsecs.patch && \
|
||||
patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \
|
||||
patch -p1 < $($(package)_patch_dir)/0002-disable-pthread_set_name_np.patch && \
|
||||
patch -p1 < $($(package)_patch_dir)/trusty-add-win32-inethdr.patch && \
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config
|
||||
endef
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
These patches are to allow bdb-5.1.29 to compile using clang / c++11 under later MacOSX versions (Sierra+).
|
||||
These patches must be applied to the bdb-5.1.29 source from Oracle, and then compiled, for the Mac client to build.
|
||||
|
||||
Note some of these exist in bdb.mk but we don't want to use the -stdlib=libstd++ flag that's indicated in there on OSX.
|
|
@ -1,38 +0,0 @@
|
|||
--- old-bdb/src/dbinc/atomic.h 2011-10-25 14:39:34.000000000 -0600
|
||||
+++ new-bdb/src/dbinc/atomic.h 2018-06-01 19:59:37.000000000 -0600
|
||||
@@ -70,7 +70,7 @@
|
||||
* These have no memory barriers; the caller must include them when necessary.
|
||||
*/
|
||||
#define atomic_read(p) ((p)->value)
|
||||
-#define atomic_init(p, val) ((p)->value = (val))
|
||||
+#define atomic_init_db(p, val) ((p)->value = (val))
|
||||
|
||||
#ifdef HAVE_ATOMIC_SUPPORT
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
#define atomic_inc(env, p) __atomic_inc(p)
|
||||
#define atomic_dec(env, p) __atomic_dec(p)
|
||||
#define atomic_compare_exchange(env, p, o, n) \
|
||||
- __atomic_compare_exchange((p), (o), (n))
|
||||
+ __atomic_compare_exchange_db((p), (o), (n))
|
||||
static inline int __atomic_inc(db_atomic_t *p)
|
||||
{
|
||||
int temp;
|
||||
@@ -176,7 +176,7 @@
|
||||
* http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
|
||||
* which configure could be changed to use.
|
||||
*/
|
||||
-static inline int __atomic_compare_exchange(
|
||||
+static inline int __atomic_compare_exchange_db(
|
||||
db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
|
||||
{
|
||||
atomic_value_t was;
|
||||
@@ -206,7 +206,7 @@
|
||||
#define atomic_dec(env, p) (--(p)->value)
|
||||
#define atomic_compare_exchange(env, p, oldval, newval) \
|
||||
(DB_ASSERT(env, atomic_read(p) == (oldval)), \
|
||||
- atomic_init(p, (newval)), 1)
|
||||
+ atomic_init_db(p, (newval)), 1)
|
||||
#else
|
||||
#define atomic_inc(env, p) __atomic_inc(env, p)
|
||||
#define atomic_dec(env, p) __atomic_dec(env, p)
|
|
@ -1,20 +0,0 @@
|
|||
--- old-bdb/src/mp/mp_fget.c 2011-10-25 14:39:35.000000000 -0600
|
||||
+++ new-bdb/src/mp/mp_fget.c 2018-06-01 20:01:48.000000000 -0600
|
||||
@@ -629,7 +629,7 @@
|
||||
|
||||
/* Initialize enough so we can call __memp_bhfree. */
|
||||
alloc_bhp->flags = 0;
|
||||
- atomic_init(&alloc_bhp->ref, 1);
|
||||
+ atomic_init_db(&alloc_bhp->ref, 1);
|
||||
#ifdef DIAGNOSTIC
|
||||
if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
|
||||
__db_errx(env,
|
||||
@@ -931,7 +931,7 @@
|
||||
MVCC_MPROTECT(bhp->buf, mfp->pagesize,
|
||||
PROT_READ);
|
||||
|
||||
- atomic_init(&alloc_bhp->ref, 1);
|
||||
+ atomic_init_db(&alloc_bhp->ref, 1);
|
||||
MUTEX_LOCK(env, alloc_bhp->mtx_buf);
|
||||
alloc_bhp->priority = bhp->priority;
|
||||
alloc_bhp->pgno = bhp->pgno;
|
|
@ -1,20 +0,0 @@
|
|||
--- old-bdb/src/mp/mp_mvcc.c 2011-10-25 14:39:35.000000000 -0600
|
||||
+++ new-bdb/src/mp/mp_mvcc.c 2018-06-01 20:02:45.000000000 -0600
|
||||
@@ -276,7 +276,7 @@
|
||||
#else
|
||||
memcpy(frozen_bhp, bhp, SSZA(BH, buf));
|
||||
#endif
|
||||
- atomic_init(&frozen_bhp->ref, 0);
|
||||
+ atomic_init_db(&frozen_bhp->ref, 0);
|
||||
if (mutex != MUTEX_INVALID)
|
||||
frozen_bhp->mtx_buf = mutex;
|
||||
else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
|
||||
@@ -428,7 +428,7 @@
|
||||
#endif
|
||||
alloc_bhp->mtx_buf = mutex;
|
||||
MUTEX_LOCK(env, alloc_bhp->mtx_buf);
|
||||
- atomic_init(&alloc_bhp->ref, 1);
|
||||
+ atomic_init_db(&alloc_bhp->ref, 1);
|
||||
F_CLR(alloc_bhp, BH_FROZEN);
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
--- old-bdb/src/mp/mp_region.c 2011-10-25 14:39:35.000000000 -0600
|
||||
+++ new-bdb/src/mp/mp_region.c 2018-06-01 20:03:28.000000000 -0600
|
||||
@@ -229,7 +229,7 @@
|
||||
MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
|
||||
return (ret);
|
||||
SH_TAILQ_INIT(&htab[i].hash_bucket);
|
||||
- atomic_init(&htab[i].hash_page_dirty, 0);
|
||||
+ atomic_init_db(&htab[i].hash_page_dirty, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -275,7 +275,7 @@
|
||||
hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID :
|
||||
mtx_base + (i % dbenv->mp_mtxcount);
|
||||
SH_TAILQ_INIT(&hp->hash_bucket);
|
||||
- atomic_init(&hp->hash_page_dirty, 0);
|
||||
+ atomic_init_db(&hp->hash_page_dirty, 0);
|
||||
#ifdef HAVE_STATISTICS
|
||||
hp->hash_io_wait = 0;
|
||||
hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
|
|
@ -1,11 +0,0 @@
|
|||
--- old-bdb/src/mutex/mut_method.c 2011-10-25 14:39:35.000000000 -0600
|
||||
+++ new-bdb/src/mutex/mut_method.c 2018-06-01 20:04:05.000000000 -0600
|
||||
@@ -428,7 +428,7 @@
|
||||
MUTEX_LOCK(env, mtx);
|
||||
ret = atomic_read(v) == oldval;
|
||||
if (ret)
|
||||
- atomic_init(v, newval);
|
||||
+ atomic_init_db(v, newval);
|
||||
MUTEX_UNLOCK(env, mtx);
|
||||
|
||||
return (ret);
|
|
@ -1,20 +0,0 @@
|
|||
--- old-bdb/src/mutex/mut_tas.c 2011-10-25 14:39:35.000000000 -0600
|
||||
+++ new-bdb/src/mutex/mut_tas.c 2018-06-01 20:04:25.000000000 -0600
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#ifdef HAVE_SHARED_LATCHES
|
||||
if (F_ISSET(mutexp, DB_MUTEX_SHARED))
|
||||
- atomic_init(&mutexp->sharecount, 0);
|
||||
+ atomic_init_db(&mutexp->sharecount, 0);
|
||||
else
|
||||
#endif
|
||||
if (MUTEX_INIT(&mutexp->tas)) {
|
||||
@@ -521,7 +521,7 @@
|
||||
F_CLR(mutexp, DB_MUTEX_LOCKED);
|
||||
/* Flush flag update before zeroing count */
|
||||
MEMBAR_EXIT();
|
||||
- atomic_init(&mutexp->sharecount, 0);
|
||||
+ atomic_init_db(&mutexp->sharecount, 0);
|
||||
} else {
|
||||
DB_ASSERT(env, sharecount > 0);
|
||||
MEMBAR_EXIT();
|
13
depends/patches/intel-ipsec-mb/remove_digest_init.patch
Normal file
13
depends/patches/intel-ipsec-mb/remove_digest_init.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff -dur a/lib/include/sha_generic.h b/lib/include/sha_generic.h
|
||||
index 3752546..77efd91 100644
|
||||
--- a/lib/include/sha_generic.h
|
||||
+++ b/lib/include/sha_generic.h
|
||||
@@ -308,7 +308,7 @@ void sha_generic_1block(const void *data, void *digest,
|
||||
if (data == NULL || digest == NULL)
|
||||
return;
|
||||
#endif
|
||||
- sha_generic_init(digest, sha_type);
|
||||
+// sha_generic_init(digest, sha_type);
|
||||
sha_generic_one_block(data, digest, is_avx, sha_type);
|
||||
#ifdef SAFE_DATA
|
||||
clear_scratch_gps();
|
37
depends/patches/openssl/secure_getenv.patch
Normal file
37
depends/patches/openssl/secure_getenv.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
Solves export of glibc 2.17 secure_getenv because we support down to 2.11
|
||||
|
||||
Patches openssl 1.0.2's usage of secure_getenv from glibc 2.17 to instead
|
||||
always use the fallback OPENSSL_issetugid(), which essentially does the
|
||||
same thing on linux, with the only difference that the glibc version makes
|
||||
decisions on startup, whereas the openssl version does the same check each
|
||||
time the environment is read.
|
||||
|
||||
glibc check: https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/enbl-secure.c;h=9e47526bd3e444e1a19a8ea9fd310b6f47c4db52;hb=HEAD
|
||||
glibc implementation: https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/secure-getenv.c;h=a394eebcf794c1279d66e5bcb71d4b15725e6e5a;hb=HEAD
|
||||
|
||||
openssl check: https://github.com/openssl/openssl/blob/OpenSSL_1_0_2u/crypto/uid.c
|
||||
|
||||
This patch can be removed when glibc 2.17 is the minimum version supported
|
||||
|
||||
Author: Patrick Lodder <patricklodder@users.noreply.github.com>
|
||||
|
||||
diff -dur a/crypto/getenv.c b/crypto/getenv.c
|
||||
--- a/crypto/getenv.c 2019-12-20 13:02:41.000000000 +0000
|
||||
+++ b/crypto/getenv.c 2021-09-20 03:02:04.125747397 +0000
|
||||
@@ -16,16 +16,7 @@
|
||||
|
||||
char *ossl_safe_getenv(const char *name)
|
||||
{
|
||||
-#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||
-# if __GLIBC_PREREQ(2, 17)
|
||||
-# define SECURE_GETENV
|
||||
- return secure_getenv(name);
|
||||
-# endif
|
||||
-#endif
|
||||
-
|
||||
-#ifndef SECURE_GETENV
|
||||
if (OPENSSL_issetugid())
|
||||
return NULL;
|
||||
return getenv(name);
|
||||
-#endif
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
diff -dur a/src/windows.hpp b/src/windows.hpp
|
||||
--- a/src/windows.hpp 2021-07-16 20:31:22.997078113 +0000
|
||||
+++ b/src/windows.hpp 2021-07-16 20:33:21.525281189 +0000
|
||||
@@ -52,6 +52,7 @@
|
||||
#endif
|
||||
|
||||
#include <winsock2.h>
|
||||
+#include <ws2ipdef.h>
|
||||
#include <windows.h>
|
||||
#include <mswsock.h>
|
||||
#include <iphlpapi.h>
|
|
@ -40,49 +40,34 @@ Install Boost lib via Brew from source, and link it to be sure:
|
|||
$brew install boost --build-from-source --HEAD
|
||||
$brew link boost167
|
||||
|
||||
### Get, Patch And Compile BDB 5.1 ###
|
||||
### Get, Patch And Compile BDB 5.3 ###
|
||||
|
||||
Download bdb 5.1.29 source from Oracle.
|
||||
Download bdb 5.3.28 source from Oracle.
|
||||
|
||||
$curl -o db-5.1.29.tar.gz http://download.oracle.com/berkeley-db/db-5.1.29.tar.gz
|
||||
$tar xvfz db-5.1.29.tar.gz
|
||||
$cd db-5.1.29
|
||||
$curl -o db-5.3.28.tar.gz http://download.oracle.com/berkeley-db/db-5.3.28.tar.gz
|
||||
$tar xvfz db-5.3.28.tar.gz
|
||||
$cd db-5.3.28
|
||||
|
||||
Patch bdb 5.1.29 from our patchfiles
|
||||
|
||||
$cd src
|
||||
$cd dbinc
|
||||
$patch -b atomic.h ~/dogecoin/depends/patches/bdb-5.1.29-clang-osx/atomic.h.patch
|
||||
$cd ..
|
||||
$cd mp
|
||||
$patch -b mp_fget.c ~/dogecoin/depends/patches/bdb-5.1.29-clang-osx/mp_fget.c.patch
|
||||
$patch -b mp_mvcc.c ~/dogecoin/depends/patches/bdb-5.1.29-clang-osx/mp_mvcc.c.patch
|
||||
$patch -b mp_region.c ~/dogecoin/depends/patches/bdb-5.1.29-clang-osx/mp_region.c.patch
|
||||
$cd ..
|
||||
$cd mutex
|
||||
$patch -b mut_method.c ~/dogecoin/depends/patches/bdb-5.1.29-clang-osx/mut_method.c.patch
|
||||
$patch -b mut_tas.c ~/dogecoin/depends/patches/bdb-5.1.29-clang-osx/mut_tas.c.patch
|
||||
|
||||
Build BDB 5.1.29
|
||||
Build BDB 5.3.28
|
||||
|
||||
$cd ../..
|
||||
$cd build_unix
|
||||
$../dist/configure CXX=clang++ --enable-cxx
|
||||
$make
|
||||
$sudo mkdir /usr/local/BerkeleyDB.5.1
|
||||
$sudo chown $(whoami):admin /usr/local/BerkeleyDB.5.1
|
||||
$sudo mkdir /usr/local/BerkeleyDB.5.3
|
||||
$sudo chown $(whoami):admin /usr/local/BerkeleyDB.5.3
|
||||
$sudo make install
|
||||
|
||||
### Set some environment variables and links for bdb and openssl ###
|
||||
|
||||
$export LDFLAGS=-L/usr/local/BerkeleyDB.5.1/lib
|
||||
$export CPPFLAGS=-I/usr/local/BerkeleyDB.5.1/include
|
||||
$export LDFLAGS=-L/usr/local/BerkeleyDB.5.3/lib
|
||||
$export CPPFLAGS=-I/usr/local/BerkeleyDB.5.3/include
|
||||
|
||||
_**NOTE:** for MacOS BigSur (11.1) or later, and possibly Catalina (10.15) you will also have to include the "OBJC_OLD_DISPATCH_PROTOTYPES=1" flag._
|
||||
|
||||
_So in this case you want the above export to be:_
|
||||
|
||||
$export CPPFLAGS="-I/usr/local/BerkeleyDB.5.1/include -DOBJC_OLD_DISPATCH_PROTOTYPES=1"
|
||||
$export CPPFLAGS="-I/usr/local/BerkeleyDB.5.3/include -DOBJC_OLD_DISPATCH_PROTOTYPES=1"
|
||||
|
||||
_(Note that the quotes are required.)_
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ PROJECT_BRIEF = "P2P Digital Currency"
|
|||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
|
||||
# the logo to the output directory.
|
||||
|
||||
PROJECT_LOGO = doc/bitcoin_logo_doxygen.png
|
||||
PROJECT_LOGO = doc/dogecoin_logo_doxygen.png
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
|
||||
# into which the generated documentation will be written. If a relative path is
|
||||
|
|
|
@ -1,46 +1,6 @@
|
|||
Dogecoin Core 0.14.2
|
||||
=====================
|
||||
|
||||
Setup
|
||||
---------------------
|
||||
[Dogecoin Core](http://dogecoin.com/) is the reference Dogecoin client and it builds the backbone of the network. However, it downloads and stores the entire history of Bitcoin transactions (which is currently several GBs); depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to a day or more.
|
||||
|
||||
Running
|
||||
---------------------
|
||||
The following are some helpful notes on how to run Dogecoin on your native platform.
|
||||
|
||||
### Unix
|
||||
|
||||
Unpack the files into a directory and run:
|
||||
|
||||
- `bin/dogecoin-qt` (GUI) or
|
||||
- `bin/dogecoind` (headless)
|
||||
|
||||
### Windows
|
||||
|
||||
Unpack the files into a directory, and then run dogecoin-qt.exe.
|
||||
|
||||
### OS X
|
||||
|
||||
Drag Dogecoin-Core to your applications folder, and then run Dogecoin-Core.
|
||||
|
||||
### Need Help?
|
||||
|
||||
* See the documentation at the [Bitcoin Wiki](https://en.bitcoin.it/wiki/Main_Page)
|
||||
for help and more information.
|
||||
* Ask for help on [#dogecoin](http://webchat.freenode.net?channels=dogecoin) on Freenode. If you don't have an IRC client use [webchat here](http://webchat.freenode.net?channels=dogecoin).
|
||||
* Ask for help on the [BitcoinTalk](https://bitcointalk.org/) forums, in the [Dogecoin thread](https://bitcointalk.org/index.php?topic=361813.0).
|
||||
|
||||
Building
|
||||
---------------------
|
||||
The following are developer notes on how to build Dogecoin on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.
|
||||
|
||||
- [OS X Build Notes](build-osx.md)
|
||||
- [Unix Build Notes](build-unix.md)
|
||||
- [Windows Build Notes](build-windows.md)
|
||||
- [OpenBSD Build Notes](build-openbsd.md)
|
||||
- [Gitian Building Guide](gitian-building.md)
|
||||
|
||||
Development
|
||||
---------------------
|
||||
The Dogecoin repo's [root README](/README.md) contains relevant information on the development process and automated testing.
|
||||
|
|
|
@ -48,9 +48,9 @@ Other
|
|||
### Assets Used
|
||||
src/qt/res/icons/about.png
|
||||
src/qt/res/icons/about_qt.png,
|
||||
src/qt/res/icons/bitcoin.icns
|
||||
src/qt/res/icons/bitcoin.ico,
|
||||
src/qt/res/icons/bitcoin.png
|
||||
src/qt/res/icons/dogecoin.icns
|
||||
src/qt/res/icons/dogecoin.ico,
|
||||
src/qt/res/icons/dogecoin.png
|
||||
src/qt/res/icons/clock*.png,
|
||||
src/qt/res/icons/connect*.png
|
||||
src/qt/res/icons/eye_minus.png,
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.2 KiB |
|
@ -1,12 +1,11 @@
|
|||
Building on FreeBSD
|
||||
--------------------
|
||||
|
||||
***NOTE: This documentation is outdated and needs to be updated***
|
||||
|
||||
(Updated as of FreeBSD 11.0)
|
||||
**Last tested with:** 1.14.5-dev (as of 18dbe32)
|
||||
**Tested on:** FreeBSD 11.4
|
||||
|
||||
Clang is installed by default as `cc` compiler, this makes it easier to get
|
||||
started than on [OpenBSD](build-openbsd.md). Installing dependencies:
|
||||
started than on other distros. Installing dependencies:
|
||||
|
||||
pkg install autoconf automake libtool pkgconf
|
||||
pkg install boost-libs openssl libevent
|
||||
|
@ -19,16 +18,19 @@ For the wallet (optional):
|
|||
|
||||
pkg install db5
|
||||
|
||||
This will give a warning "configure: WARNING: Found Berkeley DB other
|
||||
than 4.8; wallets opened by this build will not be portable!", but as FreeBSD never
|
||||
had a binary release, this may not matter. If backwards compatibility
|
||||
with 4.8-built Dogecoin Core is needed follow the steps under "Berkeley DB" above.
|
||||
As of writing, the default hardening routines will fail on the scrypt code, so
|
||||
currently, no hardened executables can be built, and the `--disable-hardening`
|
||||
flag is needed for successful compilation.
|
||||
|
||||
Then build using:
|
||||
|
||||
./autogen.sh
|
||||
./configure --with-incompatible-bdb BDB_CFLAGS="-I/usr/local/include/db5" BDB_LIBS="-L/usr/local/lib -ldb_cxx-5"
|
||||
gmake
|
||||
```bash
|
||||
./autogen.sh
|
||||
./configure --disable-hardening MAKE="gmake" \
|
||||
CFLAGS="-I/usr/local/include" CXXFLAGS="-I/usr/local/include -I/usr/local/include/db5" \
|
||||
LDFLAGS="-L/usr/local/lib -L/usr/local/lib/db5"
|
||||
gmake
|
||||
```
|
||||
|
||||
*Note on debugging*: The version of `gdb` installed by default is [ancient and considered harmful](https://wiki.freebsd.org/GdbRetirement).
|
||||
It is not suitable for debugging a multi-threaded C++ program, not even for getting backtraces. Please install the package `gdb` and
|
||||
|
|
|
@ -17,7 +17,7 @@ Dependencies
|
|||
----------------------
|
||||
|
||||
brew install automake libtool boost miniupnpc openssl pkg-config protobuf qt5 libevent
|
||||
brew install berkeley-db # You need to make sure you install a version >= 5.1.29, but as close to 5.1.29 as possible. Check the homebrew docs to find out how to install older versions.
|
||||
brew install berkeley-db # You need to make sure you install a version >= 5.3.28, but as close to 5.3.28 as possible. Check the homebrew docs to find out how to install older versions.
|
||||
|
||||
If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ Wallet is optional to run a node, see [Wallet](#wallet) section to enable them.
|
|||
Library | Purpose | Description
|
||||
------------|------------------|----------------------
|
||||
miniupnpc | UPnP Support | Firewall-jumping support
|
||||
libdb5.1 | Berkeley DB | Wallet storage (only needed when wallet enabled)
|
||||
libdb5.3 | Berkeley DB | Wallet storage (only needed when wallet enabled)
|
||||
qt | GUI | GUI toolkit (only needed when GUI enabled)
|
||||
protobuf | Payments in GUI | Data interchange format used for payment protocol (only needed when GUI enabled)
|
||||
libqrencode | QR codes in GUI | Optional for generating QR codes (only needed when GUI enabled)
|
||||
|
@ -108,24 +108,24 @@ Create `dogecoin-qt`, the core wallet GUI.
|
|||
#### Wallet
|
||||
BerkeleyDB is required for wallet functionality and use the `wallet.dat` file.
|
||||
|
||||
By default, **Dogecoin Core expect BerkeleyDB 5.1**.
|
||||
By default, **Dogecoin Core expect BerkeleyDB 5.3**.
|
||||
You can use a different version by specifying `--with-incompatible-bdb` flag.
|
||||
|
||||
If no package is available for your distribution in optional dependencies, you can build BerkeleyDB from source :
|
||||
```bash
|
||||
# Install script for BerkeleyDB 5.1
|
||||
# Install script for BerkeleyDB 5.3
|
||||
|
||||
# BerkeleyDB installation directory
|
||||
BDB_PREFIX=$(pwd)/bdb
|
||||
mkdir $BDB_PREFIX
|
||||
|
||||
# Fetch the source and verify shasum
|
||||
wget 'http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz'
|
||||
echo '08238e59736d1aacdd47cfb8e68684c695516c37f4fbe1b8267dde58dc3a576c db-5.1.29.NC.tar.gz' | sha256sum -c
|
||||
wget 'http://download.oracle.com/berkeley-db/db-5.3.28.NC.tar.gz'
|
||||
echo '76a25560d9e52a198d37a31440fd07632b5f1f8f9f2b6d5438f4bc3e7c9013efdb-5.3.28.NC.tar.gz' | sha256sum -c
|
||||
|
||||
# Extract sources
|
||||
tar -xzvf db-5.1.29.NC.tar.gz
|
||||
cd db-5.1.29.NC/build_unix/
|
||||
tar -xzvf db-5.3.28.NC.tar.gz
|
||||
cd db-5.3.28.NC/build_unix/
|
||||
|
||||
# Apply patch (see https://gist.github.com/danieldk/5700533)
|
||||
sed -i 's/__atomic_compare_exchange/__atomic_compare_exchange_db/g' ../src/dbinc/atomic.h
|
||||
|
|
BIN
doc/dogecoin_logo_doxygen.png
Normal file
BIN
doc/dogecoin_logo_doxygen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
71
doc/fee-recommendation.md
Normal file
71
doc/fee-recommendation.md
Normal file
|
@ -0,0 +1,71 @@
|
|||
Dogecoin Fee Recommendation
|
||||
----------------------------
|
||||
|
||||
_last updated for 1.14.5_
|
||||
|
||||
The Dogecoin chain has a relatively low block interval, 1 megabyte blockspace
|
||||
and aims to provide a cheap means for people to transact. Therefore, the biggest
|
||||
threat to the Dogecoin chain as a whole is spam and in 2014, a transaction fee
|
||||
and dust disincentive were introduced, to combat on-chain spam.
|
||||
|
||||
Dogecoin Core implements a number of defaults into the software that reflect the
|
||||
developers' recommendations towards fees and dust limits, that at the moment of
|
||||
release represent the developers best estimate of how these limits should be
|
||||
parametrized. The recommended defaults, as implemented in the Dogecoin Core
|
||||
wallet, are:
|
||||
|
||||
- **0.01 DOGE per kilobyte** transaction fee
|
||||
- **1.00 DOGE** dust limit (discard threshold)
|
||||
- **0.001 DOGE** replace-by-fee increments
|
||||
|
||||
The wallet rejects transactions that have outputs under the dust limit, and
|
||||
discards change to fee if it falls under this limit.
|
||||
|
||||
Note: The recommended dust limit is expected to be lowered in a follow-up
|
||||
release, once enough miners and relay nodes have adopted newly introduced
|
||||
relay dust limits touched upon below.
|
||||
|
||||
Note: In the past, Dogecoin has enforced a rounding function in the fee
|
||||
mechanism. As of version 1.14.5, this is no longer the case, and fees are
|
||||
calculated over the exact size of a transaction. For example, a 192 byte
|
||||
transaction only has to pay `0.01 / 1000 * 192 = 0.00192` DOGE fee.
|
||||
|
||||
## Miner default inclusion policies
|
||||
|
||||
The default values for miners to include a transaction in a block has been set
|
||||
to exactly the recommended fee of **0.01 DOGE/kB.** Dust limits are defined by
|
||||
the miner's mempool policy, see below.
|
||||
|
||||
## Relay and mempool policies
|
||||
|
||||
The relay and mempool acceptance policies are lower than the recommendations
|
||||
by default, to allow for a margin to change recommendations in the future (or
|
||||
user preference) without the need for an adopted software release in advance.
|
||||
This greatly simplifies future policy recommendations. As historically, most
|
||||
relay nodes do not change these default settings, these often represent an
|
||||
absolute mininum
|
||||
|
||||
### Transaction fee
|
||||
|
||||
The default minimum transaction fee for relay is set at **0.001 DOGE/kB**,
|
||||
exactly one-tenth of the recommended fee. This gives miners and relay operators
|
||||
a 10x downward margin to operate within from a spam management perspective.
|
||||
|
||||
### Dust limits
|
||||
|
||||
The mempool logic implements 2 dust limits, a hard dust limit under which a
|
||||
transactions is considered non-standard and rejected, and a soft dust limit
|
||||
that requires the limit itself to be added to the transaction fee, making the
|
||||
output economically unviable.
|
||||
|
||||
- The hard dust limit is set at **0.001 DOGE** - outputs under this value are
|
||||
invalid and rejected.
|
||||
- The soft dust limit is set at **0.01 DOGE** - sending a transaction with outputs
|
||||
under this value, are required to add 0.01 DOGE for each such output, or else
|
||||
will be considered to have too low fee and be rejected.
|
||||
|
||||
### Replace-by-fee and mempool limiting increments
|
||||
|
||||
The increments used for replace-by-fee and limiting the mempool once it has
|
||||
reached its locally defined maximum size, is by default set at one-tenth of
|
||||
the relay fee, or **0.0001 DOGE**.
|
98
doc/files.md
98
doc/files.md
|
@ -1,31 +1,75 @@
|
|||
# Dogecoin Core file system
|
||||
|
||||
* banlist.dat: stores the IPs/Subnets of banned nodes
|
||||
* dogecoin.conf: contains configuration settings for dogecoind or dogecoin-qt
|
||||
* dogecoind.pid: stores the process id of dogecoind while running
|
||||
* blocks/blk000??.dat: block data (custom, 128 MiB per file); since 0.8.0
|
||||
* blocks/rev000??.dat; block undo data (custom); since 0.8.0 (format changed since pre-0.8)
|
||||
* blocks/index/*; block index (LevelDB); since 0.8.0
|
||||
* chainstate/*; block chain state database (LevelDB); since 0.8.0
|
||||
* database/*: BDB database environment; only used for wallet since 0.8.0
|
||||
* db.log: wallet database log file
|
||||
* debug.log: contains debug information and general logging generated by dogecoind or dogecoin-qt
|
||||
* fee_estimates.dat: stores statistics used to estimate minimum transaction fees and priorities required for confirmation; since 0.10.0
|
||||
* mempool.dat: dump of the mempool's transactions; since 0.14.0.
|
||||
* peers.dat: peer IP address database (custom format); since 0.7.0
|
||||
* wallet.dat: personal wallet (BDB) with keys and transactions
|
||||
* .cookie: session RPC authentication cookie (written at start when cookie authentication is used, deleted on shutdown): since 0.12.0
|
||||
* onion_private_key: cached Tor hidden service private key for `-listenonion`: since 0.12.0
|
||||
**Contents**
|
||||
|
||||
Only used in pre-0.8.0
|
||||
---------------------
|
||||
* blktree/*; block chain index (LevelDB); since pre-0.8, replaced by blocks/index/* in 0.8.0
|
||||
* coins/*; unspent transaction output database (LevelDB); since pre-0.8, replaced by chainstate/* in 0.8.0
|
||||
- [Data directory location](#data-directory-location)
|
||||
- [Data directory layout](#data-directory-layout)
|
||||
- [GUI settings](#gui-settings)
|
||||
- [Legacy subdirectories and files](#legacy-subdirectories-and-files)
|
||||
- [Notes](#notes)
|
||||
|
||||
Only used before 0.8.0
|
||||
---------------------
|
||||
* blkindex.dat: block chain index database (BDB); replaced by {chainstate/*,blocks/index/*,blocks/rev000??.dat} in 0.8.0
|
||||
* blk000?.dat: block data (custom, 2 GiB per file); replaced by blocks/blk000??.dat in 0.8.0
|
||||
## Data directory location
|
||||
|
||||
Only used before 0.7.0
|
||||
---------------------
|
||||
* addr.dat: peer IP address database (BDB); replaced by peers.dat in 0.7.0
|
||||
The data directory is the default location where the Dogecoin Core files are stored.
|
||||
|
||||
1. The default data directory paths for supported platforms are:
|
||||
|
||||
Platform | Data directory path
|
||||
---------|--------------------
|
||||
Linux | `$HOME/.dogecoin/`
|
||||
macOS | `$HOME/Library/Application Support/Dogecoin/`
|
||||
Windows | `%APPDATA%\Dogecoin\` <sup>[\[1\]](#note1)</sup>
|
||||
|
||||
2. A custom data directory path can be specified with the `-datadir` option.
|
||||
|
||||
3. All content of the data directory, except for the `dogecoin.conf` file, is chain-specific. This means the actual data directory paths for non-mainnet cases differ:
|
||||
|
||||
Chain | Data directory path
|
||||
--------------|------------------------------
|
||||
(default) | *path_to_datadir*`/`
|
||||
`-testnet` | *path_to_datadir*`/testnet3/`
|
||||
`-regtest` | *path_to_datadir*`/regtest/`
|
||||
|
||||
## Data directory layout
|
||||
|
||||
Subdirectory | File(s) | Description
|
||||
-------------------|-----------------------|------------
|
||||
`blocks/` | | Blocks directory
|
||||
`blocks/index/` | LevelDB database | Block and transaction indices
|
||||
`blocks/` | `blkNNNNN.dat` | Actual blocks (in network format, dumped in raw on disk, 128 MiB per file)
|
||||
`blocks/` | `revNNNNN.dat` | Block undo data (custom format)
|
||||
`chainstate/` | LevelDB database | Blockchain state, a.k.a UTXO database
|
||||
`./` | `anchors.dat` | Anchor IP address database, created on shutdown and deleted at startup. Anchors are last known outgoing block-relay-only peers that are tried to re-connect to on startup
|
||||
`./` | `banlist.dat` | Stores the IPs/subnets of banned nodes
|
||||
`./` | `dogecoin.conf` | User-defined configuration settings for `dogecoind` or `dogecoin-qt`; can be specified by `-conf` option
|
||||
`./` | `dogecoind.pid` | Stores the process ID (PID) of `dogecoind` or `dogecoin-qt` while running; can be specified by `-pid` option
|
||||
`./` | `debug.log` | Contains debug information and general logging generated by `dogecoind` or `dogecoin-qt`
|
||||
`./` | `fee_estimates.dat` | Stores statistics used to estimate smart transaction fees and priorities required for confirmation
|
||||
`./` | `mempool.dat` | Dump of the mempool's transactions
|
||||
`./` | `onion_private_key` | Cached Tor onion service private key for `-listenonion` option
|
||||
`./` | `peers.dat` | Peer IP address database
|
||||
`./` | `.cookie` | Session RPC authentication cookie; if used, created at start and deleted on shutdown; can be specified by `-rpccookiefile` option
|
||||
`./` | `.lock` | Data directory lock file
|
||||
`./` | `db.log` | BDB error file
|
||||
`./` | `wallet.dat` | Personal wallet (a BDB database) with keys and transactions
|
||||
`./` | `.walletlock` | BDB wallet lock file
|
||||
|
||||
## GUI settings
|
||||
|
||||
`dogecoin-qt` uses the [`QSettings`](https://doc.qt.io/qt-5/qsettings.html) class; this implies platform-specific [locations where application settings are stored](https://doc.qt.io/qt-5/qsettings.html#locations-where-application-settings-are-stored).
|
||||
|
||||
## Legacy subdirectories and files
|
||||
|
||||
These subdirectories and files are no longer used by Dogecoin Core:
|
||||
|
||||
Path | Description
|
||||
---------------|-------------
|
||||
`blktree/` | Blockchain index; replaced by `blocks/index/` in 1.10.0
|
||||
`coins/` | Unspent transaction output database; replaced by `chainstate/` in 1.10.0
|
||||
`blkindex.dat` | Blockchain index BDB database; replaced by {`chainstate/`, `blocks/index/`, `blocks/revNNNNN.dat`} in 1.10.0
|
||||
`blk000?.dat` | Block data (custom format, 2 GiB per file); replaced by `blocks/blkNNNNN.dat` in 1.10.0
|
||||
`addr.dat` | Peer IP address BDB database; replaced by `peers.dat` in 1.7.0
|
||||
|
||||
## Notes
|
||||
|
||||
<a name="note1">1</a>. The `/` (slash, U+002F) is used as the platform-independent path component separator in this document.
|
||||
|
|
386
doc/getting-started.md
Normal file
386
doc/getting-started.md
Normal file
|
@ -0,0 +1,386 @@
|
|||
## Getting started
|
||||
|
||||
This tutorial will help you to go through the basics to use Dogecoin Core after you completed the [installation instructions](/INSTALL.md). You now have `dogecoind` or `dogecoin-qt` executables available to run a node, and `dogecoin-cli`/`dogecoin-tx` tools to help you transact DOGE.
|
||||
|
||||
> **Note:** For simplicity, this guide assumes that executables can be found under the `PATH` environment variable.
|
||||
If needed, you can specify their location by typing `PATH=$PATH:/path/to/executables`, or prepend the full path to the command like:
|
||||
> ```console
|
||||
> shibetoshi:~$ /path/to/dogecoin-cli [arguments ...]
|
||||
> ```
|
||||
|
||||
### Table of contents
|
||||
|
||||
1. [Starting a dogecoin node](#starting-a-dogecoin-node)
|
||||
2. [Introduction to the JSON-RPC API](#introduction-to-the-json-rpc-api)
|
||||
* [Creating a wallet](#creating-a-wallet)
|
||||
* [Verifying your balance](#verifying-your-balance)
|
||||
* [Sending transactions](#sending-transactions)
|
||||
* [Inspecting blocks and transactions](#inspecting-blocks-and-transactions)
|
||||
3. [Node configuration](#node-configuration)
|
||||
* [Mainnet, testnet and regtest](#mainnet-testnet-and-regtest)
|
||||
* [Data directory](#data-directory)
|
||||
* [RPC credentials](#rpc-credentials)
|
||||
* [Ports](#ports)
|
||||
* [Memory](#memory)
|
||||
* [Troubleshooting](#troubleshooting)
|
||||
|
||||
## Starting a Dogecoin node
|
||||
|
||||
To start your node, you can run an headless server using `dogecoind`:
|
||||
```console
|
||||
shibetoshi:~$ dogecoind -daemon
|
||||
```
|
||||
|
||||
Or you can use the Graphical User Interface (GUI), `dogecoin-qt`:
|
||||
```console
|
||||
shibetoshi:~$ dogecoin-qt
|
||||
```
|
||||
|
||||
Detailed logging is recorded in `debug.log`, located in the [data directory](#data-directory).
|
||||
*Use `-help` to see all available options for each executable.*
|
||||
|
||||
Your node is now running and starts with a *synchronization process* that downloads the entire blockchain from other nodes. This operation will take many hours to complete, but you are now part of the Dogecoin network!
|
||||
|
||||
> **Note:** The rest of this guide assumes the use of an headless node. The RPC server is not exposed with `dogecoin-qt` until you activate the `-server` option as a startup argument, but inside the GUI application, you can use all the commands explored below (without `dogecoin-cli`) by going to `Help -> Debug window` and inside the popup window selecting the tab `Console`.
|
||||
|
||||
## Introduction to the JSON-RPC API
|
||||
|
||||
Dogecoin Core exposes a JSON-RPC interface that allows you to request information about the network, blockchain and individual transactions, send transactions to the networks and manage your wallet.
|
||||
|
||||
The Dogecoin Core installation provides the `dogecoin-cli` tool to interact with the JSON-RPC from the command line, and the interface is exposed over HTTP on port `22555`, so that other tools and libraries can interact with it.
|
||||
|
||||
To have an overview of the available commands, use the `help` command:
|
||||
|
||||
```console
|
||||
#List all commands
|
||||
shibetoshi:~$ dogecoin-cli help
|
||||
|
||||
#Get help for a specific command
|
||||
shibetoshi:~$ dogecoin-cli help COMMAND
|
||||
```
|
||||
|
||||
Some commands are different, but it's possible to use the [bitcoin RPC API documentation](https://developer.bitcoin.org/reference/rpc/).
|
||||
|
||||
### Creating a wallet
|
||||
|
||||
To receive DOGE, you need an address that is securely derived from a private key through a series of automatic, cryptographic operations. The *address* can be shared with anyone to receive DOGE, but the *private key* is sensitive information that allows anyone that knows it to spend the DOGE on the associated address.
|
||||
|
||||
By default, the Dogecoin Core software will automatically create an address for you and securely store the private key in the wallet file.
|
||||
|
||||
You can list wallet addresses using `getaddressesbyaccount`:
|
||||
|
||||
```console
|
||||
shibetoshi:~$ dogecoin-cli getaddressesbyaccount ""
|
||||
[
|
||||
"DA2fBazU8Y4epNJ2fQRZCcWpxKZY9HrhLN"
|
||||
]
|
||||
```
|
||||
|
||||
Using `getnewaddress` will generate a new wallet address:
|
||||
```console
|
||||
shibetoshi:~$ dogecoin-cli getnewaddress
|
||||
DNnGtXk9khadE7EKCmQzxjnehenX92PKAv
|
||||
```
|
||||
|
||||
Private keys are stored in the `wallet.dat` file. You can use `backupwallet` to save a copy:
|
||||
|
||||
```console
|
||||
shibetoshi:~$ dogecoin-cli backupwallet /path/of/wallet/backup
|
||||
```
|
||||
|
||||
**Tip:** Dogecoin addresses start with the letter `D`.
|
||||
|
||||
You now have two wallet addresses to share with other people to receive DOGE! Consider avoiding [address reuse](https://en.bitcoin.it/wiki/Address_reuse) for anonymity and security reasons.
|
||||
|
||||
### Verifying your balance
|
||||
|
||||
The total balance of all addresses held in your wallet can be found with the `getbalance` command.
|
||||
|
||||
```console
|
||||
#Syntax
|
||||
shibetoshi:~$ dogecoin-cli getbalance "*" minconf
|
||||
```
|
||||
|
||||
`minconf` stands for minimum confirmations.
|
||||
For example, to see current balance with transaction having at least 5 confirmations:
|
||||
|
||||
```console
|
||||
shibetoshi:~$ dogecoin-cli getbalance "*" 5
|
||||
421.552000
|
||||
```
|
||||
|
||||
### Sending transactions
|
||||
|
||||
Dogecoin implements the [Unspent Transaction Output (UTXO)](https://en.wikipedia.org/wiki/Unspent_transaction_output) model to track which amounts of coin belong to an address. Owning DOGE means that you know the private key(s) to addresses that are associated with unspent outputs. To spend them, you have to compose a new transaction that spends the value from currently unspent outputs to new outputs.
|
||||
|
||||
##### sendtoaddress
|
||||
|
||||
It's possible to use a single command to create, sign and send a transaction :
|
||||
```console
|
||||
#Syntax
|
||||
shibetoshi:~$ dogecoin-cli sendtoaddress address amount
|
||||
|
||||
#Example
|
||||
shibetoshi:~$ dogecoin-cli sendtoaddress nWSYUqtimF7B6qW4GBdczaG6jvqKutS1Nh 420
|
||||
```
|
||||
|
||||
So much spending power !
|
||||
|
||||
Alternatively, four commands are needed to manually create a transaction: `listunspent`, `createrawtransaction`, `signrawtransaction` and `sendrawtransaction`.
|
||||
|
||||
##### listunspent
|
||||
|
||||
This displays a list of UTXOs associated to addresses kept in the wallet.
|
||||
|
||||
```console
|
||||
#Syntax
|
||||
shibetoshi:~$ dogecoin-cli listunspent minconf maxconf '["address", ...]'
|
||||
|
||||
#Example
|
||||
shibetoshi:~$ dogecoin-cli listunspent 1 9999999 '["nnJDY1xCRgWQc7vBXHUPMPsEynuZW23Y3P"]'
|
||||
[
|
||||
{
|
||||
"txid": "b869ed6606d52e6446dc12db02cf868ab693dd5b9f661116269536f0f8fa2433",
|
||||
"vout": 0,
|
||||
"address": "nnJDY1xCRgWQc7vBXHUPMPsEynuZW23Y3P",
|
||||
"account": "",
|
||||
"scriptPubKey": "76a914c6977da37560e1432c2e14e16952981a4c272cac88ac",
|
||||
"amount": 100.00000000,
|
||||
"confirmations": 1355,
|
||||
"spendable": true,
|
||||
"solvable": true
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
The `minconf` and `maxconf` parameters filter the minimum and maximum number of [confirmations](https://www.pcmag.com/encyclopedia/term/bitcoin-confirmation) of the UTXO returned.
|
||||
|
||||
> **Note:** The example address starts with `n` instead of `D`, because it uses [testnet](#mainnet-testnet-and-regtest).
|
||||
|
||||
##### createrawtransaction
|
||||
|
||||
You can now build a new transaction using the available UTXOs from above.
|
||||
|
||||
```console
|
||||
#Syntax
|
||||
shibetoshi:~$ utxos_to_use='
|
||||
[
|
||||
{
|
||||
"txid": "id",
|
||||
"vout": n
|
||||
},
|
||||
...
|
||||
]'
|
||||
shibetoshi:~$ dogecoin-cli createrawtransaction "$utxos_to_use" '{"address":amount, ...}'
|
||||
|
||||
#Example
|
||||
shibetoshi:~$ utxos_to_use='
|
||||
[
|
||||
{
|
||||
"txid": "b869ed6606d52e6446dc12db02cf868ab693dd5b9f661116269536f0f8fa2433",
|
||||
"vout": 0
|
||||
}
|
||||
]'
|
||||
shibetoshi:~$ dogecoin-cli createrawtransaction "$utxos_to_use" '{"nWSYUqtimF7B6qW4GBdczaG6jvqKutS1Nh":69, "nnJDY1xCRgWQc7vBXHUPMPsEynuZW23Y3P": 30.999}'
|
||||
01000000013324faf8f03695261611669f5bdd93b68a86cf02db12dc46642ed50666ed69b80000000000ffffffff0200a5459b010000001976a91418a89ee36293f15c4db4c01173babd579243161188ac60b8c4b8000000001976a914c6977da37560e1432c2e14e16952981a4c272cac88ac00000000
|
||||
```
|
||||
|
||||
You can combine multiple UTXO and send it to multiple recipients by extending the `utxos_to_use` and recipient JSON structures.
|
||||
|
||||
> **Tip:** The transaction returned is encoded in hexadecimal encoding. You can use `dogecoin-cli decoderawtransaction` or `dogecoin-tx -json` to convert the content to JSON format.
|
||||
|
||||
##### signrawtransaction
|
||||
|
||||
Before sending a transaction, it must be signed by the private key that the address was derived from. Dogecoin Core will automatically use the correct private key when spending UTXO known to the wallet.
|
||||
|
||||
```console
|
||||
#Syntax
|
||||
shibetoshi:~$ dogecoin-cli signrawtransaction encoded_transaction
|
||||
|
||||
#Example
|
||||
shibetoshi:~$ dogecoin-cli signrawtransaction "01000000013324faf8f03695261611669f5bdd93b68a86cf02db12dc46642ed50666ed69b80000000000ffffffff0200a5459b010000001976a91418a89ee36293f15c4db4c01173babd579243161188ac60b8c4b8000000001976a914c6977da37560e1432c2e14e16952981a4c272cac88ac00000000"
|
||||
{
|
||||
"hex": "01000000013324faf8f03695261611669f5bdd93b68a86cf02db12dc46642ed50666ed69b8000000006a47304402200e1bf722d4335179de170f7c762755b463b3f7b8f026f30950f701bc834f0e6e022036295fdd5e607ca41c4e0e62e59d0911b607bfabedde2424665ffae13564d0e001210388f8f226d12eccd3ba93c1454ec4498b065cea96e29b918fbdb517872ebbf581ffffffff0200a5459b010000001976a91418a89ee36293f15c4db4c01173babd579243161188ac60b8c4b8000000001976a914c6977da37560e1432c2e14e16952981a4c272cac88ac00000000",
|
||||
"complete": true
|
||||
}
|
||||
```
|
||||
|
||||
##### sendrawtransaction
|
||||
|
||||
Finally, broadcast the transaction to the network so that it can be included in a block by miners:
|
||||
|
||||
```console
|
||||
#Syntax
|
||||
shibetoshi:~$ dogecoin-cli sendrawtransaction signed_transaction
|
||||
|
||||
#Example
|
||||
shibetoshi:~$ dogecoin-cli sendrawtransaction 01000000013324faf8f03695261611669f5bdd93b68a86cf02db12dc46642ed50666ed69b8000000006a47304402200e1bf722d4335179de170f7c762755b463b3f7b8f026f30950f701bc834f0e6e022036295fdd5e607ca41c4e0e62e59d0911b607bfabedde2424665ffae13564d0e001210388f8f226d12eccd3ba93c1454ec4498b065cea96e29b918fbdb517872ebbf581ffffffff0200a5459b010000001976a91418a89ee36293f15c4db4c01173babd579243161188ac60b8c4b8000000001976a914c6977da37560e1432c2e14e16952981a4c272cac88ac00000000
|
||||
b4fae2a43cb35f8016a547e9658e061f1da4a043efafecc42f739d46d95dee21
|
||||
```
|
||||
|
||||
### Inspecting blocks and transactions
|
||||
|
||||
Blocks and transactions are identified by unique *hashes*.
|
||||
Let's find the *[coinbase transaction](https://www.javatpoint.com/coinbase-transaction)* of block 69.
|
||||
|
||||
> **Note:** To be able to query transactions not related to your own wallet, like in this example, you will need to enable the `-txindex` option. This options requires the Dogecoin Core software to re-index the entire blockchain, and can take up to several hours.
|
||||
|
||||
First, request the information about block 69:
|
||||
|
||||
```console
|
||||
#Find block hash from his height
|
||||
shibetoshi:~$ dogecoin-cli getblockhash 69
|
||||
3d2def20cd0d3aca148741ef469bda11647a3040d7669c82745d03c728706a8b
|
||||
|
||||
#Get block data
|
||||
shibetoshi:~$ dogecoin-cli getblock 3d2def20cd0d3aca148741ef469bda11647a3040d7669c82745d03c728706a8b
|
||||
{
|
||||
"hash": "3d2def20cd0d3aca148741ef469bda11647a3040d7669c82745d03c728706a8b",
|
||||
"confirmations": 7816,
|
||||
"strippedsize": 190,
|
||||
"size": 190,
|
||||
"weight": 760,
|
||||
"height": 69,
|
||||
"version": 1,
|
||||
"versionHex": "00000001",
|
||||
"merkleroot": "695ce4208fa7a87ef9e99805b0910dc129058ecdceb5cef7e25f71dcdc7936db",
|
||||
"tx": [
|
||||
"695ce4208fa7a87ef9e99805b0910dc129058ecdceb5cef7e25f71dcdc7936db"
|
||||
],
|
||||
"time": 1386475225,
|
||||
"mediantime": 1386475209,
|
||||
"nonce": 3923708672,
|
||||
"bits": "1e0ffff0",
|
||||
"difficulty": 0.000244140625,
|
||||
"chainwork": "0000000000000000000000000000000000000000000000000000000004600460",
|
||||
"previousblockhash": "ffa69e04f928b84f19d84da25fb544340e54dca6c03c33930da245719e61c5ea",
|
||||
"nextblockhash": "44bf8abbbb96d4dcfb95df563e606c37987133ea3e013b23bbddde8d7f905fdd"
|
||||
}
|
||||
```
|
||||
|
||||
The `tx` field contains a list of all transactions included in this block. Only one transaction exist in block 69, the coinbase transaction.
|
||||
|
||||
We can see the entire transaction by querying for its identifier:
|
||||
|
||||
```console
|
||||
#Syntax
|
||||
shibetoshi:~$ dogecoin-cli getrawtransaction txid verbose
|
||||
|
||||
#Example
|
||||
shibetoshi:~$ dogecoin-cli getrawtransaction 695ce4208fa7a87ef9e99805b0910dc129058ecdceb5cef7e25f71dcdc7936db 1
|
||||
{
|
||||
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0e04d9eea3520101062f503253482fffffffff0100ac6156be23000023210340a42a5ad6c4c0cd5ae539657032e0a359bd3e0f95771f34d71691b13460a624ac00000000",
|
||||
"txid": "695ce4208fa7a87ef9e99805b0910dc129058ecdceb5cef7e25f71dcdc7936db",
|
||||
"hash": "695ce4208fa7a87ef9e99805b0910dc129058ecdceb5cef7e25f71dcdc7936db",
|
||||
"size": 109,
|
||||
"vsize": 109,
|
||||
"version": 1,
|
||||
"locktime": 0,
|
||||
"vin": [
|
||||
{
|
||||
"coinbase": "04d9eea3520101062f503253482f",
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 393004.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"asm": "0340a42a5ad6c4c0cd5ae539657032e0a359bd3e0f95771f34d71691b13460a624 OP_CHECKSIG",
|
||||
"hex": "210340a42a5ad6c4c0cd5ae539657032e0a359bd3e0f95771f34d71691b13460a624ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkey",
|
||||
"addresses": [
|
||||
"D5TjotnkoXekNQBCn54CBWxjEzCJMMe7WS"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"blockhash": "3d2def20cd0d3aca148741ef469bda11647a3040d7669c82745d03c728706a8b",
|
||||
"confirmations": 3964556,
|
||||
"time": 1386475225,
|
||||
"blocktime": 1386475225
|
||||
}
|
||||
```
|
||||
|
||||
The `vout` structure will give you information about where the transaction output.
|
||||
|
||||
## Node configuration
|
||||
|
||||
There are many parameters that can be configured to tune your node to your liking. There are two ways to change the configuration.
|
||||
|
||||
Using `dogecoind -help` will display all available configuration parameters that can be added as arguments:
|
||||
|
||||
**Command example :**
|
||||
```console
|
||||
shibetoshi:~$ dogecoind -daemon -paytxfee=0.01 -sendfreetransactions=1 -maxconnections=150
|
||||
```
|
||||
|
||||
Configuration can be persisted by creating a `dogecoin.conf` file. Create it in the directory defined with the `datadir` setting, `$HOME/.dogecoin` by default, or specify the file location with `-conf`.
|
||||
|
||||
**dogecoin.conf example :**
|
||||
```
|
||||
daemon=1
|
||||
server=1
|
||||
listen=1
|
||||
paytxfee=0.01
|
||||
sendfreetransactions=1
|
||||
maxconnections=150
|
||||
```
|
||||
You can see a more concrete example [here](/contrib/debian/examples/dogecoin.conf).
|
||||
|
||||
### Mainnet, testnet and regtest
|
||||
|
||||
When trying out new things, for example to test your application that interacts with the Dogecoin chain, it is recommended to not use the main Dogecoin network. Multiple networks are built-in for this purpose.
|
||||
|
||||
**Mainnet** : The main network where real transaction operate.
|
||||
**Testnet** : The test network, with peers.
|
||||
**Regtest** : The regression test network, to test with only local peers and create blocks on-demand.
|
||||
|
||||
When not specifying any network, *Mainnet* is the network used by default. To enable *testnet*, use the `dogecoind -testnet`.
|
||||
|
||||
To enable *regtest*, use the `-regtest` option.
|
||||
|
||||
> **Tip:** Remember to specify the network when you want to use `dogecoin-cli`.
|
||||
|
||||
### Data directory
|
||||
|
||||
The data directory is the location where Dogecoin Core files are stored, including the wallet, log files and blocks. You can modify the location with the `-datadir` setting.
|
||||
|
||||
**Default location :**
|
||||
|
||||
Platform | Data directory path
|
||||
---------|--------------------
|
||||
Linux | `$HOME/.dogecoin`
|
||||
macOS | `$HOME/Library/Application Support/Dogecoin`
|
||||
Windows | `%APPDATA%\Dogecoin`
|
||||
|
||||
You may need to specify `-datadir` also when using `dogecoin-cli`.
|
||||
|
||||
See the [full documentation on file system](files.md) for more information.
|
||||
|
||||
### RPC credentials
|
||||
|
||||
Authentication is required to interact with the RPC interface. When no credentials are provided, Dogecoin uses a [random cookie](https://bitcoin.org/en/release/v0.12.0#rpc-random-cookie-rpc-authentication) that gets generated when the software is launched. It's possible to define your own credentials using `rpcuser` and `rpcpassword` parameters.
|
||||
|
||||
### Ports
|
||||
|
||||
A node can expose 2 different ports: one port for the **Peer to Peer Network** (P2P) to communicate with other nodes, and a second port for access to the RPC API. By default, the ports are configured as follows:
|
||||
|
||||
| Function | mainnet | testnet | regtest |
|
||||
| :------- | ------: | ------: | ------: |
|
||||
| P2P | 22556 | 44556 | 18444 |
|
||||
| RPC | 22555 | 44555 | 18332 |
|
||||
|
||||
To configure them use the `-port` and `-rpcport` parameters.
|
||||
|
||||
### Memory
|
||||
|
||||
Running Dogecoin Core can require a lot of memory, so in some situations it may be necessary to optimize its usage. You can find more information about reducing the memory footprint in the [related guide](reduce-memory.md).
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
By default, Dogecoin Core keeps detailed logs in the `debug.log` file, located in the `datadir`. Alternatively, the `-printtoconsole` parameter displays the log interactively to the terminal instead.
|
||||
|
||||
To get more verbose log output, you can enable debug mode by using the `-debug=<topic>` parameter to increase logic for a specific topic, or use `-debug=all` to see detailed logs on all topics.
|
|
@ -1,9 +1,9 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.4.
|
||||
.TH DOGECOIN-CLI "1" "August 2021" "dogecoin-cli v1.14.4.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.1.
|
||||
.TH DOGECOIN-CLI "1" "November 2021" "dogecoin-cli v1.14.5.0" "User Commands"
|
||||
.SH NAME
|
||||
dogecoin-cli \- manual page for dogecoin-cli v1.14.4.0
|
||||
dogecoin-cli \- manual page for dogecoin-cli v1.14.5.0
|
||||
.SH DESCRIPTION
|
||||
Dogecoin Core RPC client version v1.14.4.0
|
||||
Dogecoin Core RPC client version v1.14.5.0
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
dogecoin\-cli [options] <command> [params]
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.4.
|
||||
.TH DOGECOIN-QT "1" "August 2021" "dogecoin-qt v1.14.4.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.1.
|
||||
.TH DOGECOIN-QT "1" "November 2021" "dogecoin-qt v1.14.5.0" "User Commands"
|
||||
.SH NAME
|
||||
dogecoin-qt \- manual page for dogecoin-qt v1.14.4.0
|
||||
dogecoin-qt \- manual page for dogecoin-qt v1.14.5.0
|
||||
.SH DESCRIPTION
|
||||
Dogecoin Core version v1.14.4.0 (64\-bit)
|
||||
Dogecoin Core version v1.14.5.0
|
||||
Usage:
|
||||
.IP
|
||||
dogecoin\-qt [command\-line options]
|
||||
|
@ -282,19 +282,24 @@ Do not load the wallet and disable wallet RPC calls
|
|||
.IP
|
||||
Set key pool size to <n> (default: 100)
|
||||
.HP
|
||||
\fB\-discardthreshold=\fR<amt>
|
||||
.IP
|
||||
The minimum transaction output size (in DOGE) used to validate wallet
|
||||
transactions and discard change (to fee) (default: 1.00)
|
||||
.HP
|
||||
\fB\-fallbackfee=\fR<amt>
|
||||
.IP
|
||||
A fee rate (in DOGE/kB) that will be used when fee estimation has
|
||||
insufficient data (default: 1.00)
|
||||
insufficient data (default: 0.01)
|
||||
.HP
|
||||
\fB\-mintxfee=\fR<amt>
|
||||
.IP
|
||||
Fees (in DOGE/kB) smaller than this are considered zero fee for
|
||||
transaction creation (default: 1.00)
|
||||
transaction creation (default: 0.01)
|
||||
.HP
|
||||
\fB\-paytxfee=\fR<amt>
|
||||
.IP
|
||||
Fee (in DOGE/kB) to add to transactions you send (default: 1.00)
|
||||
Fee (in DOGE/kB) to add to transactions you send (default: 0.01)
|
||||
.HP
|
||||
\fB\-rescan\fR
|
||||
.IP
|
||||
|
@ -400,7 +405,7 @@ relaying, mining and transaction creation (default: 0.001)
|
|||
.IP
|
||||
Maximum total fees (in DOGE) to use in a single wallet transaction or
|
||||
raw transaction; setting this too low may abort large
|
||||
transactions (default: 400.00)
|
||||
transactions (default: 100.00)
|
||||
.HP
|
||||
\fB\-printtoconsole\fR
|
||||
.IP
|
||||
|
@ -421,7 +426,12 @@ Node relay options:
|
|||
\fB\-dustlimit=\fR<amt>
|
||||
.IP
|
||||
Amount under which a transaction output is considered dust, in DOGE
|
||||
(default: 1.00)
|
||||
(default: 0.01)
|
||||
.HP
|
||||
\fB\-harddustlimit=\fR<amt>
|
||||
.IP
|
||||
Amount under which a transaction output is considered non\-standard and
|
||||
will not be accepted or relayed, in DOGE (default: 0.001)
|
||||
.HP
|
||||
\fB\-bytespersigop\fR
|
||||
.IP
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.4.
|
||||
.TH DOGECOIN-TX "1" "August 2021" "dogecoin-tx v1.14.4.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.1.
|
||||
.TH DOGECOIN-TX "1" "November 2021" "dogecoin-tx v1.14.5.0" "User Commands"
|
||||
.SH NAME
|
||||
dogecoin-tx \- manual page for dogecoin-tx v1.14.4.0
|
||||
dogecoin-tx \- manual page for dogecoin-tx v1.14.5.0
|
||||
.SH DESCRIPTION
|
||||
Dogecoin Core dogecoin\-tx utility version v1.14.4.0
|
||||
Dogecoin Core dogecoin\-tx utility version v1.14.5.0
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
dogecoin\-tx [options] <hex\-tx> [commands]
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.4.
|
||||
.TH DOGECOIND "1" "August 2021" "dogecoind v1.14.4.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.1.
|
||||
.TH DOGECOIND "1" "November 2021" "dogecoind v1.14.5.0" "User Commands"
|
||||
.SH NAME
|
||||
dogecoind \- manual page for dogecoind v1.14.4.0
|
||||
dogecoind \- manual page for dogecoind v1.14.5.0
|
||||
.SH DESCRIPTION
|
||||
Dogecoin Core Daemon version v1.14.4.0
|
||||
Dogecoin Core Daemon version v1.14.5.0
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
dogecoind [options]
|
||||
|
@ -287,19 +287,24 @@ Do not load the wallet and disable wallet RPC calls
|
|||
.IP
|
||||
Set key pool size to <n> (default: 100)
|
||||
.HP
|
||||
\fB\-discardthreshold=\fR<amt>
|
||||
.IP
|
||||
The minimum transaction output size (in DOGE) used to validate wallet
|
||||
transactions and discard change (to fee) (default: 1.00)
|
||||
.HP
|
||||
\fB\-fallbackfee=\fR<amt>
|
||||
.IP
|
||||
A fee rate (in DOGE/kB) that will be used when fee estimation has
|
||||
insufficient data (default: 1.00)
|
||||
insufficient data (default: 0.01)
|
||||
.HP
|
||||
\fB\-mintxfee=\fR<amt>
|
||||
.IP
|
||||
Fees (in DOGE/kB) smaller than this are considered zero fee for
|
||||
transaction creation (default: 1.00)
|
||||
transaction creation (default: 0.01)
|
||||
.HP
|
||||
\fB\-paytxfee=\fR<amt>
|
||||
.IP
|
||||
Fee (in DOGE/kB) to add to transactions you send (default: 1.00)
|
||||
Fee (in DOGE/kB) to add to transactions you send (default: 0.01)
|
||||
.HP
|
||||
\fB\-rescan\fR
|
||||
.IP
|
||||
|
@ -405,7 +410,7 @@ relaying, mining and transaction creation (default: 0.001)
|
|||
.IP
|
||||
Maximum total fees (in DOGE) to use in a single wallet transaction or
|
||||
raw transaction; setting this too low may abort large
|
||||
transactions (default: 400.00)
|
||||
transactions (default: 100.00)
|
||||
.HP
|
||||
\fB\-printtoconsole\fR
|
||||
.IP
|
||||
|
@ -426,7 +431,12 @@ Node relay options:
|
|||
\fB\-dustlimit=\fR<amt>
|
||||
.IP
|
||||
Amount under which a transaction output is considered dust, in DOGE
|
||||
(default: 1.00)
|
||||
(default: 0.01)
|
||||
.HP
|
||||
\fB\-harddustlimit=\fR<amt>
|
||||
.IP
|
||||
Amount under which a transaction output is considered non\-standard and
|
||||
will not be accepted or relayed, in DOGE (default: 0.001)
|
||||
.HP
|
||||
\fB\-bytespersigop\fR
|
||||
.IP
|
||||
|
|
50
doc/reduce-memory.md
Normal file
50
doc/reduce-memory.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Reduce Memory
|
||||
|
||||
There are a few parameters that can be dialed down to reduce the memory usage of `dogecoind`. This can be useful on embedded systems or small VPSes.
|
||||
|
||||
## In-memory caches
|
||||
|
||||
The size of some in-memory caches can be reduced. As caches trade off memory usage for performance, reducing these will usually have a negative effect on performance.
|
||||
|
||||
- `-dbcache=<n>` - the UTXO database cache size, this defaults to `450`. The unit is MiB (1024).
|
||||
- The minimum value for `-dbcache` is 4.
|
||||
- A lower `-dbcache` makes initial sync time much longer. After the initial sync, the effect is less pronounced for most use-cases, unless fast validation of blocks is important, such as for mining.
|
||||
|
||||
## Memory pool
|
||||
|
||||
- In Dogecoin Core there is a memory pool limiter which can be configured with `-maxmempool=<n>`, where `<n>` is the size in MB (1000). The default value is `300`.
|
||||
- The minimum value for `-maxmempool` is 5.
|
||||
- A lower maximum mempool size means that transactions will be evicted sooner. This will affect any uses of `dogecoind` that process unconfirmed transactions.
|
||||
|
||||
- To completely disable mempool functionality there is the option `-blocksonly`. This will make the client opt out of receiving (and thus relaying) transactions completely, except as part of blocks.
|
||||
|
||||
- Do not use this when using the client to broadcast transactions as any transaction sent will stick out like a sore thumb, affecting privacy. When used with the wallet it should be combined with `-walletbroadcast=0` and `-spendzeroconfchange=0`. Another mechanism for broadcasting outgoing transactions (if any) should be used.
|
||||
|
||||
- Since `1.14.0`, unused memory allocated to the mempool (default: 300MB) is shared with the UTXO cache, so when trying to reduce memory usage you should limit the mempool, with the `-maxmempool` command line argument.
|
||||
|
||||
## Number of peers
|
||||
|
||||
- `-maxconnections=<n>` - the maximum number of connections, this defaults to 125. Each active connection takes up some
|
||||
memory. This option applies only if incoming connections are enabled, otherwise the number of connections will never
|
||||
be more than 10. Of the 10 outbound peers, there can be 8 full-relay connections and 2 block-relay-only ones.
|
||||
|
||||
## Thread configuration
|
||||
|
||||
For each thread a thread stack needs to be allocated. By default on Linux,
|
||||
threads take up 8MiB for the thread stack on a 64-bit system, and 4MiB in a
|
||||
32-bit system.
|
||||
|
||||
- `-par=<n>` - the number of script verification threads, defaults to the number of cores in the system minus one.
|
||||
- `-rpcthreads=<n>` - the number of threads used for processing RPC requests, defaults to `4`.
|
||||
|
||||
## Linux specific
|
||||
|
||||
By default, since glibc `2.10`, the C library will create up to two heap arenas per core. This is known to cause excessive memory usage in some scenarios. To avoid this make a script that sets `MALLOC_ARENA_MAX` before starting dogecoind:
|
||||
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
export MALLOC_ARENA_MAX=1
|
||||
dogecoind
|
||||
```
|
||||
|
||||
The behavior was introduced to increase CPU locality of allocated memory and performance with concurrent allocation, so this setting could in theory reduce performance. However, in Dogecoin Core very little parallel allocation happens, so the impact is expected to be small or absent.
|
|
@ -1,9 +1,10 @@
|
|||
Dogecoin Core version 1.14.4 is now available from:
|
||||
Dogecoin Core version 1.14.5 is now available from:
|
||||
|
||||
<https://github.com/dogecoin/dogecoin/releases/tag/v1.14.4/>
|
||||
<https://github.com/dogecoin/dogecoin/releases/tag/v1.14.5/>
|
||||
|
||||
This is a new minor version release, including various bugfixes and performance improvements. It is a recommended
|
||||
update for all users.
|
||||
This is a new minor version release, including important security updates and
|
||||
changes to network policies. All Dogecoin Core users, miners, services, relay
|
||||
operators and wallet users are strongly recommended to upgrade.
|
||||
|
||||
Please report bugs using the issue tracker at github:
|
||||
|
||||
|
@ -11,14 +12,15 @@ Please report bugs using the issue tracker at github:
|
|||
|
||||
To receive security and update notifications, please watch reddit or Twitter:
|
||||
|
||||
* https://www.reddit.com/r/dogecoin/
|
||||
* https://www.reddit.com/r/dogecoindev/
|
||||
* @Dogecoin on Twitter for high priority announcements
|
||||
* @dogecoin\_devs on Twitter for updates on development work
|
||||
|
||||
Compatibility
|
||||
==============
|
||||
|
||||
Dogecoin Core is extensively tested on Ubuntu Server LTS, Mac OS X and Windows 10.
|
||||
Dogecoin Core is extensively tested on Ubuntu Server LTS, Intel-based macOS
|
||||
and Windows 10.
|
||||
|
||||
Dogecoin Core should also work on most other Unix-like systems but is not
|
||||
frequently tested on them.
|
||||
|
@ -26,147 +28,200 @@ frequently tested on them.
|
|||
Notable changes
|
||||
===============
|
||||
|
||||
Enabling Future Fee Reductions
|
||||
-------------------------------
|
||||
Important Security Updates
|
||||
--------------------------
|
||||
|
||||
This release preparing the network for a reduction of the recommended fees by
|
||||
reducing the default fee requirement 1000x for transaction relay and 100x for
|
||||
mining. At the same time it increases freedom for miner, wallet and node
|
||||
operators to agree on fees regardless of defaults coded into the Dogecoin Core
|
||||
software by solidifying fine-grained controls for operators to deviate from
|
||||
built-in defaults.
|
||||
This release contains fixes for 2 high severity vulnerabilities that affect
|
||||
most Dogecoin Core users.
|
||||
|
||||
This realizes the first part of a two-stage update to lower the fee
|
||||
recommendation.
|
||||
### Remote Code Execution in Dogecoin QT (CVE-2021-3401)
|
||||
|
||||
The main highlights for these enhancements are:
|
||||
This release addresses CVE-2021-3401 that opened potential remote code execution
|
||||
on QT (graphical user interface) wallets through malicious use of
|
||||
`dogecoin:` URIs.
|
||||
|
||||
* Transaction sizes are no longer rounded up to the nearest kilobyte when
|
||||
deciding if a transaction can be accepted from another node and in applying
|
||||
fee-filter requests from peers, when relaying transactions.
|
||||
* The default setting shipped with dogecoin core for relay fee has been reduced
|
||||
to 0.001 DOGE (was: 1 DOGE). This can be changed by operators using the
|
||||
`-mintxrelayfee=<amount>` option.
|
||||
* Spam management has been delegated to miners, where currently a default fee
|
||||
of 0.01 DOGE has been set as a recommended default, to prevent spam on the
|
||||
blockchain. Miners can change this setting to their liking using the
|
||||
`-blockmintxfee` option.
|
||||
* The relay dust limit has been reduced 100x to 0.01 DOGE and is now
|
||||
configurable via the `-dustlimit` option.
|
||||
**Dogecoin QT users are urged to please update their installations to this
|
||||
version immediately**, to prevent malicious actors from exploiting this
|
||||
vulnerability.
|
||||
|
||||
For this release, the recommended fees and dust limits, as implemented in the
|
||||
wallet, remain at 1 DOGE per kilobyte, inclusive of the rounding up to the
|
||||
nearest kilobyte, as miners and the relay network will upgrade gradually,
|
||||
requiring time for transactions with lower fees to be able to be relayed and
|
||||
mined. Not doing this would result in all transactions being rejected by old
|
||||
nodes. A subsequent release will finalize the second stage and lower the
|
||||
recommended fees implemented in the wallet by default. Wallet operators can
|
||||
however, at their own judgement and convenience, change the fees paid from
|
||||
their wallets with the `-paytxfee=<amount per kb>` option.
|
||||
### Sensitive Information Exposure on Unix platforms (CVE-2019-15947)
|
||||
|
||||
Synchronization Improvements
|
||||
----------------------------
|
||||
A fix for CVE-2019-15947 was back-ported from Bitcoin Core to prevent potential
|
||||
leakage of sensitive information when Dogecoin Core crashes on Unix platforms.
|
||||
The vulnerability is patched for systems that run a Linux kernel equal to or
|
||||
higher than 3.4.
|
||||
|
||||
This release removes a bug in the network layer where a 1.14 node would open
|
||||
many parallel requests for headers to its peers, increasing the total data
|
||||
transferred during initial block download up to 50 times the required data, per
|
||||
peer, unnecessarily. As a result, synchronization has time has been reduced by
|
||||
around 2.5 times.
|
||||
**Dogecoin Core wallet users on Linux platforms are urged to please update to
|
||||
this version.**
|
||||
|
||||
Additionally, when a node is in initial synchronization and a peer takes too
|
||||
long to respond to a new header request, it is now aggressively disconnected,
|
||||
to free connection slots for faster peers and not add more stress to already
|
||||
overloaded peers.
|
||||
Fee Reductions
|
||||
--------------
|
||||
|
||||
Security enhancements
|
||||
---------------------
|
||||
This release finalizes a new minimum fee recommendation for all participants on
|
||||
the Dogecoin network, following the reduction of relay and mining defaults in
|
||||
1.14.4. The recommendation has been documented and can be found
|
||||
[here](fee-recommendation.md). With this release, the minimum fees when creating
|
||||
transactions are recommended to be as follows:
|
||||
|
||||
* Proactively disconnect peers sending block headers which would build on an
|
||||
invalid chain.
|
||||
* Improve handling and logging of invalid blocks and their descendants
|
||||
* Fix a bug that was preventing nodes to load a fixed peer list in case DNS
|
||||
services are unreachable.
|
||||
* the recommended minimum transaction fee is 0.01 DOGE/kb, and
|
||||
* the recommended dust limit is 1 DOGE, and
|
||||
* the recommended RBF increment is 0.001 DOGE.
|
||||
|
||||
GUI Improvements
|
||||
----------------
|
||||
### Wallet/UI Changes
|
||||
|
||||
* Add menu option to import a private key, "Import Private Key" from the "File"
|
||||
menu.
|
||||
* Improve displayed result when commands in the debug console return null.
|
||||
* Fix text overflow on printed keys and address fields in the paper wallet
|
||||
generator.
|
||||
* Add column to peers table showing bytes sent/received, accessible via
|
||||
"Debug Window" from the "Help" menu.
|
||||
* Add GUI for adding peers manually, accessible from the peers table of the
|
||||
Debug Window.
|
||||
* The user interface for selecting fees when transacting DOGE has been updated
|
||||
to give an idea of how much is being spent, rather than a block target. As
|
||||
Dogecoin blocks are not full, typically all transactions are mined in the next
|
||||
block, and therefore the target estimation does not makes sense for Dogecoin.
|
||||
* Transaction sizes are no longer rounded up to the nearest kilobyte before
|
||||
calculating fees, which significantly simplifies fee calculation logic and
|
||||
makes it more similar to Bitcoin and Litecoin.
|
||||
* The default minimum transaction fee is now 0.01 DOGE per kilobyte. Note that
|
||||
you may see transactions take longer to be confirmed while using these lower
|
||||
fees, until all miners have updated. The new fee slider can help with getting
|
||||
fast-confirming transactions by sliding it all the way to the maximum, or for
|
||||
both CLI and GUI wallet users, this can be made the default by setting
|
||||
`-paytxfee=5.21`.
|
||||
* Introduce `-discardthreshold`, a wallet-specific, configurable dust limit that
|
||||
enables gradual implementation of the dust limit on the network side. Each
|
||||
transaction created with the wallet will adhere to this threshold
|
||||
rather than the dust limits used for relay, preventing stuck transactions. The
|
||||
wallet will discard any change to fee and reject output amounts that are lower
|
||||
than this limit. Until this release sees significant network adoption, the
|
||||
default dust limit is recommended to stay at 1 DOGE, as versions 1.14.2 until
|
||||
1.14.4 have a bug that rejects any transaction with an output under 1 DOGE.
|
||||
* Derive minimum change from configurable wallet parameters `-discardthreshold`
|
||||
and `-mintxfee`: `minimum change = discard threshold + 2 * minimum fee`.
|
||||
|
||||
RPC Improvements
|
||||
----------------
|
||||
### Relay changes
|
||||
|
||||
`getpeerinfo` now includes `feefilter` value for each peer, to be able to diagnose transaction relay issues.
|
||||
* Split the dust limit into a hard and soft threshold, to reintroduce the
|
||||
economic disincentive for dust, rather than rejection introduced since 1.14.2
|
||||
* `-harddustlimit` is by default set at 0.001 DOGE and sets the value under
|
||||
which transactions will be rejected by nodes.
|
||||
* The dust limit parameter introduced with 1.14.4 (`-dustlimit`) is now the
|
||||
soft dust limit, enforcing the economic disincentive. Each output under this
|
||||
threshold will be accepted as long as the entire limit is added to fee.
|
||||
* Change the default incremental fee used for RBF and mempool limiting to
|
||||
0.0001 DOGE.
|
||||
|
||||
BDB Updated to 5.3
|
||||
------------------
|
||||
|
||||
The Berkley DB version used by Dogecoin Core has been updated to 5.3 (from 5.1)
|
||||
as 5.3 is now standard on many Linux distributions. 5.1 and 5.3 wallet files
|
||||
have been tested to be interchangeable.
|
||||
|
||||
Version display
|
||||
---------------
|
||||
|
||||
The version displayed on QT's overview page has been changed to display the
|
||||
full version rather than just the major version part, because this was confusing
|
||||
wallet users.
|
||||
|
||||
Key Derivation
|
||||
--------------
|
||||
|
||||
The BIP32 hierarchical deterministic key derivation path contained the wrong
|
||||
chain ID. Previously the chain ID 0 was used, it's now correctly set to 3 as
|
||||
per [SLIP44](https://github.com/satoshilabs/slips/blob/master/slip-0044.md).
|
||||
|
||||
The wallet.dat files stay fully interoperable between versions. Wallets created
|
||||
with 1.14.5 will benefit from greater interoperability with hardware wallets in
|
||||
the future.
|
||||
|
||||
Namecoin-compatibile AuxPoW mining
|
||||
----------------------------------
|
||||
|
||||
The `createauxblock` and `submitauxblock` commands have been reintroduced,
|
||||
mimicking the same commands from Namecoin 0.17, allowing miners to separate
|
||||
wallets from block producing nodes by specifying the address for their coinbase
|
||||
transactions.
|
||||
|
||||
Two additional features on top of the Namecoin 0.17 API have been added:
|
||||
|
||||
* The block caching mechanism has been enhanced to enable mining pools to use
|
||||
multiple wallet addresses if desired.
|
||||
* By default the AuxPoW API methods provide the difficulty target in a field
|
||||
named `target`, however this can now be configured to be fully compatible with
|
||||
the Namecoin API (`_target`) by setting the `-rpcnamecoinapi` argument.
|
||||
|
||||
RPC API Changes
|
||||
---------------
|
||||
|
||||
* Added `softdustlimit` and `harddustlimit` fields to `getnetworkinfo` to enable
|
||||
operators and third party scripts to query this information without having to
|
||||
search configuration files or hardcode defaults.
|
||||
* Added `createauxblock` and `submitauxblock` methods
|
||||
* Added `-rpcnamecoinapi` that allows miners to use Namecoin-compatible AuxPoW
|
||||
APIs, for both `getauxblock` and `createauxblock` methods.
|
||||
|
||||
Build System and CI Changes
|
||||
---------------------------
|
||||
|
||||
The build system for dependencies, continuous integration and binary releases
|
||||
has been upgraded from Ubuntu Trusty to Ubuntu Bionic, because the former was
|
||||
fully end-of-life. Ubuntu Bionic extends the useful life of the 1.14 build
|
||||
system to April 2023, by which time we expect to have switched to 1.21 as the
|
||||
main version. With this change, the default gcc used for testing and releases
|
||||
has been updated from version 4.8 to 7.
|
||||
|
||||
The CI environment has been extended to build and test aarch64 binaries, and to
|
||||
perform additional checks that allow us to catch more potential issues early and
|
||||
automatically.
|
||||
|
||||
Additionally, an experimental CI build environment has been introduced to enable
|
||||
ongoing testing and maintenance of incubating features that are not yet ready
|
||||
for release. Currently this contains the AVX2 features that aim to increase the
|
||||
performance of cryptographic routines within Dogecoin Core.
|
||||
|
||||
Minor Changes
|
||||
=============
|
||||
|
||||
* Corrections to French Canadian, Chinese, German, Indonesian, Korean, Polish and Portuguese translations.
|
||||
* Correct a bug that resulted in negative progress per hour being displayed during sync.
|
||||
* Regtest network can now generate AuxPoW blocks.
|
||||
* Add Snap packaging support.
|
||||
* Modify Scrypt code so it's compatible with Alpine Linux's musl library.
|
||||
* Update libevent to 2.1.11
|
||||
* Update ZMQ to 4.3.4
|
||||
* Add build instructions for NixOS.
|
||||
* Fix a rare crash bug on shutdown due to ActivateBestChain() being called when there is no best chain.
|
||||
* Fix port numbers in `contrib/seeds/generate-seeds.py`.
|
||||
* Fix compilation on FreeBSD, which was failing to compile the Scrypt code.
|
||||
* Update the FreeBSD build docs, see `doc/build-freebsd.md`.
|
||||
* Update default dependencies to OpenSSL 1.0.2u.
|
||||
* Refresh translation files to simplify volunteer contributions to translations.
|
||||
* Add xkbcommon 0.8.4 as a separate dependency to fix keyboard compatibility
|
||||
issues and resolve issues with inadvertently used build system libraries.
|
||||
* Harden and expand the recommended systemd unit files in `contrib/init`.
|
||||
* Make the Freetype dependency compile independent from build system libraries.
|
||||
* Update the Univalue library to use the latest version maintained by the
|
||||
Bitcoin Core developers.
|
||||
* Fix the pruning test suite.
|
||||
* Correct the block download timeout for the regtest chain.
|
||||
* Shut down when trying to use a corrupted block from disk.
|
||||
* Add experimental AVX2 support, to improve the performance of SHA operations.
|
||||
* Add a [getting started guide](getting-started.md)
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
* AbcSxyZ
|
||||
* Ahmed Castro
|
||||
* Alan Rudolf
|
||||
* Bertrand Jacquin
|
||||
* Carl Dong
|
||||
* cg
|
||||
* chey
|
||||
* CharesFang
|
||||
* chromatic
|
||||
* Chun Kuan Lee
|
||||
* Cory Fields
|
||||
* creekhu
|
||||
* Dakoda Greaves
|
||||
* David Millard
|
||||
* Demon
|
||||
* Dídac Coll Pujals
|
||||
* Escanor Liones
|
||||
* Daksh Sharma
|
||||
* Dan Raviv
|
||||
* dogespacewizard
|
||||
* Ed Tubbs
|
||||
* Elvis Begović
|
||||
* fanquake
|
||||
* Florian Schade
|
||||
* fmhc
|
||||
* Gabriel Gosselin Roberge
|
||||
* Gabriel Pérez
|
||||
* geekwisdom
|
||||
* Ikko Ashimine
|
||||
* Jeroen Ooms
|
||||
* Jerry Park
|
||||
* Joakim Taule Kartveit
|
||||
* katzenmalen
|
||||
* Khakim Hudaya
|
||||
* kregerl
|
||||
* lee5378
|
||||
* lynklody
|
||||
* Malta Micael
|
||||
* Matheus Tavares
|
||||
* Matt Domko
|
||||
* Maximilian Keller
|
||||
* MD Islam
|
||||
* Mich De L'Orme
|
||||
* Hennadii Stepanov
|
||||
* KabDeveloper
|
||||
* leezhen
|
||||
* Luke Dashjr
|
||||
* Micael Malta
|
||||
* Michi Lumin
|
||||
* motz0815
|
||||
* nformant
|
||||
* Patrick Lodder
|
||||
* Piotr Zajączkowski
|
||||
* p-j01
|
||||
* rht
|
||||
* Ross Nicoll
|
||||
* sabotagebeats
|
||||
* Shafil Alam
|
||||
* stefanwouldgo
|
||||
* Will
|
||||
* xt3r
|
||||
* Zach Latta
|
||||
* Ryan Crosby
|
||||
* Suhas Daftuar
|
||||
* Vasil Dimov
|
||||
* W. J. van der Laan
|
||||
* Xiao Yi
|
||||
|
|
172
doc/release-notes/release-notes-1.14.4.md
Normal file
172
doc/release-notes/release-notes-1.14.4.md
Normal file
|
@ -0,0 +1,172 @@
|
|||
Dogecoin Core version 1.14.4 is now available from:
|
||||
|
||||
<https://github.com/dogecoin/dogecoin/releases/tag/v1.14.4/>
|
||||
|
||||
This is a new minor version release, including various bugfixes and performance improvements. It is a recommended
|
||||
update for all users.
|
||||
|
||||
Please report bugs using the issue tracker at github:
|
||||
|
||||
<https://github.com/dogecoin/dogecoin/issues>
|
||||
|
||||
To receive security and update notifications, please watch reddit or Twitter:
|
||||
|
||||
* https://www.reddit.com/r/dogecoin/
|
||||
* @Dogecoin on Twitter for high priority announcements
|
||||
* @dogecoin\_devs on Twitter for updates on development work
|
||||
|
||||
Compatibility
|
||||
==============
|
||||
|
||||
Dogecoin Core is extensively tested on Ubuntu Server LTS, Mac OS X and Windows 10.
|
||||
|
||||
Dogecoin Core should also work on most other Unix-like systems but is not
|
||||
frequently tested on them.
|
||||
|
||||
Notable changes
|
||||
===============
|
||||
|
||||
Enabling Future Fee Reductions
|
||||
-------------------------------
|
||||
|
||||
This release preparing the network for a reduction of the recommended fees by
|
||||
reducing the default fee requirement 1000x for transaction relay and 100x for
|
||||
mining. At the same time it increases freedom for miner, wallet and node
|
||||
operators to agree on fees regardless of defaults coded into the Dogecoin Core
|
||||
software by solidifying fine-grained controls for operators to deviate from
|
||||
built-in defaults.
|
||||
|
||||
This realizes the first part of a two-stage update to lower the fee
|
||||
recommendation.
|
||||
|
||||
The main highlights for these enhancements are:
|
||||
|
||||
* Transaction sizes are no longer rounded up to the nearest kilobyte when
|
||||
deciding if a transaction can be accepted from another node and in applying
|
||||
fee-filter requests from peers, when relaying transactions.
|
||||
* The default setting shipped with dogecoin core for relay fee has been reduced
|
||||
to 0.001 DOGE (was: 1 DOGE). This can be changed by operators using the
|
||||
`-mintxrelayfee=<amount>` option.
|
||||
* Spam management has been delegated to miners, where currently a default fee
|
||||
of 0.01 DOGE has been set as a recommended default, to prevent spam on the
|
||||
blockchain. Miners can change this setting to their liking using the
|
||||
`-blockmintxfee` option.
|
||||
* The relay dust limit has been reduced 100x to 0.01 DOGE and is now
|
||||
configurable via the `-dustlimit` option.
|
||||
|
||||
For this release, the recommended fees and dust limits, as implemented in the
|
||||
wallet, remain at 1 DOGE per kilobyte, inclusive of the rounding up to the
|
||||
nearest kilobyte, as miners and the relay network will upgrade gradually,
|
||||
requiring time for transactions with lower fees to be able to be relayed and
|
||||
mined. Not doing this would result in all transactions being rejected by old
|
||||
nodes. A subsequent release will finalize the second stage and lower the
|
||||
recommended fees implemented in the wallet by default. Wallet operators can
|
||||
however, at their own judgement and convenience, change the fees paid from
|
||||
their wallets with the `-paytxfee=<amount per kb>` option.
|
||||
|
||||
Synchronization Improvements
|
||||
----------------------------
|
||||
|
||||
This release removes a bug in the network layer where a 1.14 node would open
|
||||
many parallel requests for headers to its peers, increasing the total data
|
||||
transferred during initial block download up to 50 times the required data, per
|
||||
peer, unnecessarily. As a result, synchronization has time has been reduced by
|
||||
around 2.5 times.
|
||||
|
||||
Additionally, when a node is in initial synchronization and a peer takes too
|
||||
long to respond to a new header request, it is now aggressively disconnected,
|
||||
to free connection slots for faster peers and not add more stress to already
|
||||
overloaded peers.
|
||||
|
||||
Security enhancements
|
||||
---------------------
|
||||
|
||||
* Proactively disconnect peers sending block headers which would build on an
|
||||
invalid chain.
|
||||
* Improve handling and logging of invalid blocks and their descendants
|
||||
* Fix a bug that was preventing nodes to load a fixed peer list in case DNS
|
||||
services are unreachable.
|
||||
|
||||
GUI Improvements
|
||||
----------------
|
||||
|
||||
* Add menu option to import a private key, "Import Private Key" from the "File"
|
||||
menu.
|
||||
* Improve displayed result when commands in the debug console return null.
|
||||
* Fix text overflow on printed keys and address fields in the paper wallet
|
||||
generator.
|
||||
* Add column to peers table showing bytes sent/received, accessible via
|
||||
"Debug Window" from the "Help" menu.
|
||||
* Add GUI for adding peers manually, accessible from the peers table of the
|
||||
Debug Window.
|
||||
|
||||
RPC Improvements
|
||||
----------------
|
||||
|
||||
`getpeerinfo` now includes `feefilter` value for each peer, to be able to diagnose transaction relay issues.
|
||||
|
||||
Minor Changes
|
||||
=============
|
||||
|
||||
* Corrections to French Canadian, Chinese, German, Indonesian, Korean, Polish and Portuguese translations.
|
||||
* Correct a bug that resulted in negative progress per hour being displayed during sync.
|
||||
* Regtest network can now generate AuxPoW blocks.
|
||||
* Add Snap packaging support.
|
||||
* Modify Scrypt code so it's compatible with Alpine Linux's musl library.
|
||||
* Update libevent to 2.1.11
|
||||
* Update ZMQ to 4.3.4
|
||||
* Add build instructions for NixOS.
|
||||
* Fix a rare crash bug on shutdown due to ActivateBestChain() being called when there is no best chain.
|
||||
* Fix port numbers in `contrib/seeds/generate-seeds.py`.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
* AbcSxyZ
|
||||
* Ahmed Castro
|
||||
* Alan Rudolf
|
||||
* cg
|
||||
* chey
|
||||
* chromatic
|
||||
* Cory Fields
|
||||
* creekhu
|
||||
* Dakoda Greaves
|
||||
* David Millard
|
||||
* Demon
|
||||
* Dídac Coll Pujals
|
||||
* Escanor Liones
|
||||
* fanquake
|
||||
* Florian Schade
|
||||
* fmhc
|
||||
* Gabriel Gosselin Roberge
|
||||
* Gabriel Pérez
|
||||
* geekwisdom
|
||||
* Ikko Ashimine
|
||||
* Jeroen Ooms
|
||||
* Jerry Park
|
||||
* Joakim Taule Kartveit
|
||||
* katzenmalen
|
||||
* Khakim Hudaya
|
||||
* kregerl
|
||||
* lee5378
|
||||
* lynklody
|
||||
* Malta Micael
|
||||
* Matheus Tavares
|
||||
* Matt Domko
|
||||
* Maximilian Keller
|
||||
* MD Islam
|
||||
* Mich De L'Orme
|
||||
* Michi Lumin
|
||||
* motz0815
|
||||
* nformant
|
||||
* Patrick Lodder
|
||||
* Piotr Zajączkowski
|
||||
* p-j01
|
||||
* rht
|
||||
* Ross Nicoll
|
||||
* sabotagebeats
|
||||
* Shafil Alam
|
||||
* stefanwouldgo
|
||||
* Will
|
||||
* xt3r
|
||||
* Zach Latta
|
|
@ -151,10 +151,11 @@ testScripts = [
|
|||
# 'p2p-versionbits-warning.py',
|
||||
'preciousblock.py',
|
||||
'importprunedfunds.py',
|
||||
'createauxblock.py',
|
||||
'signmessages.py',
|
||||
# 'nulldummy.py',
|
||||
'import-rescan.py',
|
||||
'harddustlimit.py',
|
||||
'dustlimits.py',
|
||||
'paytxfee.py',
|
||||
'feelimit.py',
|
||||
# While fee bumping should work in Doge, these tests depend on free transactions, which we don't support.
|
||||
|
@ -164,6 +165,7 @@ testScripts = [
|
|||
'listsinceblock.py',
|
||||
'p2p-leaktests.py',
|
||||
'replace-by-fee.py',
|
||||
'p2p-policy.py',
|
||||
]
|
||||
if ENABLE_ZMQ:
|
||||
testScripts.append('zmq_test.py')
|
||||
|
|
|
@ -16,7 +16,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
|
||||
def setup_network(self):
|
||||
self.nodes = []
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=1"]))
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.00001"]))
|
||||
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug","-logtimemicros"]))
|
||||
connect_nodes(self.nodes[0], 1)
|
||||
|
||||
|
@ -32,7 +32,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
|
||||
sync_blocks(self.nodes)
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
assert(balance - newbalance <= Decimal("3")) #no more than fees lost
|
||||
assert(balance - newbalance < Decimal("0.01")) #no more than fees lost
|
||||
balance = newbalance
|
||||
|
||||
url = urllib.parse.urlparse(self.nodes[1].url)
|
||||
|
@ -49,33 +49,33 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
inputs.append({"txid":txB, "vout":nB})
|
||||
outputs = {}
|
||||
|
||||
outputs[self.nodes[0].getnewaddress()] = Decimal("14")
|
||||
outputs[self.nodes[0].getnewaddress()] = Decimal("14.99998")
|
||||
outputs[self.nodes[1].getnewaddress()] = Decimal("5")
|
||||
signed = self.nodes[0].signrawtransaction(self.nodes[0].createrawtransaction(inputs, outputs))
|
||||
txAB1 = self.nodes[0].sendrawtransaction(signed["hex"])
|
||||
|
||||
# Identify the 14.99998btc output
|
||||
nAB = next(i for i, vout in enumerate(self.nodes[0].getrawtransaction(txAB1, 1)["vout"]) if vout["value"] == Decimal("14"))
|
||||
nAB = next(i for i, vout in enumerate(self.nodes[0].getrawtransaction(txAB1, 1)["vout"]) if vout["value"] == Decimal("14.99998"))
|
||||
|
||||
#Create a child tx spending AB1 and C
|
||||
inputs = []
|
||||
inputs.append({"txid":txAB1, "vout":nAB})
|
||||
inputs.append({"txid":txC, "vout":nC})
|
||||
outputs = {}
|
||||
outputs[self.nodes[0].getnewaddress()] = Decimal("23")
|
||||
outputs[self.nodes[0].getnewaddress()] = Decimal("24.9996")
|
||||
signed2 = self.nodes[0].signrawtransaction(self.nodes[0].createrawtransaction(inputs, outputs))
|
||||
txABC2 = self.nodes[0].sendrawtransaction(signed2["hex"])
|
||||
|
||||
# In mempool txs from self should increase balance from change
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
assert_equal(newbalance, balance - Decimal("30") + Decimal("23"))
|
||||
assert_equal(newbalance, balance - Decimal("30") + Decimal("24.9996"))
|
||||
balance = newbalance
|
||||
|
||||
# Restart the node with a higher min relay fee so the parent tx is no longer in mempool
|
||||
# TODO: redo with eviction
|
||||
# Note had to make sure tx did not have AllowFree priority
|
||||
stop_node(self.nodes[0],0)
|
||||
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=5"])
|
||||
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.0001"])
|
||||
|
||||
# Verify txs no longer in mempool
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
||||
|
@ -83,7 +83,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
# Not in mempool txs from self should only reduce balance
|
||||
# inputs are still spent, but change not received
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
assert_equal(newbalance, balance - Decimal("23"))
|
||||
assert_equal(newbalance, balance - Decimal("24.9996"))
|
||||
# Unconfirmed received funds that are not in mempool, also shouldn't show
|
||||
# up in unconfirmed balance
|
||||
unconfbalance = self.nodes[0].getunconfirmedbalance() + self.nodes[0].getbalance()
|
||||
|
@ -101,7 +101,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
|
||||
# Verify that even with a low min relay fee, the tx is not reaccepted from wallet on startup once abandoned
|
||||
stop_node(self.nodes[0],0)
|
||||
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=1"])
|
||||
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.00001"])
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
||||
assert_equal(self.nodes[0].getbalance(), balance)
|
||||
|
||||
|
@ -110,21 +110,21 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
# But its child tx remains abandoned
|
||||
self.nodes[0].sendrawtransaction(signed["hex"])
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
assert_equal(newbalance, balance - Decimal("20") + Decimal("14"))
|
||||
assert_equal(newbalance, balance - Decimal("20") + Decimal("14.99998"))
|
||||
balance = newbalance
|
||||
|
||||
# Send child tx again so its unabandoned
|
||||
self.nodes[0].sendrawtransaction(signed2["hex"])
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
assert_equal(newbalance, balance - Decimal("10") - Decimal("14") + Decimal("23"))
|
||||
assert_equal(newbalance, balance - Decimal("10") - Decimal("14.99998") + Decimal("24.9996"))
|
||||
balance = newbalance
|
||||
|
||||
# Remove using high relay fee again
|
||||
stop_node(self.nodes[0],0)
|
||||
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=5"])
|
||||
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.0001"])
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
assert_equal(newbalance, balance - Decimal("23"))
|
||||
assert_equal(newbalance, balance - Decimal("24.9996"))
|
||||
balance = newbalance
|
||||
|
||||
# Create a double spend of AB1 by spending again from only A's 10 output
|
||||
|
@ -132,7 +132,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
inputs =[]
|
||||
inputs.append({"txid":txA, "vout":nA})
|
||||
outputs = {}
|
||||
outputs[self.nodes[1].getnewaddress()] = Decimal("9")
|
||||
outputs[self.nodes[1].getnewaddress()] = Decimal("9.999")
|
||||
tx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
signed = self.nodes[0].signrawtransaction(tx)
|
||||
self.nodes[1].sendrawtransaction(signed["hex"])
|
||||
|
|
|
@ -70,6 +70,7 @@ class BumpFeeTest(BitcoinTestFramework):
|
|||
test_rebumping(rbf_node, dest_address)
|
||||
test_rebumping_not_replaceable(rbf_node, dest_address)
|
||||
test_unconfirmed_not_spendable(rbf_node, rbf_node_address)
|
||||
test_dogecoin_wallet_minchange(rbf_node, dest_address)
|
||||
test_locked_wallet_fails(rbf_node, dest_address)
|
||||
print("Success")
|
||||
|
||||
|
@ -202,26 +203,26 @@ def test_settxfee(rbf_node, dest_address):
|
|||
rbftx = rbf_node.gettransaction(rbfid)
|
||||
rbf_node.settxfee(Decimal("5.00000000"))
|
||||
bumped_tx = rbf_node.bumpfee(rbfid)
|
||||
assert_equal(bumped_tx["fee"], abs(rbftx["fee"]) + Decimal("0.50000000"))
|
||||
assert_equal(bumped_tx["fee"], abs(rbftx["fee"]) + Decimal("0.00100000"))
|
||||
rbf_node.settxfee(Decimal("0.00000000")) # unset paytxfee
|
||||
|
||||
|
||||
def test_rebumping(rbf_node, dest_address):
|
||||
# check that re-bumping the original tx fails, but bumping the bumper succeeds
|
||||
rbf_node.settxfee(Decimal("10.00000000"))
|
||||
rbfid = create_fund_sign_send(rbf_node, {dest_address: 7.00000000})
|
||||
bumped = rbf_node.bumpfee(rbfid, {"totalFee": 1050000000})
|
||||
assert_raises_jsonrpc(-4, "already bumped", rbf_node.bumpfee, rbfid, {"totalFee": 11000})
|
||||
rbf_node.bumpfee(bumped["txid"], {"totalFee": 1100000000})
|
||||
rbfid = create_fund_sign_send(rbf_node, {dest_address: 8.00000000})
|
||||
bumped = rbf_node.bumpfee(rbfid, {"totalFee": 1000100000})
|
||||
assert_raises_jsonrpc(-4, "already bumped", rbf_node.bumpfee, rbfid, {"totalFee": 1000100000})
|
||||
rbf_node.bumpfee(bumped["txid"], {"totalFee": 1000200000})
|
||||
rbf_node.settxfee(Decimal("0.00000000"))
|
||||
|
||||
|
||||
def test_rebumping_not_replaceable(rbf_node, dest_address):
|
||||
# check that re-bumping a non-replaceable bump tx fails
|
||||
rbfid = create_fund_sign_send(rbf_node, {dest_address: 7.00000000})
|
||||
bumped = rbf_node.bumpfee(rbfid, {"totalFee": 150000000, "replaceable": False})
|
||||
bumped = rbf_node.bumpfee(rbfid, {"totalFee": 100100000, "replaceable": False})
|
||||
assert_raises_jsonrpc(-4, "Transaction is not BIP 125 replaceable", rbf_node.bumpfee, bumped["txid"],
|
||||
{"totalFee": 200000000})
|
||||
{"totalFee": 100200000})
|
||||
|
||||
|
||||
def test_unconfirmed_not_spendable(rbf_node, rbf_node_address):
|
||||
|
@ -276,6 +277,37 @@ def test_locked_wallet_fails(rbf_node, dest_address):
|
|||
assert_raises_jsonrpc(-13, "Please enter the wallet passphrase with walletpassphrase first.",
|
||||
rbf_node.bumpfee, rbfid)
|
||||
|
||||
def test_dogecoin_wallet_minchange(rbf_node, dest_address):
|
||||
input = Decimal("10.00000000")
|
||||
discard_threshold = Decimal("1.00000000") # DEFAULT_DISCARD_THRESHOLD
|
||||
min_fee = Decimal("0.01000000") # DEFAULT_TRANSACTION_FEE
|
||||
min_change = discard_threshold + 2 * min_fee # MIN_CHANGE
|
||||
bumpfee = Decimal("0.001") # WALLET_INCREMENTAL_RELAY_FEE
|
||||
est_tx_size = Decimal("0.226") # 1 in, 2 out
|
||||
|
||||
# create a transaction with minimum fees
|
||||
destamount = input - min_change - min_fee * est_tx_size
|
||||
rbfid = spend_one_input(rbf_node,
|
||||
input,
|
||||
{dest_address: destamount,
|
||||
get_change_address(rbf_node): min_change})
|
||||
|
||||
# bump the fee with the default incremental fee; this should add 0.001 DOGE
|
||||
bumped_tx = rbf_node.bumpfee(rbfid)
|
||||
assert_equal(bumped_tx["fee"], min_fee * est_tx_size + bumpfee)
|
||||
|
||||
# bump the fee to only have a change output with the discard threshold
|
||||
# plus half the incremental fee
|
||||
newfee = int((input - destamount - discard_threshold - bumpfee / 2 ) * 100000000)
|
||||
bumped_tx = rbf_node.bumpfee(bumped_tx["txid"], {"totalFee": newfee})
|
||||
assert_equal(bumped_tx["fee"], input - destamount - discard_threshold - bumpfee / 2)
|
||||
|
||||
# now bump with the default incremental fee again; as the resulting change
|
||||
# output will be under the discard threshold, this must discard all change
|
||||
# to fee
|
||||
bumped_tx = rbf_node.bumpfee(bumped_tx["txid"])
|
||||
assert_equal(bumped_tx["fee"], input - destamount)
|
||||
rbf_node.settxfee(Decimal("0.00000000"))
|
||||
|
||||
def create_fund_sign_send(node, outputs):
|
||||
rawtx = node.createrawtransaction([], outputs)
|
||||
|
|
215
qa/rpc-tests/createauxblock.py
Normal file
215
qa/rpc-tests/createauxblock.py
Normal file
|
@ -0,0 +1,215 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright (c) 2021 The Dogecoin Core Developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""CreateAuxBlock QA test.
|
||||
|
||||
# Tests createauxblock and submitauxblock RPC endpoints
|
||||
"""
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
|
||||
from test_framework import scrypt_auxpow as auxpow
|
||||
|
||||
class CreateAuxBlockTest(BitcoinTestFramework):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 2
|
||||
self.is_network_split = False
|
||||
|
||||
def setup_network(self):
|
||||
self.nodes = []
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-txindex"]))
|
||||
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-rpcnamecoinapi"]))
|
||||
connect_nodes_bi(self.nodes, 0, 1)
|
||||
self.sync_all()
|
||||
|
||||
def run_test(self):
|
||||
# Generate an initial chain
|
||||
self.nodes[0].generate(100)
|
||||
self.sync_all()
|
||||
# Generate a block so that we are not "downloading blocks".
|
||||
self.nodes[1].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
dummy_p2pkh_addr = "mmMP9oKFdADezYzduwJFcLNmmi8JHUKdx9"
|
||||
dummy_p2sh_addr = "2Mwvgpd2H7wDPXx8jWe3Vqiciix6JqSbsyz"
|
||||
|
||||
# Compare basic data of createauxblock to getblocktemplate.
|
||||
auxblock = self.nodes[0].createauxblock(dummy_p2pkh_addr)
|
||||
blocktemplate = self.nodes[0].getblocktemplate()
|
||||
assert_equal(auxblock["coinbasevalue"], blocktemplate["coinbasevalue"])
|
||||
assert_equal(auxblock["bits"], blocktemplate["bits"])
|
||||
assert_equal(auxblock["height"], blocktemplate["height"])
|
||||
assert_equal(auxblock["previousblockhash"], blocktemplate["previousblockhash"])
|
||||
|
||||
# Compare target and take byte order into account.
|
||||
target = auxblock["target"]
|
||||
reversedTarget = auxpow.reverseHex(target)
|
||||
assert_equal(reversedTarget, blocktemplate["target"])
|
||||
|
||||
# Verify data that can be found in another way.
|
||||
assert_equal(auxblock["chainid"], 98)
|
||||
assert_equal(auxblock["height"], self.nodes[0].getblockcount() + 1)
|
||||
assert_equal(auxblock["previousblockhash"], self.nodes[0].getblockhash(auxblock["height"] - 1))
|
||||
|
||||
# Calling again should give the same block.
|
||||
auxblock2 = self.nodes[0].createauxblock(dummy_p2pkh_addr)
|
||||
assert_equal(auxblock2, auxblock)
|
||||
|
||||
# Calling with an invalid address must fail
|
||||
try:
|
||||
auxblock2 = self.nodes[0].createauxblock("x")
|
||||
raise AssertionError("invalid address accepted")
|
||||
except JSONRPCException as exc:
|
||||
assert_equal(exc.error["code"], -8)
|
||||
|
||||
# Calling with a different address ...
|
||||
dummy_addr2 = self.nodes[0].getnewaddress()
|
||||
auxblock3 = self.nodes[0].createauxblock(dummy_addr2)
|
||||
|
||||
# ... must give another block because the coinbase recipient differs ...
|
||||
assert auxblock3["hash"] != auxblock["hash"]
|
||||
|
||||
# ... but must have retained the same parameterization otherwise
|
||||
assert_equal(auxblock["coinbasevalue"], auxblock3["coinbasevalue"])
|
||||
assert_equal(auxblock["bits"], auxblock3["bits"])
|
||||
assert_equal(auxblock["height"], auxblock3["height"])
|
||||
assert_equal(auxblock["previousblockhash"], auxblock3["previousblockhash"])
|
||||
assert_equal(auxblock["chainid"], auxblock3["chainid"])
|
||||
assert_equal(auxblock["target"], auxblock3["target"])
|
||||
|
||||
# If we receive a new block, the template cache must be emptied.
|
||||
self.sync_all()
|
||||
self.nodes[1].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
auxblock4 = self.nodes[0].createauxblock(dummy_p2pkh_addr)
|
||||
assert auxblock["hash"] != auxblock4["hash"]
|
||||
try:
|
||||
self.nodes[0].submitauxblock(auxblock["hash"], "x")
|
||||
raise AssertionError("invalid block hash accepted")
|
||||
except JSONRPCException as exc:
|
||||
assert_equal(exc.error["code"], -8)
|
||||
|
||||
# Invalid format for auxpow.
|
||||
try:
|
||||
self.nodes[0].submitauxblock(auxblock4["hash"], "x")
|
||||
raise AssertionError("malformed auxpow accepted")
|
||||
except JSONRPCException as exc:
|
||||
assert_equal(exc.error["code"], -1)
|
||||
|
||||
# Invalidate the block again, send a transaction and query for the
|
||||
# auxblock to solve that contains the transaction.
|
||||
self.nodes[0].generate(1)
|
||||
addr = self.nodes[1].getnewaddress()
|
||||
txid = self.nodes[0].sendtoaddress(addr, 1)
|
||||
self.sync_all()
|
||||
assert_equal(self.nodes[1].getrawmempool(), [txid])
|
||||
auxblock = self.nodes[0].createauxblock(dummy_p2pkh_addr)
|
||||
reversedTarget = auxpow.reverseHex(auxblock["target"])
|
||||
|
||||
# Compute invalid auxpow.
|
||||
apow = auxpow.computeAuxpowWithChainId(auxblock["hash"], reversedTarget, "98", False)
|
||||
res = self.nodes[0].submitauxblock(auxblock["hash"], apow)
|
||||
assert not res
|
||||
|
||||
# Compute and submit valid auxpow.
|
||||
apow = auxpow.computeAuxpowWithChainId(auxblock["hash"], reversedTarget, "98", True)
|
||||
res = self.nodes[0].submitauxblock(auxblock["hash"], apow)
|
||||
assert res
|
||||
|
||||
# Make sure that the block is accepted.
|
||||
self.sync_all()
|
||||
assert_equal(self.nodes[1].getrawmempool(), [])
|
||||
height = self.nodes[1].getblockcount()
|
||||
assert_equal(height, auxblock["height"])
|
||||
assert_equal(self.nodes[1].getblockhash(height), auxblock["hash"])
|
||||
|
||||
# check the mined block and transaction
|
||||
self.check_mined_block(auxblock, apow, dummy_p2pkh_addr, Decimal("500000"), txid)
|
||||
|
||||
# Mine to a p2sh address while having multiple cached aux block templates
|
||||
auxblock1 = self.nodes[0].createauxblock(dummy_p2pkh_addr)
|
||||
auxblock2 = self.nodes[0].createauxblock(dummy_p2sh_addr)
|
||||
auxblock3 = self.nodes[0].createauxblock(dummy_addr2)
|
||||
reversedTarget = auxpow.reverseHex(auxblock2["target"])
|
||||
apow = auxpow.computeAuxpowWithChainId(auxblock2["hash"], reversedTarget, "98", True)
|
||||
res = self.nodes[0].submitauxblock(auxblock2["hash"], apow)
|
||||
assert res
|
||||
|
||||
self.sync_all()
|
||||
|
||||
# check the mined block
|
||||
self.check_mined_block(auxblock2, apow, dummy_p2sh_addr, Decimal("500000"))
|
||||
|
||||
# Solve the first p2pkh template before requesting a new auxblock
|
||||
# this succeeds but creates a chaintip fork
|
||||
reversedTarget = auxpow.reverseHex(auxblock1["target"])
|
||||
apow = auxpow.computeAuxpowWithChainId(auxblock1["hash"], reversedTarget, "98", True)
|
||||
res = self.nodes[0].submitauxblock(auxblock1["hash"], apow)
|
||||
assert res
|
||||
|
||||
chaintips = self.nodes[0].getchaintips()
|
||||
tipsFound = 0;
|
||||
for ct in chaintips:
|
||||
if ct["hash"] in [ auxblock1["hash"], auxblock2["hash"] ]:
|
||||
tipsFound += 1
|
||||
assert_equal(tipsFound, 2)
|
||||
|
||||
# Solve the last p2pkh template after requesting a new auxblock - this fails
|
||||
self.nodes[0].createauxblock(dummy_p2pkh_addr)
|
||||
reversedTarget = auxpow.reverseHex(auxblock3["target"])
|
||||
apow = auxpow.computeAuxpowWithChainId(auxblock3["hash"], reversedTarget, "98", True)
|
||||
try:
|
||||
self.nodes[0].submitauxblock(auxblock3["hash"], apow)
|
||||
raise AssertionError("Outdated blockhash accepted")
|
||||
except JSONRPCException as exc:
|
||||
assert_equal(exc.error["code"], -8)
|
||||
|
||||
self.sync_all()
|
||||
|
||||
# Call createauxblock while using the Namecoin API
|
||||
nmc_api_auxblock = self.nodes[1].createauxblock(dummy_p2pkh_addr)
|
||||
|
||||
# must not contain a "target" field, but a "_target" field
|
||||
assert "target" not in nmc_api_auxblock
|
||||
assert "_target" in nmc_api_auxblock
|
||||
|
||||
reversedTarget = auxpow.reverseHex(nmc_api_auxblock["_target"])
|
||||
apow = auxpow.computeAuxpowWithChainId(nmc_api_auxblock["hash"], reversedTarget, "98", True)
|
||||
res = self.nodes[1].submitauxblock(nmc_api_auxblock["hash"], apow)
|
||||
assert res
|
||||
|
||||
self.sync_all()
|
||||
|
||||
# check the mined block
|
||||
self.check_mined_block(nmc_api_auxblock, apow, dummy_p2pkh_addr, Decimal("500000"))
|
||||
|
||||
def check_mined_block(self, auxblock, apow, addr, min_value, txid=None):
|
||||
# Call getblock and verify the auxpow field.
|
||||
data = self.nodes[1].getblock(auxblock["hash"])
|
||||
assert "auxpow" in data
|
||||
auxJson = data["auxpow"]
|
||||
assert_equal(auxJson["index"], 0)
|
||||
assert_equal(auxJson["parentblock"], apow[-160:])
|
||||
|
||||
# Call getrawtransaction and verify the coinbase tx
|
||||
coinbasetx = self.nodes[0].getrawtransaction(data["tx"][0], True)
|
||||
|
||||
assert coinbasetx["vout"][0]["value"] >= min_value
|
||||
assert_equal(coinbasetx["vout"][0]["scriptPubKey"]["addresses"][0], addr)
|
||||
|
||||
# Make sure the coinbase contains the block height
|
||||
coinbase = coinbasetx["vin"][0]["coinbase"]
|
||||
assert_equal("01%02x01" % auxblock["height"], coinbase[0:6])
|
||||
|
||||
# Make sure our transaction got mined, if any
|
||||
if not txid is None:
|
||||
assert txid in data["tx"]
|
||||
|
||||
if __name__ == "__main__":
|
||||
CreateAuxBlockTest().main()
|
177
qa/rpc-tests/dustlimits.py
Normal file
177
qa/rpc-tests/dustlimits.py
Normal file
|
@ -0,0 +1,177 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2021 The Dogecoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Dust limit QA test.
|
||||
|
||||
# Tests nodes with differing mempool/relay dust limits
|
||||
"""
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
from decimal import Decimal
|
||||
|
||||
class DustLimitTest(BitcoinTestFramework):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 4
|
||||
|
||||
# set up receiving addresses outside of nodes' wallets
|
||||
self.recv_1 = "n4LRQGEKcyRCXqD2MH3ompyMTJKitxu1WP"
|
||||
self.recv_2 = "n1eAe5K2AQUtbmMxVzWnGAyq4hkWJdse2x"
|
||||
|
||||
# seed moneys
|
||||
self.seed = 100
|
||||
|
||||
def setup_nodes(self, split=False):
|
||||
nodes = []
|
||||
|
||||
# 1.10.0-like node with only a soft dust limit
|
||||
nodes.append(start_node(0, self.options.tmpdir,
|
||||
["-acceptnonstdtxn=0", "-dustlimit=1", "-harddustlimit=0.0", "-minrelaytxfee=1", "-debug"]))
|
||||
|
||||
# 1.14.2-like node with only a hard dust limit
|
||||
nodes.append(start_node(1, self.options.tmpdir,
|
||||
["-acceptnonstdtxn=0", "-dustlimit=1", "-harddustlimit=1", "-minrelaytxfee=1", "-debug"]))
|
||||
|
||||
# 1.14.5-like node with a lower, different hard and soft dust limit
|
||||
nodes.append(start_node(2, self.options.tmpdir,
|
||||
["-acceptnonstdtxn=0", "-dustlimit=0.01", "-harddustlimit=0.001", "-debug"]))
|
||||
|
||||
# node that should accept everything
|
||||
nodes.append(start_node(3, self.options.tmpdir,
|
||||
["-acceptnonstdtxn=0", "-dustlimit=0.0", "-harddustlimit=0.0", "-minrelaytxfee=0.00000001", "-debug"]))
|
||||
|
||||
return nodes
|
||||
|
||||
def setup_network(self, split = False):
|
||||
self.nodes = self.setup_nodes()
|
||||
|
||||
# connect everything to everything
|
||||
for s in range(0, self.num_nodes):
|
||||
for t in range(s+1, self.num_nodes):
|
||||
connect_nodes_bi(self.nodes, s, t)
|
||||
|
||||
self.is_network_split = False
|
||||
self.sync_all()
|
||||
|
||||
def run_test(self):
|
||||
|
||||
# make sure the dust limits got configured
|
||||
self.check_dust_config(self.nodes[0], Decimal("1.0"), Decimal("0.0"))
|
||||
self.check_dust_config(self.nodes[1], Decimal("1.0"), Decimal("1.0"))
|
||||
self.check_dust_config(self.nodes[2], Decimal("0.01"), Decimal("0.001"))
|
||||
self.check_dust_config(self.nodes[3], Decimal("0.0"), Decimal("0.0"))
|
||||
|
||||
# set up 10 seeded addresses for node 0-2
|
||||
addrs = []
|
||||
for i in range(3):
|
||||
for _ in range(10):
|
||||
addrs.append(self.nodes[i].getnewaddress())
|
||||
|
||||
# mine some blocks and prepare some coins
|
||||
self.nodes[2].generate(1)
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(101)
|
||||
self.sync_all()
|
||||
for addr in addrs:
|
||||
self.nodes[0].sendtoaddress(addr, self.seed)
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
# create dusty transactions
|
||||
|
||||
txids = [
|
||||
self.send_dusty_tx(self.nodes[1], Decimal("1"), Decimal("1")), # goes to all
|
||||
self.send_dusty_tx(self.nodes[0], Decimal("0.9"), Decimal("2")), # goes to 3/4
|
||||
self.send_dusty_tx(self.nodes[0], Decimal("0.0009"), Decimal("2")), # goes to 3/4
|
||||
self.send_dusty_tx(self.nodes[2], Decimal("0.001"), Decimal("2")), # goes to 3/4
|
||||
self.send_dusty_tx(self.nodes[2], Decimal("0.001"), Decimal("0.02")), # goes to 2/4
|
||||
]
|
||||
|
||||
# nodes do not accept dust under their hard dust limit
|
||||
# no matter how much fee is paid
|
||||
self.get_dust_rejection(self.nodes[2], Decimal("0.0009"), Decimal("5"))
|
||||
self.get_dust_rejection(self.nodes[1], Decimal("0.9"), Decimal("5"))
|
||||
|
||||
# wait 15 seconds to sync mempools
|
||||
time.sleep(15)
|
||||
|
||||
assert_equal(self.nodes[0].getmempoolinfo()['size'], 4) # 4 of 5
|
||||
assert_equal(self.nodes[1].getmempoolinfo()['size'], 1) # 1 of 5
|
||||
assert_equal(self.nodes[2].getmempoolinfo()['size'], 4) # 4 of 5
|
||||
assert_equal(self.nodes[3].getmempoolinfo()['size'], 5) # all
|
||||
|
||||
# check each tx
|
||||
i = 0
|
||||
for checktx in [[0,1,2,3], [0], [0,1,3,4], [0,1,2,3,4]]:
|
||||
for idx in checktx:
|
||||
assert(txids[idx] in self.nodes[i].getrawmempool())
|
||||
i += 1
|
||||
|
||||
# mining the 1 tx known to node 1
|
||||
self.nodes[1].generate(1)
|
||||
sync_blocks(self.nodes)
|
||||
|
||||
assert_equal(self.nodes[0].getmempoolinfo()['size'], 3) # 3 of 4
|
||||
assert_equal(self.nodes[1].getmempoolinfo()['size'], 0) # none left
|
||||
assert_equal(self.nodes[2].getmempoolinfo()['size'], 3) # 3 of 4
|
||||
assert_equal(self.nodes[3].getmempoolinfo()['size'], 4) # all
|
||||
|
||||
# check each tx
|
||||
i = 0
|
||||
for checktx in [[1,2,3], [], [1,3,4], [1,2,3,4]]:
|
||||
for idx in checktx:
|
||||
assert(txids[idx] in self.nodes[i].getrawmempool())
|
||||
i += 1
|
||||
|
||||
# mine the 3 tx known to node 0
|
||||
self.nodes[0].generate(1)
|
||||
sync_blocks(self.nodes)
|
||||
|
||||
# now only the last tx is left
|
||||
assert_equal(self.nodes[0].getmempoolinfo()['size'], 0) # none left
|
||||
assert_equal(self.nodes[1].getmempoolinfo()['size'], 0) # none left
|
||||
assert_equal(self.nodes[2].getmempoolinfo()['size'], 1) # all
|
||||
assert_equal(self.nodes[3].getmempoolinfo()['size'], 1) # all
|
||||
|
||||
# check each tx on the remaining nodes
|
||||
for i in [2,3]:
|
||||
assert(txids[4] in self.nodes[i].getrawmempool())
|
||||
|
||||
# after mining the last tx from node 2, all nodes should have empty mempools
|
||||
self.nodes[2].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
assert_equal(self.nodes[0].getmempoolinfo()['size'], 0)
|
||||
assert_equal(self.nodes[1].getmempoolinfo()['size'], 0)
|
||||
assert_equal(self.nodes[2].getmempoolinfo()['size'], 0)
|
||||
assert_equal(self.nodes[3].getmempoolinfo()['size'], 0)
|
||||
|
||||
print("such success. wow!")
|
||||
|
||||
def create_dusty_tx(self, n, dust, fee):
|
||||
minAmount = 5 * (dust + fee)
|
||||
avail = n.listunspent(0, 1000, [], True, {'minimumAmount': minAmount})[0]
|
||||
inputs = [ {'txid': avail['txid'], 'vout': avail['vout']} ]
|
||||
outputs = { self.recv_1 : avail['amount'] - fee - dust , self.recv_2: dust }
|
||||
rawtx = n.createrawtransaction(inputs, outputs)
|
||||
return n.signrawtransaction(rawtx)
|
||||
|
||||
def send_dusty_tx(self, n, dust, fee):
|
||||
rawtx = self.create_dusty_tx(n, dust, fee)
|
||||
return n.sendrawtransaction(rawtx['hex'])
|
||||
|
||||
def get_dust_rejection(self, n, dust, fee):
|
||||
rawtx = self.create_dusty_tx(n, dust, fee)
|
||||
assert_raises_jsonrpc(-26, "dust", n.sendrawtransaction, rawtx['hex'])
|
||||
|
||||
def check_dust_config(self, n, soft, hard):
|
||||
networkinfo = n.getnetworkinfo()
|
||||
assert_equal(networkinfo["softdustlimit"], soft)
|
||||
assert_equal(networkinfo["harddustlimit"], hard)
|
||||
|
||||
if __name__ == '__main__':
|
||||
DustLimitTest().main()
|
|
@ -59,9 +59,9 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
rawmatch = self.nodes[2].fundrawtransaction(rawmatch, {"changePosition":1, "subtractFeeFromOutputs":[0]})
|
||||
assert_equal(rawmatch["changepos"], -1)
|
||||
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 15)
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 10)
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 50)
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 1.5)
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 1.0)
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 5.0)
|
||||
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
@ -82,7 +82,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
# simple test with two coins #
|
||||
##############################
|
||||
inputs = [ ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 22 }
|
||||
outputs = { self.nodes[0].getnewaddress() : 2.2 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
|
||||
|
@ -95,7 +95,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
# simple test with two coins #
|
||||
##############################
|
||||
inputs = [ ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 26 }
|
||||
outputs = { self.nodes[0].getnewaddress() : 2.6 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
|
||||
|
@ -110,7 +110,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
# simple test with two outputs #
|
||||
################################
|
||||
inputs = [ ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 26, self.nodes[1].getnewaddress() : 25 }
|
||||
outputs = { self.nodes[0].getnewaddress() : 2.6, self.nodes[1].getnewaddress() : 2.5 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
|
||||
|
@ -128,10 +128,10 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
#########################################################################
|
||||
# test a fundrawtransaction with a VIN greater than the required amount #
|
||||
#########################################################################
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 50)
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 5)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']}]
|
||||
outputs = { self.nodes[0].getnewaddress() : 10 }
|
||||
outputs = { self.nodes[0].getnewaddress() : 1.0 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
@ -149,11 +149,10 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
#####################################################################
|
||||
# test a fundrawtransaction with which will not get a change output #
|
||||
#####################################################################
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 50)
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 5)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']}]
|
||||
# Dogecoin: Fee is exact, do not use tolerance
|
||||
outputs = { self.nodes[0].getnewaddress() : Decimal(50) - fee }
|
||||
outputs = { self.nodes[0].getnewaddress() : Decimal(5.0) - fee - feeTolerance }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
@ -172,10 +171,10 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
####################################################
|
||||
# test a fundrawtransaction with an invalid option #
|
||||
####################################################
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 50)
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 5)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']} ]
|
||||
outputs = { self.nodes[0].getnewaddress() : Decimal(40) }
|
||||
outputs = { self.nodes[0].getnewaddress() : Decimal(4.0) }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
@ -185,10 +184,10 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
############################################################
|
||||
# test a fundrawtransaction with an invalid change address #
|
||||
############################################################
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 50)
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 5)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']} ]
|
||||
outputs = { self.nodes[0].getnewaddress() : Decimal(40) }
|
||||
outputs = { self.nodes[0].getnewaddress() : Decimal(4.0) }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
@ -198,11 +197,10 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
############################################################
|
||||
# test a fundrawtransaction with a provided change address #
|
||||
############################################################
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 50)
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 5)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']} ]
|
||||
# Dogecoin: Reduce this output so the fee doesn't leave us with no change
|
||||
outputs = { self.nodes[0].getnewaddress() : Decimal(25) }
|
||||
outputs = { self.nodes[0].getnewaddress() : Decimal("3.9") }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
@ -218,10 +216,10 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
#########################################################################
|
||||
# test a fundrawtransaction with a VIN smaller than the required amount #
|
||||
#########################################################################
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 10)
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 1)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']}]
|
||||
outputs = { self.nodes[0].getnewaddress() : 10 }
|
||||
outputs = { self.nodes[0].getnewaddress() : 1.0 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
|
||||
# 4-byte version + 1-byte vin count + 36-byte prevout then script_len
|
||||
|
@ -253,11 +251,11 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
###########################################
|
||||
# test a fundrawtransaction with two VINs #
|
||||
###########################################
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 10)
|
||||
utx2 = get_unspent(self.nodes[2].listunspent(), 50)
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 1)
|
||||
utx2 = get_unspent(self.nodes[2].listunspent(), 5)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']},{'txid' : utx2['txid'], 'vout' : utx2['vout']} ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 60 }
|
||||
outputs = { self.nodes[0].getnewaddress() : 6.0 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
@ -286,11 +284,11 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
#########################################################
|
||||
# test a fundrawtransaction with two VINs and two vOUTs #
|
||||
#########################################################
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 10)
|
||||
utx2 = get_unspent(self.nodes[2].listunspent(), 50)
|
||||
utx = get_unspent(self.nodes[2].listunspent(), 1)
|
||||
utx2 = get_unspent(self.nodes[2].listunspent(), 5)
|
||||
|
||||
inputs = [ {'txid' : utx['txid'], 'vout' : utx['vout']},{'txid' : utx2['txid'], 'vout' : utx2['vout']} ]
|
||||
outputs = { self.nodes[0].getnewaddress() : 60, self.nodes[0].getnewaddress() : 10 }
|
||||
outputs = { self.nodes[0].getnewaddress() : 6.0, self.nodes[0].getnewaddress() : 1.0 }
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
|
||||
|
@ -313,7 +311,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
##############################################
|
||||
listunspent = self.nodes[2].listunspent()
|
||||
inputs = [ {'txid' : "1c7f966dab21119bac53213a2bc7532bff1fa844c124fd750a7d0b1332440bd1", 'vout' : 0} ] #invalid vin!
|
||||
outputs = { self.nodes[0].getnewaddress() : 10}
|
||||
outputs = { self.nodes[0].getnewaddress() : 1.0}
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
||||
|
||||
|
@ -322,12 +320,12 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
############################################################
|
||||
#compare fee of a standard pubkeyhash transaction
|
||||
inputs = []
|
||||
outputs = {self.nodes[1].getnewaddress():11}
|
||||
outputs = {self.nodes[1].getnewaddress():1.1}
|
||||
rawTx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[0].fundrawtransaction(rawTx)
|
||||
|
||||
#create same transaction over sendtoaddress
|
||||
txId = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 11)
|
||||
txId = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 1.1)
|
||||
signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
|
||||
|
||||
#compare fee
|
||||
|
@ -338,7 +336,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
############################################################
|
||||
#compare fee of a standard pubkeyhash transaction with multiple outputs
|
||||
inputs = []
|
||||
outputs = {self.nodes[1].getnewaddress():110,self.nodes[1].getnewaddress():120,self.nodes[1].getnewaddress():10,self.nodes[1].getnewaddress():130,self.nodes[1].getnewaddress():20,self.nodes[1].getnewaddress():30}
|
||||
outputs = {self.nodes[1].getnewaddress():1.1,self.nodes[1].getnewaddress():1.2,self.nodes[1].getnewaddress():1.1,self.nodes[1].getnewaddress():1.3,self.nodes[1].getnewaddress():1.2,self.nodes[1].getnewaddress():1.3}
|
||||
rawTx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[0].fundrawtransaction(rawTx)
|
||||
#create same transaction over sendtoaddress
|
||||
|
@ -369,7 +367,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
fundedTx = self.nodes[0].fundrawtransaction(rawTx)
|
||||
|
||||
#create same transaction over sendtoaddress
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 11)
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 1.1)
|
||||
signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
|
||||
|
||||
#compare fee
|
||||
|
@ -402,7 +400,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
fundedTx = self.nodes[0].fundrawtransaction(rawTx)
|
||||
|
||||
#create same transaction over sendtoaddress
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 11)
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 1.1)
|
||||
signedFee = self.nodes[0].getrawmempool(True)[txId]['fee']
|
||||
|
||||
#compare fee
|
||||
|
@ -425,14 +423,14 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
|
||||
|
||||
# send 1.2 BTC to msig addr
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 12)
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 1.2)
|
||||
self.sync_all()
|
||||
self.nodes[1].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
oldBalance = self.nodes[1].getbalance()
|
||||
inputs = []
|
||||
outputs = {self.nodes[1].getnewaddress():11}
|
||||
outputs = {self.nodes[1].getnewaddress():1.1}
|
||||
rawTx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[2].fundrawtransaction(rawTx)
|
||||
|
||||
|
@ -443,7 +441,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
self.sync_all()
|
||||
|
||||
# make sure funds are received at node1
|
||||
assert_equal(oldBalance+Decimal('11.0000000'), self.nodes[1].getbalance())
|
||||
assert_equal(oldBalance+Decimal('1.10000000'), self.nodes[1].getbalance())
|
||||
|
||||
############################################################
|
||||
# locked wallet test
|
||||
|
@ -469,7 +467,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
# drain the keypool
|
||||
self.nodes[1].getnewaddress()
|
||||
inputs = []
|
||||
outputs = {self.nodes[0].getnewaddress():11}
|
||||
outputs = {self.nodes[0].getnewaddress():1.1}
|
||||
rawTx = self.nodes[1].createrawtransaction(inputs, outputs)
|
||||
# fund a transaction that requires a new key for the change output
|
||||
# creating the key must be impossible because the wallet is locked
|
||||
|
@ -479,12 +477,12 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
self.nodes[1].walletpassphrase("test", 100)
|
||||
self.nodes[1].walletlock()
|
||||
|
||||
assert_raises_jsonrpc(-13, "walletpassphrase", self.nodes[1].sendtoaddress, self.nodes[0].getnewaddress(), 12)
|
||||
assert_raises_jsonrpc(-13, "walletpassphrase", self.nodes[1].sendtoaddress, self.nodes[0].getnewaddress(), 1.2)
|
||||
|
||||
oldBalance = self.nodes[0].getbalance()
|
||||
|
||||
inputs = []
|
||||
outputs = {self.nodes[0].getnewaddress():11}
|
||||
outputs = {self.nodes[0].getnewaddress():1.1}
|
||||
rawTx = self.nodes[1].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[1].fundrawtransaction(rawTx)
|
||||
|
||||
|
@ -496,7 +494,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
self.sync_all()
|
||||
|
||||
# make sure funds are received at node1
|
||||
assert_equal(oldBalance+Decimal('500011.00000000'), self.nodes[0].getbalance())
|
||||
assert_equal(oldBalance+Decimal('500001.10000000'), self.nodes[0].getbalance())
|
||||
|
||||
|
||||
###############################################
|
||||
|
@ -509,15 +507,14 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
for i in range(0,20):
|
||||
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 20)
|
||||
for i in range(0,22):
|
||||
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 1.1)
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
#fund a tx with ~20 small inputs
|
||||
#fund a tx with ~20 small inputs, by spending in combination the 22 DOGE we just sent
|
||||
inputs = []
|
||||
# Dogecoin: TX size rounding gives us a fee of 1 DOGE. 20 - 15 - 1 = 4 DOGE change
|
||||
outputs = {self.nodes[0].getnewaddress():15,self.nodes[0].getnewaddress():4}
|
||||
outputs = {self.nodes[0].getnewaddress():16.0,self.nodes[0].getnewaddress():5.9}
|
||||
rawTx = self.nodes[1].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[1].fundrawtransaction(rawTx)
|
||||
|
||||
|
@ -540,8 +537,8 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
for i in range(0,20):
|
||||
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 2)
|
||||
for i in range(0,22):
|
||||
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 1.1)
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
|
@ -549,7 +546,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
oldBalance = self.nodes[0].getbalance()
|
||||
|
||||
inputs = []
|
||||
outputs = {self.nodes[0].getnewaddress():15,self.nodes[0].getnewaddress():4}
|
||||
outputs = {self.nodes[0].getnewaddress():16.0,self.nodes[0].getnewaddress():5.9}
|
||||
rawTx = self.nodes[1].createrawtransaction(inputs, outputs)
|
||||
fundedTx = self.nodes[1].fundrawtransaction(rawTx)
|
||||
fundedAndSignedTx = self.nodes[1].signrawtransaction(fundedTx['hex'])
|
||||
|
@ -557,7 +554,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
self.sync_all()
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
assert_equal(oldBalance+Decimal('500019.00000000'), self.nodes[0].getbalance()) #19+block reward
|
||||
assert_equal(oldBalance+Decimal('500021.9000'), self.nodes[0].getbalance()) #2.19+block reward
|
||||
|
||||
#####################################################
|
||||
# test fundrawtransaction with OP_RETURN and no vin #
|
||||
|
@ -582,7 +579,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
|
||||
watchonly_address = self.nodes[0].getnewaddress()
|
||||
watchonly_pubkey = self.nodes[0].validateaddress(watchonly_address)["pubkey"]
|
||||
watchonly_amount = Decimal(2000)
|
||||
watchonly_amount = Decimal(200)
|
||||
self.nodes[3].importpubkey(watchonly_pubkey, "", True)
|
||||
watchonly_txid = self.nodes[0].sendtoaddress(watchonly_address, watchonly_amount)
|
||||
self.nodes[0].sendtoaddress(self.nodes[3].getnewaddress(), watchonly_amount / 10)
|
||||
|
@ -639,11 +636,10 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
outputs = {self.nodes[3].getnewaddress() : 1}
|
||||
rawtx = self.nodes[3].createrawtransaction(inputs, outputs)
|
||||
result = self.nodes[3].fundrawtransaction(rawtx) # uses min_relay_tx_fee (set by settxfee)
|
||||
# TODO: We massively scale up min_relay_tx_fee here as it's not the recommended fee in 1.14.4,
|
||||
# but must be scaled back for 1.14.5
|
||||
result2 = self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 2000*min_relay_tx_fee})
|
||||
result3 = self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 10000*min_relay_tx_fee})
|
||||
result_fee_rate = result['fee'] * 1000 / round_tx_size(count_bytes(result['hex']))
|
||||
# Note TX fees in 1.14.5 are 10x the required minimum
|
||||
result2 = self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 2*10*min_relay_tx_fee})
|
||||
result3 = self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 10*10*min_relay_tx_fee})
|
||||
result_fee_rate = result['fee'] * 1000 / count_bytes(result['hex'])
|
||||
assert_fee_amount(result2['fee'], count_bytes(result2['hex']), 2 * result_fee_rate)
|
||||
assert_fee_amount(result3['fee'], count_bytes(result3['hex']), 10 * result_fee_rate)
|
||||
|
||||
|
@ -681,7 +677,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
assert_equal(len(self.nodes[3].listunspent(1)), 1)
|
||||
|
||||
inputs = []
|
||||
outputs = {self.nodes[2].getnewaddress(): 10}
|
||||
outputs = {self.nodes[2].getnewaddress(): 2}
|
||||
rawtx = self.nodes[3].createrawtransaction(inputs, outputs)
|
||||
|
||||
result = [self.nodes[3].fundrawtransaction(rawtx), # uses min_relay_tx_fee (set by settxfee)
|
||||
|
@ -704,7 +700,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||
assert_equal(change[3] + result[3]['fee'], change[4])
|
||||
|
||||
inputs = []
|
||||
outputs = {self.nodes[2].getnewaddress(): value for value in (10, 11, 12, 13)}
|
||||
outputs = {self.nodes[2].getnewaddress(): value for value in (1.05, 1.1, 1.2, 1.3)}
|
||||
keys = list(outputs.keys())
|
||||
rawtx = self.nodes[3].createrawtransaction(inputs, outputs)
|
||||
|
||||
|
|
|
@ -12,9 +12,22 @@ from test_framework import scrypt_auxpow as auxpow
|
|||
|
||||
class GetAuxBlockTest (BitcoinTestFramework):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 2
|
||||
self.is_network_split = False
|
||||
|
||||
def setup_network(self):
|
||||
self.nodes = []
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"]))
|
||||
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-rpcnamecoinapi"]))
|
||||
connect_nodes_bi(self.nodes, 0, 1)
|
||||
self.sync_all()
|
||||
|
||||
def run_test (self):
|
||||
# Generate a block so that we are not "downloading blocks".
|
||||
self.nodes[0].generate (1)
|
||||
self.nodes[0].generate(100)
|
||||
|
||||
# Compare basic data of getauxblock to getblocktemplate.
|
||||
auxblock = self.nodes[0].getauxblock ()
|
||||
|
@ -117,5 +130,19 @@ class GetAuxBlockTest (BitcoinTestFramework):
|
|||
coinbase = tx['vin'][0]['coinbase']
|
||||
assert_equal ("01%02x01" % auxblock['height'], coinbase[0 : 6]) # DOGE: We mine less blocks in these tests
|
||||
|
||||
# Call getauxblock while using the Namecoin API
|
||||
nmc_api_auxblock = self.nodes[1].getauxblock()
|
||||
|
||||
# must not contain a "target" field, but a "_target" field
|
||||
assert "target" not in nmc_api_auxblock
|
||||
assert "_target" in nmc_api_auxblock
|
||||
|
||||
reversedTarget = auxpow.reverseHex(nmc_api_auxblock["_target"])
|
||||
apow = auxpow.computeAuxpowWithChainId(nmc_api_auxblock["hash"], reversedTarget, "98", True)
|
||||
res = self.nodes[1].getauxblock(nmc_api_auxblock["hash"], apow)
|
||||
assert res
|
||||
|
||||
self.sync_all()
|
||||
|
||||
if __name__ == '__main__':
|
||||
GetAuxBlockTest ().main ()
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2021 The Dogecoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Hard dust limit QA test.
|
||||
|
||||
# Tests nodes with differing -dustlimits
|
||||
"""
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
from decimal import Decimal
|
||||
|
||||
class HardDustLimitTest(BitcoinTestFramework):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 3
|
||||
|
||||
def setup_network(self, split=False):
|
||||
self.nodes = []
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, ["-dustlimit=0.1", "-debug"]))
|
||||
self.nodes.append(start_node(1, self.options.tmpdir, ["-dustlimit=1", "-debug"]))
|
||||
self.nodes.append(start_node(2, self.options.tmpdir, ["-dustlimit=0.01", "-debug"]))
|
||||
|
||||
connect_nodes_bi(self.nodes,0,1)
|
||||
connect_nodes_bi(self.nodes,1,2)
|
||||
connect_nodes_bi(self.nodes,0,2)
|
||||
|
||||
self.is_network_split=False
|
||||
self.sync_all()
|
||||
|
||||
def run_test(self):
|
||||
|
||||
self.fee = Decimal("0.001")
|
||||
self.seed = 1000
|
||||
self.coinselector = {'minimumAmount': self.fee * 10, 'maximumAmount': self.seed}
|
||||
|
||||
# set up addresses
|
||||
n0a1 = self.nodes[0].getnewaddress()
|
||||
n0a2 = self.nodes[0].getnewaddress()
|
||||
n0a3 = self.nodes[0].getnewaddress()
|
||||
n1a1 = self.nodes[1].getnewaddress()
|
||||
n2a1 = self.nodes[2].getnewaddress()
|
||||
n2a2 = self.nodes[2].getnewaddress()
|
||||
n2a3 = self.nodes[2].getnewaddress()
|
||||
n2a4 = self.nodes[2].getnewaddress()
|
||||
|
||||
# mine some blocks and prepare some coins
|
||||
self.nodes[2].generate(1)
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(101)
|
||||
self.sync_all()
|
||||
self.nodes[0].sendtoaddress(n0a1, self.seed)
|
||||
self.nodes[0].sendtoaddress(n2a1, self.seed)
|
||||
self.sync_all()
|
||||
self.nodes[0].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
# create dusty transactions
|
||||
self.send_dusty_tx(self.nodes[2], n2a2, n0a2, Decimal("0.9"))
|
||||
self.send_dusty_tx(self.nodes[2], n2a3, n0a3, Decimal("0.09"))
|
||||
self.send_dusty_tx(self.nodes[0], n2a4, n1a1, Decimal("1"))
|
||||
|
||||
# wait 10 seconds to sync mempools
|
||||
time.sleep(10)
|
||||
|
||||
assert_equal(self.nodes[2].getmempoolinfo()['size'], 3)
|
||||
assert_equal(self.nodes[1].getmempoolinfo()['size'], 1)
|
||||
assert_equal(self.nodes[0].getmempoolinfo()['size'], 2)
|
||||
|
||||
def send_dusty_tx(self, n, addr1, addr2, dust):
|
||||
avail = n.listunspent(0, 1000, [], True, self.coinselector)
|
||||
inputs = [ {'txid': avail[0]['txid'], 'vout': avail[0]['vout']}]
|
||||
outputs = { addr1 : avail[0]['amount'] - self.fee - dust , addr2: dust }
|
||||
rawtx = n.createrawtransaction(inputs, outputs)
|
||||
rawtx = n.signrawtransaction(rawtx)
|
||||
n.sendrawtransaction(rawtx['hex'])
|
||||
|
||||
if __name__ == '__main__':
|
||||
HardDustLimitTest().main()
|
|
@ -15,7 +15,7 @@ class ImportPrunedFundsTest(BitcoinTestFramework):
|
|||
self.num_nodes = 2
|
||||
|
||||
def setup_network(self, split=False):
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir)
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [['-spendzeroconfchange=0'], None])
|
||||
connect_nodes_bi(self.nodes,0,1)
|
||||
self.is_network_split=False
|
||||
self.sync_all()
|
||||
|
@ -58,21 +58,20 @@ class ImportPrunedFundsTest(BitcoinTestFramework):
|
|||
assert_equal(address_info['ismine'], False)
|
||||
|
||||
#Send funds to self
|
||||
txnid3 = self.nodes[0].sendtoaddress(address3, 2.5)
|
||||
self.nodes[0].generate(1)
|
||||
rawtxn3 = self.nodes[0].gettransaction(txnid3)['hex']
|
||||
proof3 = self.nodes[0].gettxoutproof([txnid3])
|
||||
txnid1 = self.nodes[0].sendtoaddress(address1, 10)
|
||||
rawtxn1 = self.nodes[0].gettransaction(txnid1)['hex']
|
||||
|
||||
txnid2 = self.nodes[0].sendtoaddress(address2, 5)
|
||||
self.nodes[0].generate(1)
|
||||
rawtxn2 = self.nodes[0].gettransaction(txnid2)['hex']
|
||||
proof2 = self.nodes[0].gettxoutproof([txnid2])
|
||||
|
||||
txnid1 = self.nodes[0].sendtoaddress(address1, 10)
|
||||
txnid3 = self.nodes[0].sendtoaddress(address3, 2.5)
|
||||
rawtxn3 = self.nodes[0].gettransaction(txnid3)['hex']
|
||||
|
||||
self.nodes[0].generate(1)
|
||||
rawtxn1 = self.nodes[0].gettransaction(txnid1)['hex']
|
||||
proof1 = self.nodes[0].gettxoutproof([txnid1])
|
||||
|
||||
proof1 = self.nodes[0].gettxoutproof([txnid1])
|
||||
proof2 = self.nodes[0].gettxoutproof([txnid2])
|
||||
proof3 = self.nodes[0].gettxoutproof([txnid3])
|
||||
|
||||
self.sync_all()
|
||||
|
||||
|
@ -86,7 +85,7 @@ class ImportPrunedFundsTest(BitcoinTestFramework):
|
|||
self.nodes[1].importaddress(address2, "add2", False)
|
||||
result2 = self.nodes[1].importprunedfunds(rawtxn2, proof2)
|
||||
balance2 = self.nodes[1].getbalance("add2", 0, True)
|
||||
assert_equal(balance2, Decimal('5'))
|
||||
assert_equal(balance2, Decimal('5.0'))
|
||||
|
||||
#Import with private key with no rescan
|
||||
self.nodes[1].importprivkey(address3_privkey, "add3", False)
|
||||
|
|
201
qa/rpc-tests/p2p-policy.py
Normal file
201
qa/rpc-tests/p2p-policy.py
Normal file
|
@ -0,0 +1,201 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2021 The Dogecoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""P2P Policies QA test
|
||||
|
||||
# Tests relay and mempool acceptance policies from p2p perspective
|
||||
"""
|
||||
|
||||
from test_framework.mininode import *
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
|
||||
class TestNode(NodeConnCB):
|
||||
def __init__(self):
|
||||
NodeConnCB.__init__(self)
|
||||
self.connection = None
|
||||
self.ping_counter = 1
|
||||
self.last_pong = msg_pong()
|
||||
self.txinvs = {}
|
||||
self.rejects = []
|
||||
|
||||
def add_connection(self, conn):
|
||||
self.connection = conn
|
||||
|
||||
# Track transaction invs for wait_for_tx_inv
|
||||
def on_inv(self, conn, message):
|
||||
for i in message.inv:
|
||||
if (i.type == 1):
|
||||
self.txinvs[format(i.hash, '064x')] = True
|
||||
|
||||
# Track pongs for sync_with_ping
|
||||
def on_pong(self, conn, message):
|
||||
self.last_pong = message
|
||||
|
||||
# Track reject messages
|
||||
def on_reject(self, conn, message):
|
||||
self.rejects.append(message)
|
||||
|
||||
# wait for verack to make sure the node accepts our connection attempt
|
||||
def wait_for_verack(self):
|
||||
def veracked():
|
||||
return self.verack_received
|
||||
return wait_until(veracked, timeout=10)
|
||||
|
||||
# Wait until we have received an inv of a specific tx
|
||||
def wait_for_tx_inv(self, hash, timeout=30):
|
||||
def have_received_tx_inv():
|
||||
try:
|
||||
return self.txinvs[hash]
|
||||
except KeyError as e:
|
||||
return False
|
||||
return wait_until(have_received_tx_inv, timeout=timeout)
|
||||
|
||||
# Send a ping message and wait until we get the pong message back
|
||||
def sync_with_ping(self, timeout=30):
|
||||
def received_pong():
|
||||
return (self.last_pong.nonce == self.ping_counter)
|
||||
self.connection.send_message(msg_ping(nonce=self.ping_counter))
|
||||
success = wait_until(received_pong, timeout=timeout)
|
||||
self.ping_counter += 1
|
||||
return success
|
||||
|
||||
class P2PPolicyTests(BitcoinTestFramework):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 1
|
||||
self.utxo = []
|
||||
|
||||
# a private key and corresponding address and p2pkh output script
|
||||
self.srcPrivKey = "cRhVU6TU1qHfRg3ee59yqg7ifhREKPLPPk8eccrrAEEY74bY1dCY"
|
||||
self.srcAddr = "mmMP9oKFdADezYzduwJFcLNmmi8JHUKdx9"
|
||||
self.srcOutScript = "76a91440015860f45d48eeeb2224dce3ad94ba91763e1e88ac"
|
||||
|
||||
# valid regtest address that no one has the key to
|
||||
self.tgtAddr = "mkwDHkWXF8x6aFtdGVm5E9PVC7yPY8cb4r"
|
||||
|
||||
def create_testnode(self, node_idx=0):
|
||||
node = TestNode()
|
||||
conn = NodeConn('127.0.0.1', p2p_port(node_idx), self.nodes[node_idx], node)
|
||||
node.add_connection(conn)
|
||||
return node
|
||||
|
||||
def setup_network(self):
|
||||
self.nodes = []
|
||||
|
||||
# a Dogecoin Core node that behaves similar to mainnet policies
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-acceptnonstdtxn=0"]))
|
||||
|
||||
# custom testnodes
|
||||
self.sendNode = self.create_testnode() # to send tx from
|
||||
self.recvNode = self.create_testnode() # to check relay from
|
||||
|
||||
# start networking and handshake the mininodes
|
||||
NetworkThread().start()
|
||||
self.sendNode.wait_for_verack()
|
||||
self.recvNode.wait_for_verack()
|
||||
|
||||
def run_test(self):
|
||||
self.nodes[0].generate(101)
|
||||
|
||||
### test constants ###
|
||||
koinu = Decimal("0.00000001") # 1 Koinu expressed in DOGE
|
||||
ten = Decimal("10.0") # uniform 10 DOGE seed moneys
|
||||
|
||||
### parameters from fee policy ###
|
||||
relay_fee = Decimal("0.001") # DEFAULT_MIN_RELAY_TX_FEE
|
||||
soft_dust_limit = Decimal("0.01") # DEFAULT_DUST_LIMIT
|
||||
|
||||
relay_fee_per_byte = relay_fee / 1000
|
||||
|
||||
# create a bunch of UTXO with seed money from the Dogecoin Core wallet
|
||||
for i in range(10):
|
||||
inputs = [self.nodes[0].listunspent()[0]]
|
||||
outputs = { self.srcAddr : ten }
|
||||
tx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
signed = self.nodes[0].signrawtransaction(tx)
|
||||
txid = self.nodes[0].sendrawtransaction(signed['hex'], True)
|
||||
self.utxo.append(txid)
|
||||
self.nodes[0].generate(1)
|
||||
|
||||
# test legacy output of 1 DOGE output and 1 DOGE fee
|
||||
output = { self.tgtAddr : 1, self.srcAddr: 8 }
|
||||
self.run_relay_test(output, None)
|
||||
|
||||
# test exact relay fee rate
|
||||
output = { self.tgtAddr: ten - relay_fee_per_byte * 192}
|
||||
tx = self.run_relay_test(output, None)
|
||||
|
||||
# test too low relay fee rate
|
||||
output = { self.tgtAddr: ten - relay_fee_per_byte * 191 + koinu }
|
||||
tx = self.run_relay_test(output, 66) # 66 = too low fee
|
||||
|
||||
# test exact dust limit
|
||||
change = ten - soft_dust_limit - relay_fee_per_byte * 226
|
||||
output = { self.tgtAddr : soft_dust_limit, self.srcAddr: change}
|
||||
self.run_relay_test(output, None)
|
||||
|
||||
# test soft dust limit with sufficient fee
|
||||
amount = soft_dust_limit - koinu
|
||||
change = ten - amount - relay_fee_per_byte * 226 - soft_dust_limit
|
||||
output = { self.tgtAddr : amount, self.srcAddr: change }
|
||||
self.run_relay_test(output, None)
|
||||
|
||||
# test soft dust limit with insufficient fee
|
||||
amount = soft_dust_limit - koinu
|
||||
change = ten - amount - relay_fee_per_byte * 225 - soft_dust_limit + koinu
|
||||
output = { self.tgtAddr : amount, self.srcAddr: change }
|
||||
self.run_relay_test(output, 66)
|
||||
|
||||
# test a 1 koinu output with sufficient fee
|
||||
amount = koinu
|
||||
change = ten - amount - relay_fee_per_byte * 226 - soft_dust_limit
|
||||
output = { self.tgtAddr : amount, self.srcAddr: change }
|
||||
self.run_relay_test(output, 64) # 64 = dust
|
||||
|
||||
# test a 1 koinu output with insufficient fee
|
||||
amount = koinu
|
||||
change = ten - amount - relay_fee_per_byte * 225 - soft_dust_limit + koinu
|
||||
output = { self.tgtAddr : amount, self.srcAddr: change }
|
||||
self.run_relay_test(output, 64)
|
||||
|
||||
|
||||
# test mempool acceptance and relay outcomes
|
||||
def run_relay_test(self, output, expected_reject_code):
|
||||
num_rejects = len(self.sendNode.rejects)
|
||||
|
||||
tx = self.spend_utxo(output)
|
||||
self.sendNode.sync_with_ping(timeout=10)
|
||||
|
||||
if (expected_reject_code is None):
|
||||
# test that the tx got relayed
|
||||
assert_equal(self.recvNode.wait_for_tx_inv(tx.hash), True)
|
||||
assert_equal(len(self.sendNode.rejects), num_rejects)
|
||||
else:
|
||||
# test that there was a rejection received with the correct code
|
||||
assert_greater_than(len(self.sendNode.rejects), num_rejects)
|
||||
assert_equal(self.sendNode.rejects[-1].code, expected_reject_code)
|
||||
|
||||
return tx
|
||||
|
||||
# spend seed money with a key not in the Dogecoin Core wallet.
|
||||
def spend_utxo(self, output):
|
||||
# construct the transaction using Dogecoin Core raw tx APIs
|
||||
input = [{ "txid": self.utxo.pop(), "vout": 0, "scriptPubKey": self.srcOutScript }]
|
||||
rawtx = self.nodes[0].createrawtransaction(input, output)
|
||||
signed_tx = self.nodes[0].signrawtransaction(rawtx, input, [self.srcPrivKey])
|
||||
|
||||
# import the signed tx into a format the mininode client understands
|
||||
# and send the tx from there rather than from Dogecoin Core, to test
|
||||
# mempool acceptance as it would happen on mainnet: through relay
|
||||
tx = FromHex(CTransaction(), signed_tx['hex'])
|
||||
tx.rehash()
|
||||
self.sendNode.connection.send_message(msg_tx(tx))
|
||||
|
||||
return tx
|
||||
|
||||
if __name__ == '__main__':
|
||||
P2PPolicyTests().main()
|
|
@ -64,9 +64,9 @@ class PayTxFeeTest(BitcoinTestFramework):
|
|||
tx2 = self.nodes[0].getrawtransaction(txid2, True)
|
||||
tx3 = self.nodes[0].getrawtransaction(txid3, True)
|
||||
|
||||
assert_equal(tx1['vout'][0]['value'] + tx1['vout'][1]['value'], Decimal("999.9"))
|
||||
assert_equal(tx2['vout'][0]['value'] + tx2['vout'][1]['value'], Decimal("999"))
|
||||
assert_equal(tx3['vout'][0]['value'] + tx3['vout'][1]['value'], Decimal("999.9"))
|
||||
assert_equal(tx1['vout'][0]['value'] + tx1['vout'][1]['value'], Decimal("999.9774"))
|
||||
assert_equal(tx2['vout'][0]['value'] + tx2['vout'][1]['value'], Decimal("999.774"))
|
||||
assert_equal(tx3['vout'][0]['value'] + tx3['vout'][1]['value'], Decimal("999.9774"))
|
||||
|
||||
# mine a block
|
||||
self.nodes[0].generate(1);
|
||||
|
@ -76,7 +76,7 @@ class PayTxFeeTest(BitcoinTestFramework):
|
|||
block = self.nodes[0].getblock(self.nodes[0].getbestblockhash())
|
||||
coinbaseTx = self.nodes[0].getrawtransaction(block['tx'][0], True)
|
||||
|
||||
assert_equal(coinbaseTx['vout'][0]['value'], Decimal("500001.2"))
|
||||
assert_equal(coinbaseTx['vout'][0]['value'], Decimal("500000.2712"))
|
||||
|
||||
if __name__ == '__main__':
|
||||
PayTxFeeTest().main()
|
||||
|
|
|
@ -33,7 +33,8 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
|
|||
def run_test(self):
|
||||
utxo_count = 90
|
||||
utxos = create_confirmed_utxos(self.relayfee, self.nodes[0], utxo_count)
|
||||
base_fee = self.relayfee*100 * 1000 # our transactions are smaller than 100kb
|
||||
# Note Dogecoin Core 1.14.5 wallet fee is 10x relay fee
|
||||
base_fee = self.relayfee*100 * 10# our transactions are smaller than 100kb
|
||||
txids = []
|
||||
|
||||
# Create 3 batches of transactions at 3 different fee rate levels
|
||||
|
|
|
@ -7,22 +7,76 @@
|
|||
# Test pruning code
|
||||
# ********
|
||||
# WARNING:
|
||||
# This test uses 4GB of disk space.
|
||||
# This test takes 30 mins or more (up to 2 hours)
|
||||
# This test uses 21GB of disk space.
|
||||
# This test takes 20 mins or more (up to 2 hours)
|
||||
# ********
|
||||
|
||||
from test_framework.blocktools import create_coinbase
|
||||
from test_framework.mininode import CBlock
|
||||
from test_framework.script import (
|
||||
CScript,
|
||||
OP_NOP,
|
||||
OP_RETURN,
|
||||
)
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
from test_framework.util import (
|
||||
start_node,
|
||||
connect_nodes,
|
||||
sync_blocks,
|
||||
assert_equal,
|
||||
assert_greater_than,
|
||||
assert_raises_jsonrpc,
|
||||
)
|
||||
import time
|
||||
import os
|
||||
|
||||
MIN_BLOCKS_TO_KEEP = 288
|
||||
|
||||
# Rescans start at the earliest block up to 2 hours before a key timestamp, so
|
||||
# the manual prune RPC avoids pruning blocks in the same window to be
|
||||
# compatible with pruning based on key creation time.
|
||||
RESCAN_WINDOW = 2 * 60 * 60
|
||||
|
||||
def mine_large_blocks(node, n):
|
||||
# Make a large scriptPubKey for the coinbase transaction. This is OP_RETURN
|
||||
# followed by 950k of OP_NOP. This would be non-standard in a non-coinbase
|
||||
# transaction but is consensus valid.
|
||||
|
||||
# Set the nTime if this is the first time this function has been called.
|
||||
# A static variable ensures that time is monotonicly increasing and is therefore
|
||||
# different for each block created => blockhash is unique.
|
||||
if "nTimes" not in mine_large_blocks.__dict__:
|
||||
mine_large_blocks.nTime = 0
|
||||
|
||||
# Get the block parameters for the first block
|
||||
big_script = CScript([OP_RETURN] + [OP_NOP] * 950000)
|
||||
best_block = node.getblock(node.getbestblockhash())
|
||||
height = int(best_block["height"]) + 1
|
||||
mine_large_blocks.nTime = max(mine_large_blocks.nTime, int(best_block["time"])) + 1
|
||||
previousblockhash = int(best_block["hash"], 16)
|
||||
|
||||
for _ in range(n):
|
||||
# Build the coinbase transaction (with large scriptPubKey)
|
||||
coinbase_tx = create_coinbase(height)
|
||||
coinbase_tx.vin[0].nSequence = 2 ** 32 - 1
|
||||
coinbase_tx.vout[0].scriptPubKey = big_script
|
||||
coinbase_tx.rehash()
|
||||
|
||||
# Build the block
|
||||
block = CBlock()
|
||||
block.nVersion = 0x620004
|
||||
block.hashPrevBlock = previousblockhash
|
||||
block.nTime = mine_large_blocks.nTime
|
||||
block.nBits = int('207fffff', 16)
|
||||
block.nNonce = 0
|
||||
block.vtx = [coinbase_tx]
|
||||
block.hashMerkleRoot = block.calc_merkle_root()
|
||||
block.calc_sha256()
|
||||
block.solve()
|
||||
|
||||
# Submit to the node
|
||||
node.submitblock(block.serialize().hex())
|
||||
|
||||
previousblockhash = block.sha256
|
||||
height += 1
|
||||
mine_large_blocks.nTime += 1
|
||||
|
||||
def calc_usage(blockdir):
|
||||
return sum(os.path.getsize(blockdir+f) for f in os.listdir(blockdir) if os.path.isfile(blockdir+f)) / (1024. * 1024.)
|
||||
|
@ -34,28 +88,24 @@ class PruneTest(BitcoinTestFramework):
|
|||
self.setup_clean_chain = True
|
||||
self.num_nodes = 6
|
||||
|
||||
# Cache for utxos, as the listunspent may take a long time later in the test
|
||||
self.utxo_cache_0 = []
|
||||
self.utxo_cache_1 = []
|
||||
|
||||
def setup_network(self):
|
||||
self.nodes = []
|
||||
self.is_network_split = False
|
||||
|
||||
# Create nodes 0 and 1 to mine
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900))
|
||||
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900))
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-maxreceivebuffer=20000"], timewait=1200))
|
||||
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-maxreceivebuffer=20000"], timewait=1200))
|
||||
|
||||
# Create node 2 to test pruning
|
||||
self.nodes.append(start_node(2, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-prune=550"], timewait=900))
|
||||
self.nodes.append(start_node(2, self.options.tmpdir, ["-debug", "-maxreceivebuffer=20000", "-prune=2200"], timewait=1200))
|
||||
self.prunedir = self.options.tmpdir+"/node2/regtest/blocks/"
|
||||
|
||||
# Create nodes 3 and 4 to test manual pruning (they will be re-started with manual pruning later)
|
||||
self.nodes.append(start_node(3, self.options.tmpdir, ["-debug=0","-maxreceivebuffer=20000","-blockmaxsize=999000"], timewait=900))
|
||||
self.nodes.append(start_node(4, self.options.tmpdir, ["-debug=0","-maxreceivebuffer=20000","-blockmaxsize=999000"], timewait=900))
|
||||
self.nodes.append(start_node(3, self.options.tmpdir, ["-debug=0", "-maxreceivebuffer=20000"], timewait=1200))
|
||||
self.nodes.append(start_node(4, self.options.tmpdir, ["-debug=0", "-maxreceivebuffer=20000"], timewait=1200))
|
||||
|
||||
# Create nodes 5 to test wallet in prune mode, but do not connect
|
||||
self.nodes.append(start_node(5, self.options.tmpdir, ["-debug=0", "-prune=550"]))
|
||||
self.nodes.append(start_node(5, self.options.tmpdir, ["-debug=0", "-prune=2200"]))
|
||||
|
||||
# Determine default relay fee
|
||||
self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"]
|
||||
|
@ -63,8 +113,7 @@ class PruneTest(BitcoinTestFramework):
|
|||
connect_nodes(self.nodes[0], 1)
|
||||
connect_nodes(self.nodes[1], 2)
|
||||
connect_nodes(self.nodes[2], 0)
|
||||
connect_nodes(self.nodes[0], 3)
|
||||
connect_nodes(self.nodes[0], 4)
|
||||
connect_nodes(self.nodes[3], 4)
|
||||
sync_blocks(self.nodes[0:5])
|
||||
|
||||
def create_big_chain(self):
|
||||
|
@ -72,21 +121,22 @@ class PruneTest(BitcoinTestFramework):
|
|||
self.nodes[1].generate(200)
|
||||
sync_blocks(self.nodes[0:2])
|
||||
self.nodes[0].generate(150)
|
||||
# Then mine enough full blocks to create more than 550MiB of data
|
||||
for i in range(645):
|
||||
mine_large_block(self.nodes[0], self.utxo_cache_0)
|
||||
|
||||
sync_blocks(self.nodes[0:5])
|
||||
# Then mine enough full blocks to create more than 2200MiB of data
|
||||
mine_large_blocks(self.nodes[0], 2395)
|
||||
sync_blocks(self.nodes[0:2])
|
||||
# Note: Separated the manual testing from the main test
|
||||
# This can and should be improved in the future
|
||||
mine_large_blocks(self.nodes[3], 995)
|
||||
mine_large_blocks(self.nodes[4], 995)
|
||||
|
||||
def test_height_min(self):
|
||||
if not os.path.isfile(self.prunedir+"blk00000.dat"):
|
||||
raise AssertionError("blk00000.dat is missing, pruning too early")
|
||||
print("Success")
|
||||
print("Though we're already using more than 550MiB, current usage:", calc_usage(self.prunedir))
|
||||
print("Mining 25 more blocks should cause the first block file to be pruned")
|
||||
print("Though we're already using more than 2200MiB, current usage:", calc_usage(self.prunedir))
|
||||
print("Mining 20 more blocks should cause the first block file to be pruned")
|
||||
# Pruning doesn't run until we're allocating another chunk, 20 full blocks past the height cutoff will ensure this
|
||||
for i in range(25):
|
||||
mine_large_block(self.nodes[0], self.utxo_cache_0)
|
||||
mine_large_blocks(self.nodes[0], 20)
|
||||
|
||||
waitstart = time.time()
|
||||
while os.path.isfile(self.prunedir+"blk00000.dat"):
|
||||
|
@ -97,29 +147,24 @@ class PruneTest(BitcoinTestFramework):
|
|||
print("Success")
|
||||
usage = calc_usage(self.prunedir)
|
||||
print("Usage should be below target:", usage)
|
||||
if (usage > 550):
|
||||
if (usage > 2200):
|
||||
raise AssertionError("Pruning target not being met")
|
||||
|
||||
def create_chain_with_staleblocks(self):
|
||||
# Create stale blocks in manageable sized chunks
|
||||
print("Mine 24 (stale) blocks on Node 1, followed by 25 (main chain) block reorg from Node 0, for 12 rounds")
|
||||
|
||||
for j in range(12):
|
||||
# Disconnect node 0 so it can mine a longer reorg chain without knowing about node 1's soon-to-be-stale chain
|
||||
# Node 2 stays connected, so it hears about the stale blocks and then reorg's when node0 reconnects
|
||||
# Stopping node 0 also clears its mempool, so it doesn't have node1's transactions to accidentally mine
|
||||
self.stop_node(0)
|
||||
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900)
|
||||
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000", "-checkblocks=6"], timewait=1200)
|
||||
|
||||
# Mine 24 blocks in node 1
|
||||
for i in range(24):
|
||||
if j == 0:
|
||||
mine_large_block(self.nodes[1], self.utxo_cache_1)
|
||||
else:
|
||||
self.nodes[1].generate(1) #tx's already in mempool from previous disconnects
|
||||
mine_large_blocks(self.nodes[1], 24)
|
||||
|
||||
# Reorg back with 25 block chain from node 0
|
||||
for i in range(25):
|
||||
mine_large_block(self.nodes[0], self.utxo_cache_0)
|
||||
mine_large_blocks(self.nodes[0], 25)
|
||||
|
||||
# Create connections in the order so both nodes can see the reorg at the same time
|
||||
connect_nodes(self.nodes[1], 0)
|
||||
|
@ -129,25 +174,26 @@ class PruneTest(BitcoinTestFramework):
|
|||
print("Usage can be over target because of high stale rate:", calc_usage(self.prunedir))
|
||||
|
||||
def reorg_test(self):
|
||||
# Node 1 will mine a 300 block chain starting 287 blocks back from Node 0 and Node 2's tip
|
||||
# This will cause Node 2 to do a reorg requiring 288 blocks of undo data to the reorg_test chain
|
||||
# Node 1 will mine a 1441 block chain starting 1439 blocks back from Node 0 and Node 2's tip
|
||||
# This will cause Node 2 to do a reorg requiring 1440 blocks of undo data to the reorg_test chain
|
||||
# Reboot node 1 to clear its mempool (hopefully make the invalidate faster)
|
||||
# Lower the block max size so we don't keep mining all our big mempool transactions (from disconnected blocks)
|
||||
self.stop_node(1)
|
||||
self.nodes[1]=start_node(1, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=5000", "-checkblocks=5", "-disablesafemode"], timewait=900)
|
||||
self.nodes[1]=start_node(1, self.options.tmpdir, ["-debug", "-maxreceivebuffer=20000", "-blockmaxsize=5000", "-blockmaxweight=20000", "-checkblocks=6", "-disablesafemode"], timewait=1200)
|
||||
|
||||
height = self.nodes[1].getblockcount()
|
||||
print("Current block height:", height)
|
||||
|
||||
invalidheight = height-287
|
||||
invalidheight = height-1439
|
||||
badhash = self.nodes[1].getblockhash(invalidheight)
|
||||
print("Invalidating block at height:",invalidheight,badhash)
|
||||
self.nodes[1].invalidateblock(badhash)
|
||||
|
||||
# We've now switched to our previously mined-24 block fork on node 1, but that's not what we want
|
||||
# So invalidate that fork as well, until we're on the same chain as node 0/2 (but at an ancestor 288 blocks ago)
|
||||
# So invalidate that fork as well, until we're on the same chain as node 0/2 (but at an ancestor 1440 blocks ago)
|
||||
mainchainhash = self.nodes[0].getblockhash(invalidheight - 1)
|
||||
curhash = self.nodes[1].getblockhash(invalidheight - 1)
|
||||
print('curhash != mainchainhash: ', curhash != mainchainhash)
|
||||
while curhash != mainchainhash:
|
||||
self.nodes[1].invalidateblock(curhash)
|
||||
curhash = self.nodes[1].getblockhash(invalidheight - 1)
|
||||
|
@ -157,32 +203,33 @@ class PruneTest(BitcoinTestFramework):
|
|||
|
||||
# Reboot node1 to clear those giant tx's from mempool
|
||||
self.stop_node(1)
|
||||
self.nodes[1]=start_node(1, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=5000", "-checkblocks=5", "-disablesafemode"], timewait=900)
|
||||
self.nodes[1]=start_node(1, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000", "-blockmaxsize=5000", "-blockmaxweight=20000", "-checkblocks=6", "-disablesafemode"], timewait=1200)
|
||||
|
||||
print("Generating new longer chain of 300 more blocks")
|
||||
self.nodes[1].generate(300)
|
||||
print("Generating new longer chain of 1441 more blocks")
|
||||
self.nodes[1].generate(1441)
|
||||
|
||||
print("Reconnect nodes")
|
||||
connect_nodes(self.nodes[0], 1)
|
||||
connect_nodes(self.nodes[2], 1)
|
||||
sync_blocks(self.nodes[0:3], timeout=120)
|
||||
sync_blocks(self.nodes[0:3], timeout=300)
|
||||
|
||||
print("Verify height on node 2:",self.nodes[2].getblockcount())
|
||||
print("Usage possibly still high bc of stale blocks in block files:", calc_usage(self.prunedir))
|
||||
|
||||
print("Mine 220 more blocks so we have requisite history (some blocks will be big and cause pruning of previous chain)")
|
||||
for i in range(22):
|
||||
# This can be slow, so do this in multiple RPC calls to avoid
|
||||
# RPC timeouts.
|
||||
self.nodes[0].generate(10) #node 0 has many large tx's in its mempool from the disconnects
|
||||
sync_blocks(self.nodes[0:3], timeout=300)
|
||||
print("Mine 992 more blocks so we have requisite history (some blocks will be big and cause pruning of previous chain)")
|
||||
# Get node0's wallet transactions back in its mempool, to avoid the
|
||||
# mined blocks from being too small.
|
||||
self.nodes[0].resendwallettransactions()
|
||||
mine_large_blocks(self.nodes[0], 992)
|
||||
|
||||
sync_blocks(self.nodes[0:3], timeout=120)
|
||||
|
||||
usage = calc_usage(self.prunedir)
|
||||
print("Usage should be below target:", usage)
|
||||
if (usage > 550):
|
||||
if (usage > 2200):
|
||||
raise AssertionError("Pruning target not being met")
|
||||
|
||||
return invalidheight,badhash
|
||||
return invalidheight, badhash
|
||||
|
||||
def reorg_back(self):
|
||||
# Verify that a block on the old main chain fork has been pruned away
|
||||
|
@ -190,8 +237,8 @@ class PruneTest(BitcoinTestFramework):
|
|||
print("Will need to redownload block",self.forkheight)
|
||||
|
||||
# Verify that we have enough history to reorg back to the fork point
|
||||
# Although this is more than 288 blocks, because this chain was written more recently
|
||||
# and only its other 299 small and 220 large block are in the block files after it,
|
||||
# Although this is more than 1440 blocks, because this chain was written more recently
|
||||
# and only its other 1441 small and 992 large block are in the block files after it,
|
||||
# its expected to still be retained
|
||||
self.nodes[2].getblock(self.nodes[2].getblockhash(self.forkheight))
|
||||
|
||||
|
@ -208,7 +255,7 @@ class PruneTest(BitcoinTestFramework):
|
|||
# because it has all the block data.
|
||||
# However it must mine enough blocks to have a more work chain than the reorg_test chain in order
|
||||
# to trigger node 2's block download logic.
|
||||
# At this point node 2 is within 288 blocks of the fork point so it will preserve its ability to reorg
|
||||
# At this point node 2 is within 1440 blocks of the fork point so it will preserve its ability to reorg
|
||||
if self.nodes[2].getblockcount() < self.mainchainheight:
|
||||
blocks_to_mine = first_reorg_height + 1 - self.mainchainheight
|
||||
print("Rewind node 0 to prev main chain to mine longer chain to trigger redownload. Blocks needed:", blocks_to_mine)
|
||||
|
@ -283,34 +330,36 @@ class PruneTest(BitcoinTestFramework):
|
|||
if not has_block(0):
|
||||
raise AssertionError("blk00000.dat is missing when should still be there")
|
||||
|
||||
# height=500 should prune first file
|
||||
prune(500)
|
||||
# height=141 should prune first file
|
||||
prune(141)
|
||||
if has_block(0):
|
||||
raise AssertionError("blk00000.dat is still there, should be pruned by now")
|
||||
if not has_block(1):
|
||||
raise AssertionError("blk00001.dat is missing when should still be there")
|
||||
|
||||
# height=650 should prune second file
|
||||
prune(650)
|
||||
# height=282 should prune second file
|
||||
prune(282)
|
||||
if has_block(1):
|
||||
raise AssertionError("blk00001.dat is still there, should be pruned by now")
|
||||
|
||||
# height=1000 should not prune anything more, because tip-288 is in blk00002.dat.
|
||||
prune(1000, 1001 - MIN_BLOCKS_TO_KEEP)
|
||||
if not has_block(2):
|
||||
prune(1000)
|
||||
if has_block(2):
|
||||
raise AssertionError("blk00002.dat is still there, should be pruned by now")
|
||||
|
||||
# advance the tip so blk00002.dat and blk00003.dat can be pruned (the last 288 blocks should now be in blk00004.dat)
|
||||
node.generate(288)
|
||||
prune(1000)
|
||||
if has_block(2):
|
||||
raise AssertionError("blk00002.dat is still there, should be pruned by now")
|
||||
if has_block(3):
|
||||
raise AssertionError("blk00003.dat is still there, should be pruned by now")
|
||||
|
||||
# stop node, start back up with auto-prune at 550MB, make sure still runs
|
||||
for fnum in range(7):
|
||||
if has_block(fnum):
|
||||
raise AssertionError(f"blk0000{fnum}.dat is still there, should be pruned by now")
|
||||
if not has_block(7):
|
||||
raise AssertionError("blk00007.dat is missing when should still be there")
|
||||
|
||||
# stop node, start back up with auto-prune at 2200MB, make sure still runs
|
||||
self.stop_node(node_number)
|
||||
self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-debug=0","-prune=550"], timewait=900)
|
||||
self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-debug=0","-prune=2200"], timewait=900)
|
||||
|
||||
print("Success")
|
||||
|
||||
|
@ -318,22 +367,22 @@ class PruneTest(BitcoinTestFramework):
|
|||
# check that the pruning node's wallet is still in good shape
|
||||
print("Stop and start pruning node to trigger wallet rescan")
|
||||
self.stop_node(2)
|
||||
start_node(2, self.options.tmpdir, ["-debug=1","-prune=550"])
|
||||
start_node(2, self.options.tmpdir, ["-debug=1","-prune=2200"])
|
||||
print("Success")
|
||||
|
||||
# check that wallet loads loads successfully when restarting a pruned node after IBD.
|
||||
# check that wallet loads successfully when restarting a pruned node after IBD.
|
||||
# this was reported to fail in #7494.
|
||||
print ("Syncing node 5 to test wallet")
|
||||
connect_nodes(self.nodes[0], 5)
|
||||
nds = [self.nodes[0], self.nodes[5]]
|
||||
sync_blocks(nds, wait=5, timeout=300)
|
||||
self.stop_node(5) #stop and start to trigger rescan
|
||||
start_node(5, self.options.tmpdir, ["-debug=1","-prune=550"])
|
||||
start_node(5, self.options.tmpdir, ["-debug=1","-prune=2200"])
|
||||
print ("Success")
|
||||
|
||||
def run_test(self):
|
||||
print("Warning! This test requires 4GB of disk space and takes over 30 mins (up to 2 hours)")
|
||||
print("Mining a big blockchain of 995 blocks")
|
||||
print("Warning! This test requires 21GB of disk space and takes over 20 mins (up to 2 hours)")
|
||||
print("Mining a big blockchain of 2745 blocks")
|
||||
self.create_big_chain()
|
||||
# Chain diagram key:
|
||||
# * blocks on main chain
|
||||
|
@ -341,94 +390,94 @@ class PruneTest(BitcoinTestFramework):
|
|||
# X invalidated block
|
||||
# N1 Node 1
|
||||
#
|
||||
# Start by mining a simple chain that all nodes have
|
||||
# N0=N1=N2 **...*(995)
|
||||
# Start by mining a simple chain that nodes 0-2 have
|
||||
# N0=N1=N2 **...*(2745)
|
||||
|
||||
# stop manual-pruning node with 995 blocks
|
||||
# stop manual-pruning nodes with 995 blocks
|
||||
self.stop_node(3)
|
||||
self.stop_node(4)
|
||||
|
||||
print("Check that we haven't started pruning yet because we're below PruneAfterHeight")
|
||||
self.test_height_min()
|
||||
# Extend this chain past the PruneAfterHeight
|
||||
# N0=N1=N2 **...*(1020)
|
||||
# N0=N1=N2 **...*(2765)
|
||||
|
||||
print("Check that we'll exceed disk space target if we have a very high stale block rate")
|
||||
self.create_chain_with_staleblocks()
|
||||
# Disconnect N0
|
||||
# And mine a 24 block chain on N1 and a separate 25 block chain on N0
|
||||
# N1=N2 **...*+...+(1044)
|
||||
# N0 **...**...**(1045)
|
||||
# N1=N2 **...*+...+(2789)
|
||||
# N0 **...**...**(2790)
|
||||
#
|
||||
# reconnect nodes causing reorg on N1 and N2
|
||||
# N1=N2 **...*(1020) *...**(1045)
|
||||
# N1=N2 **...*(2765) *...**(2790)
|
||||
# \
|
||||
# +...+(1044)
|
||||
# +...+(2789)
|
||||
#
|
||||
# repeat this process until you have 12 stale forks hanging off the
|
||||
# main chain on N1 and N2
|
||||
# N0 *************************...***************************(1320)
|
||||
# N0 *************************...***************************(3065)
|
||||
#
|
||||
# N1=N2 **...*(1020) *...**(1045) *.. ..**(1295) *...**(1320)
|
||||
# N1=N2 **...*(2765) *...**(2790) *.. ..**(3040) *...**(3065)
|
||||
# \ \ \
|
||||
# +...+(1044) &.. $...$(1319)
|
||||
# +...+(2789) &.. $...$(3064)
|
||||
|
||||
# Save some current chain state for later use
|
||||
self.mainchainheight = self.nodes[2].getblockcount() #1320
|
||||
self.mainchainheight = self.nodes[2].getblockcount() #3065
|
||||
self.mainchainhash2 = self.nodes[2].getblockhash(self.mainchainheight)
|
||||
|
||||
print("Check that we can survive a 288 block reorg still")
|
||||
(self.forkheight,self.forkhash) = self.reorg_test() #(1033, )
|
||||
# Now create a 288 block reorg by mining a longer chain on N1
|
||||
print("Check that we can survive a 1440 block reorg still")
|
||||
(self.forkheight,self.forkhash) = self.reorg_test() #(1626, )
|
||||
# Now create a 1440 block reorg by mining a longer chain on N1
|
||||
# First disconnect N1
|
||||
# Then invalidate 1033 on main chain and 1032 on fork so height is 1032 on main chain
|
||||
# N1 **...*(1020) **...**(1032)X..
|
||||
# Then invalidate 1626 on main chain and 1625 on fork so height is 1625 on main chain
|
||||
# N1 **...*(2765) **...**(1625)X..
|
||||
# \
|
||||
# ++...+(1031)X..
|
||||
# ++...+(1624)X..
|
||||
#
|
||||
# Now mine 300 more blocks on N1
|
||||
# N1 **...*(1020) **...**(1032) @@...@(1332)
|
||||
# Now mine 1441 more blocks on N1
|
||||
# N1 **...*(2765) **...**(1625) @@...@(3066)
|
||||
# \ \
|
||||
# \ X...
|
||||
# \ \
|
||||
# ++...+(1031)X.. ..
|
||||
# ++...+(1624)X.. ..
|
||||
#
|
||||
# Reconnect nodes and mine 220 more blocks on N1
|
||||
# N1 **...*(1020) **...**(1032) @@...@@@(1552)
|
||||
# Reconnect nodes and mine 992 more blocks on N1
|
||||
# N1 **...*(2765) **...**(1625) @@...@@@(4058)
|
||||
# \ \
|
||||
# \ X...
|
||||
# \ \
|
||||
# ++...+(1031)X.. ..
|
||||
# ++...+(1624)X.. ..
|
||||
#
|
||||
# N2 **...*(1020) **...**(1032) @@...@@@(1552)
|
||||
# N2 **...*(2765) **...**(1625) @@...@@@(4058)
|
||||
# \ \
|
||||
# \ *...**(1320)
|
||||
# \ *...**(3065)
|
||||
# \ \
|
||||
# ++...++(1044) ..
|
||||
# ++...++(2789) ..
|
||||
#
|
||||
# N0 ********************(1032) @@...@@@(1552)
|
||||
# N0 ********************(1625) @@...@@@(4058)
|
||||
# \
|
||||
# *...**(1320)
|
||||
# *...**(3065)
|
||||
|
||||
print("Test that we can rerequest a block we previously pruned if needed for a reorg")
|
||||
self.reorg_back()
|
||||
# Verify that N2 still has block 1033 on current chain (@), but not on main chain (*)
|
||||
# Invalidate 1033 on current chain (@) on N2 and we should be able to reorg to
|
||||
# Verify that N2 still has block 1626 on current chain (@), but not on main chain (*)
|
||||
# Invalidate 1626 on current chain (@) on N2 and we should be able to reorg to
|
||||
# original main chain (*), but will require redownload of some blocks
|
||||
# In order to have a peer we think we can download from, must also perform this invalidation
|
||||
# on N0 and mine a new longest chain to trigger.
|
||||
# Final result:
|
||||
# N0 ********************(1032) **...****(1553)
|
||||
# N0 ********************(1625) **...****(4059)
|
||||
# \
|
||||
# X@...@@@(1552)
|
||||
# X@...@@@(4058)
|
||||
#
|
||||
# N2 **...*(1020) **...**(1032) **...****(1553)
|
||||
# N2 **...*(2765) **...**(1625) **...****(4059)
|
||||
# \ \
|
||||
# \ X@...@@@(1552)
|
||||
# \ X@...@@@(4058)
|
||||
# \
|
||||
# +..
|
||||
#
|
||||
# N1 doesn't change because 1033 on main chain (*) is invalid
|
||||
# N1 doesn't change because 1626 on main chain (*) is invalid
|
||||
|
||||
print("Test manual pruning with block indices")
|
||||
self.manual_test(3, use_timestamp=False)
|
||||
|
|
|
@ -509,15 +509,12 @@ def random_transaction(nodes, amount, min_fee, fee_increment, fee_variants):
|
|||
|
||||
def assert_fee_amount(fee, tx_size, fee_per_kB):
|
||||
"""Assert the fee was in range"""
|
||||
target_fee = fee_per_kB / 1000
|
||||
target_fee = tx_size * fee_per_kB / 1000
|
||||
if fee < target_fee:
|
||||
raise AssertionError("Fee of %s BTC too low! (Should be %s BTC)"%(str(fee), str(target_fee)))
|
||||
raise AssertionError("Fee of %s DOGE too low! (Should be %s DOGE)"%(str(fee), str(target_fee)))
|
||||
# allow the wallet's estimation to be at most 2 bytes off
|
||||
if fee > round_tx_size(tx_size + 2) * fee_per_kB / 1000:
|
||||
raise AssertionError("Fee of %s BTC too high! (Should be %s BTC)"%(str(fee), str(target_fee)))
|
||||
|
||||
def round_tx_size(tx_size):
|
||||
return int(math.ceil(tx_size / 1000.0)) * 1000
|
||||
if fee > (tx_size + 2) * fee_per_kB / 1000:
|
||||
raise AssertionError("Fee of %s DOGE too high! (Should be %s DOGE)"%(str(fee), str(target_fee)))
|
||||
|
||||
def assert_equal(thing1, thing2, *args):
|
||||
if thing1 != thing2 or any(thing1 != arg for arg in args):
|
||||
|
|
|
@ -49,7 +49,7 @@ class TxnMallTest(BitcoinTestFramework):
|
|||
|
||||
# First: use raw transaction API to send 7440000 DOGE to node1_address,
|
||||
# but don't broadcast:
|
||||
doublespend_fee = Decimal('-120')
|
||||
doublespend_fee = Decimal('-1.20')
|
||||
rawtx_input_0 = {}
|
||||
rawtx_input_0["txid"] = fund_foo_txid
|
||||
rawtx_input_0["vout"] = find_output(self.nodes[0], fund_foo_txid, 7314000)
|
||||
|
|
|
@ -38,7 +38,7 @@ class WalletHDTest(BitcoinTestFramework):
|
|||
non_hd_add = self.nodes[0].getnewaddress()
|
||||
self.nodes[1].importprivkey(self.nodes[0].dumpprivkey(non_hd_add))
|
||||
|
||||
# This should be enough to keep the master key and the non-HD key
|
||||
# This should be enough to keep the master key and the non-HD key
|
||||
self.nodes[1].backupwallet(tmpdir + "/hd.bak")
|
||||
#self.nodes[1].dumpwallet(tmpdir + "/hd.dump")
|
||||
|
||||
|
@ -50,7 +50,7 @@ class WalletHDTest(BitcoinTestFramework):
|
|||
for i in range(num_hd_adds):
|
||||
hd_add = self.nodes[1].getnewaddress()
|
||||
hd_info = self.nodes[1].validateaddress(hd_add)
|
||||
assert_equal(hd_info["hdkeypath"], "m/0'/0'/"+str(i+1)+"'")
|
||||
assert_equal(hd_info["hdkeypath"], "m/0'/3'/"+str(i+1)+"'")
|
||||
assert_equal(hd_info["hdmasterkeyid"], masterkeyid)
|
||||
self.nodes[0].sendtoaddress(hd_add, 1)
|
||||
self.nodes[0].generate(1)
|
||||
|
@ -72,7 +72,7 @@ class WalletHDTest(BitcoinTestFramework):
|
|||
for _ in range(num_hd_adds):
|
||||
hd_add_2 = self.nodes[1].getnewaddress()
|
||||
hd_info_2 = self.nodes[1].validateaddress(hd_add_2)
|
||||
assert_equal(hd_info_2["hdkeypath"], "m/0'/0'/"+str(_+1)+"'")
|
||||
assert_equal(hd_info_2["hdkeypath"], "m/0'/3'/"+str(_+1)+"'")
|
||||
assert_equal(hd_info_2["hdmasterkeyid"], masterkeyid)
|
||||
assert_equal(hd_add, hd_add_2)
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ class WalletTest (BitcoinTestFramework):
|
|||
|
||||
# Send 100000 DOGE normal
|
||||
address = self.nodes[0].getnewaddress("test")
|
||||
fee_per_byte = Decimal('1') / 1000
|
||||
fee_per_byte = Decimal('0.01') / 1000
|
||||
self.nodes[2].settxfee(fee_per_byte * 1000)
|
||||
txid = self.nodes[2].sendtoaddress(address, 100000, "", "", False)
|
||||
self.nodes[2].generate(1)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</array>
|
||||
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>bitcoin.icns</string>
|
||||
<string>dogecoin.icns</string>
|
||||
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Dogecoin-Qt</string>
|
||||
|
||||
|
||||
<key>CFBundleName</key>
|
||||
<string>Dogecoin-Qt</string>
|
||||
|
||||
|
@ -99,7 +99,7 @@
|
|||
|
||||
<key>LSAppNapIsDisabled</key>
|
||||
<string>True</string>
|
||||
|
||||
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.finance</string>
|
||||
</dict>
|
||||
|
|
|
@ -356,7 +356,10 @@ libdogecoin_util_a_SOURCES = \
|
|||
$(BITCOIN_CORE_H)
|
||||
|
||||
if GLIBC_BACK_COMPAT
|
||||
|
||||
libdogecoin_util_a_SOURCES += compat/glibc_compat.cpp
|
||||
AM_LDFLAGS += $(COMPAT_LDFLAGS)
|
||||
|
||||
endif
|
||||
|
||||
# cli: shared between bitcoin-cli and bitcoin-qt
|
||||
|
|
|
@ -250,9 +250,9 @@ RES_ICONS = \
|
|||
qt/res/icons/address-book.png \
|
||||
qt/res/icons/about.png \
|
||||
qt/res/icons/about_qt.png \
|
||||
qt/res/icons/bitcoin.ico \
|
||||
qt/res/icons/dogecoin.ico \
|
||||
qt/res/icons/bitcoin_testnet.ico \
|
||||
qt/res/icons/bitcoin.png \
|
||||
qt/res/icons/dogecoin.png \
|
||||
qt/res/icons/chevron.png \
|
||||
qt/res/icons/clock1.png \
|
||||
qt/res/icons/clock2.png \
|
||||
|
@ -371,7 +371,7 @@ if ENABLE_WALLET
|
|||
BITCOIN_QT_CPP += $(BITCOIN_QT_WALLET_CPP)
|
||||
endif
|
||||
|
||||
RES_IMAGES =
|
||||
RES_IMAGES =
|
||||
|
||||
RES_MOVIES = $(wildcard $(srcdir)/qt/res/movies/spinner-*.png)
|
||||
|
||||
|
@ -441,7 +441,7 @@ QT_QM=$(QT_TS:.ts=.qm)
|
|||
|
||||
SECONDARY: $(QT_QM)
|
||||
|
||||
$(srcdir)/qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_zmq_a_SOURCES) $(libbitcoin_consensus_a_SOURCES) $(libbitcoin_util_a_SOURCES)
|
||||
$(srcdir)/qt/bitcoinstrings.cpp: $(libdogecoin_server_a_SOURCES) $(libdogecoin_wallet_a_SOURCES) $(libdogecoin_common_a_SOURCES) $(libdogecoin_zmq_a_SOURCES) $(libdogecoin_consensus_a_SOURCES) $(libdogecoin_util_a_SOURCES)
|
||||
@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
|
||||
$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" COPYRIGHT_HOLDERS_SUBSTITUTION="$(COPYRIGHT_HOLDERS_SUBSTITUTION)" $(PYTHON) ../share/qt/extract_strings_qt.py $^
|
||||
|
||||
|
|
|
@ -50,8 +50,7 @@ public:
|
|||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action) {
|
||||
READWRITE(this->nVersion);
|
||||
nVersion = this->nVersion;
|
||||
READWRITE(nVersion);
|
||||
READWRITE(nRelayUntil);
|
||||
READWRITE(nExpiration);
|
||||
READWRITE(nID);
|
||||
|
|
|
@ -25,21 +25,6 @@ CAmount CFeeRate::GetFee(size_t nBytes_) const
|
|||
assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max()));
|
||||
int64_t nSize = int64_t(nBytes_);
|
||||
|
||||
// Dogecoin: Round up to the nearest 1000 bytes so we get round tx fees
|
||||
if (nSize % 1000 > 0) {
|
||||
nSize = nSize + 1000 - (nSize % 1000);
|
||||
}
|
||||
|
||||
return GetRelayFee(nSize);
|
||||
}
|
||||
|
||||
// Dogecoin: Specifically for 1.14.4 we lower accepted relay fees by removing rounding,
|
||||
// in 1.14.5 we should unify the GetFee() functions again.
|
||||
CAmount CFeeRate::GetRelayFee(size_t nBytes_) const
|
||||
{
|
||||
assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max()));
|
||||
int64_t nSize = int64_t(nBytes_);
|
||||
|
||||
CAmount nFee = nSatoshisPerK * nSize / 1000;
|
||||
|
||||
if (nFee == 0 && nSize != 0) {
|
||||
|
|
|
@ -44,7 +44,6 @@ public:
|
|||
explicit CFeeRate(const CAmount& _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { }
|
||||
/** Constructor for a fee rate in satoshis per kB. The size in bytes must not exceed (2^63 - 1)*/
|
||||
CFeeRate(const CAmount& nFeePaid, size_t nBytes);
|
||||
CFeeRate(const CFeeRate& other) { nSatoshisPerK = other.nSatoshisPerK; }
|
||||
/**
|
||||
* Return the wallet fee in koinus for the given size in bytes.
|
||||
*/
|
||||
|
|
|
@ -199,13 +199,14 @@ public:
|
|||
( 3500000, uint256S("0xeaa303b93c1c64d2b3a2cdcf6ccf21b10cc36626965cc2619661e8e1879abdfb"))
|
||||
( 3606083, uint256S("0x954c7c66dee51f0a3fb1edb26200b735f5275fe54d9505c76ebd2bcabac36f1e"))
|
||||
( 3854173, uint256S("0xe4b4ecda4c022406c502a247c0525480268ce7abbbef632796e8ca1646425e75"))
|
||||
( 3963597, uint256S("0x2b6927cfaa5e82353d45f02be8aadd3bfd165ece5ce24b9bfa4db20432befb5d"))
|
||||
};
|
||||
|
||||
chainTxData = ChainTxData{
|
||||
// Data as of block e4b4ecda4c022406c502a247c0525480268ce7abbbef632796e8ca1646425e75 (height 3854173).
|
||||
// Tx estimate based on average of year 2021 (~40k transactions per day)
|
||||
1628934997, // * UNIX timestamp of last checkpoint block
|
||||
77616340, // * total number of transactions between genesis and last checkpoint
|
||||
1635884188, // * UNIX timestamp of last checkpoint block
|
||||
79560907, // * total number of transactions between genesis and last checkpoint
|
||||
// (the tx=... number in the SetBestChain debug.log lines)
|
||||
0.46 // * estimated number of transactions per second after checkpoint
|
||||
};
|
||||
|
@ -352,12 +353,13 @@ public:
|
|||
( 2750000, uint256S("0x473ea9f625d59f534ffcc9738ffc58f7b7b1e0e993078614f5484a9505885563"))
|
||||
( 3062910, uint256S("0x113c41c00934f940a41f99d18b2ad9aefd183a4b7fe80527e1e6c12779bd0246"))
|
||||
( 3286675, uint256S("0x07fef07a255d510297c9189dc96da5f4e41a8184bc979df8294487f07fee1cf3"))
|
||||
( 3445426, uint256S("0x70574db7856bd685abe7b0a8a3e79b29882620645bd763b01459176bceb58cd1"))
|
||||
};
|
||||
|
||||
chainTxData = ChainTxData{
|
||||
// Data as of block 07fef07a255d510297c9189dc96da5f4e41a8184bc979df8294487f07fee1cf3 (height 3286675)
|
||||
1628932841, // * UNIX timestamp of last checkpoint block
|
||||
4469050, // * total number of transactions between genesis and last checkpoint
|
||||
1635884142, // * UNIX timestamp of last checkpoint block
|
||||
4780345, // * total number of transactions between genesis and last checkpoint
|
||||
0.02 // * estimated number of transactions per second after that timestamp
|
||||
};
|
||||
|
||||
|
|
|
@ -8,126 +8,256 @@
|
|||
* IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
|
||||
*/
|
||||
static SeedSpec6 pnSeed6_main[] = {
|
||||
{{0x20,0x01,0x41,0xd0,0x00,0x02,0x43,0xab,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x20,0x01,0x4b,0xa0,0xff,0xec,0x01,0x64,0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef}, 22556},
|
||||
{{0x24,0x00,0x89,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x95,0x2d,0xd0}, 22556},
|
||||
{{0x24,0x00,0x89,0x04,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0xa6,0xb6,0xd9}, 22556},
|
||||
{{0x24,0x01,0x25,0x00,0x01,0x02,0x30,0x32,0x01,0x53,0x01,0x26,0x01,0x93,0x01,0x45}, 22556},
|
||||
{{0x26,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x0b,0x28,0x4d}, 22556},
|
||||
{{0x26,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0xcf,0x61,0xb6}, 22556},
|
||||
{{0x26,0x00,0x3c,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x0b,0xba,0xf2}, 22556},
|
||||
{{0x26,0x04,0x45,0x00,0x00,0x08,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83}, 22556},
|
||||
{{0x26,0x04,0xa8,0x80,0x00,0x04,0x01,0xd0,0x00,0x00,0x00,0x00,0x01,0xe0,0xd0,0x00}, 22556},
|
||||
{{0x26,0x04,0xa8,0x80,0x00,0x04,0x01,0xd0,0x00,0x00,0x00,0x00,0x02,0x95,0xe0,0x00}, 22556},
|
||||
{{0x28,0x00,0x06,0x40,0x00,0x0d,0x00,0x03,0x14,0xd6,0xe7,0xb4,0x11,0x96,0x76,0xdb}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x01,0x20,0x62,0x75,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x01,0x3b,0x0b,0xd6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x01,0x41,0x22,0xcb,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x1c,0x0c,0x5d,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x1c,0x1c,0x9c,0x43,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x02,0x42,0x1c,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x02,0x52,0x14,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x1c,0x1e,0x41,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x00,0xa0,0x14,0xec,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0xc0,0x10,0x8f,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf8,0x0c,0x2c,0x02,0xa9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf9,0x00,0x3a,0x10,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf9,0xc0,0x10,0xa6,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf9,0xc0,0x11,0x27,0xe5,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf9,0x00,0x3b,0x1f,0x86,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf9,0x00,0x3b,0x4f,0xe9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02}, 22556},
|
||||
{{0x2a,0x01,0x04,0xf9,0xc0,0x10,0x7d,0xca,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x2a,0x01,0x07,0xc8,0xaa,0xb9,0x00,0x45,0x50,0x54,0x00,0xff,0xfe,0x19,0x47,0x07}, 22556},
|
||||
{{0x2a,0x01,0x7e,0x00,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x0d,0xdf,0x42}, 22556},
|
||||
{{0x2a,0x01,0x7e,0x00,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x30,0x35,0x08}, 22556},
|
||||
{{0x2a,0x01,0x7e,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x0d,0x8b,0x6f}, 22556},
|
||||
{{0x2a,0x01,0x7e,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x0d,0x9f,0xf1}, 22556},
|
||||
{{0x2a,0x01,0xa5,0x00,0x12,0x90,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05}, 22556},
|
||||
{{0x2a,0x03,0x40,0x00,0x00,0x4d,0x0b,0xda,0x00,0x00,0x00,0x00,0x00,0x02,0x71,0x83}, 22556},
|
||||
{{0x2a,0x02,0x2b,0x80,0x00,0x01,0x00,0x00,0x56,0x52,0x00,0x00,0x00,0x00,0x05,0x72}, 22556},
|
||||
{{0x2a,0x02,0x47,0x80,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x48}, 22556},
|
||||
{{0x2a,0x02,0x47,0x80,0x00,0x08,0x00,0x06,0x00,0x02,0xf5,0x02,0x02,0xb5,0x57,0x36}, 22556},
|
||||
{{0x2a,0x02,0x07,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x30}, 22556},
|
||||
{{0x2a,0x02,0x7b,0x40,0x59,0x28,0x00,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x2a,0x03,0x40,0x00,0x00,0x56,0x0c,0x97,0x84,0xbe,0x9f,0xff,0xfe,0xd0,0x93,0x26}, 22556},
|
||||
{{0x2a,0x03,0xb0,0xc0,0x00,0x01,0x00,0xd0,0x00,0x00,0x00,0x00,0x0e,0x1a,0x00,0x01}, 22556},
|
||||
{{0x2a,0x03,0xb0,0xc0,0x00,0x02,0x00,0xd0,0x00,0x00,0x00,0x00,0x0e,0x33,0xb0,0x01}, 22556},
|
||||
{{0x2a,0x07,0xab,0xc4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0d,0xfd}, 22556},
|
||||
{{0x2a,0x0d,0xeb,0x00,0x80,0x05,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x03,0x70,0xae,0x67}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xbd,0x8f,0xf7}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x27,0x5f,0xba}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x9b,0xa8}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x03,0xe3,0x16,0x56}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc4,0x4b,0xb2}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc4,0x5f,0xd8}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x90,0xb5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x08,0x8c,0xa9,0xad}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0d,0xd4,0xb2,0xbc}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0d,0xe5,0x7e,0x89}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0d,0xeb,0x42,0x22}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x10,0xd8,0x4c}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x3b,0x2a,0x36}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0d,0x4a,0xd9,0x73}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0e,0x01,0x43,0xf1}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0x8a,0xbd,0x26}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0x8d,0xdc,0x74}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xa2,0xf5,0x67}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x7e,0x75,0x45}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xad,0xe0,0x14}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x08,0x15,0x50}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xd2,0xad,0x88}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0x47,0x9a,0x23}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x23,0x99,0x0f,0xfc}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x23,0xbc,0x93,0x97}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x23,0xdf,0x6d,0x55}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x23,0x48,0x6f,0x26}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x3b,0x20,0x0a}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x28,0x47,0x29,0xd0}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x0a,0x1a,0x43}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x99,0x21,0xd1}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x21,0x39,0x51}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x3e,0xc6,0xba}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x4c,0x90,0xf8}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x4c,0xd5,0xc8}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x4d,0xb9,0x0f}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x4d,0xf0,0x88}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x65,0xf5,0x08}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x26,0xef,0x18}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x5f,0x25,0x23}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x6c,0x33,0x4d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0xbb,0x28,0x3d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0xdb,0xb8,0xd6}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0xf2,0x5c,0xe3}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x5b,0x9e,0x97}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x7b,0x54,0xab}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x7d,0xe0,0x03}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x7e,0x45,0x62}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x33,0x0f,0xaf,0x7e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x33,0x26,0x39,0x35}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x35,0xd4,0xe1}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xfa,0x00,0x61}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x33,0x26,0x41,0xb9}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x4d,0xe7,0x29}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x4f,0xe9,0x7d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xa9,0x5d,0x02}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x9c,0x0e,0xaa}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x04,0xa0,0x0d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x15,0x32,0x4e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0xb7,0xba,0x1d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x72,0x50,0x81}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xd7,0x86,0x56}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xe2,0x91,0xb8}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0x59,0xe3,0x9e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x2c,0x7f,0xc4}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x6c,0x08,0xb5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0xba,0x21,0x64}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x15,0xc6,0x39}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x15,0x4b,0x56}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x15,0x59,0xb6}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x2d,0xe3,0x5a}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0x95,0xd3,0x9e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0x77,0x3e,0xd4}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0xc0,0xd2,0x75}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xdf,0x4c,0x0f}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x7a,0x34,0xd5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xb3,0xb9,0x0a}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xb5,0x57,0xb0}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xb8,0xf1,0xfb}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xbf,0xa5,0xd6}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x54,0x79,0x65}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x49,0x41,0x49,0x55}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x77,0x8c,0x59}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x8e,0xfa,0x08}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xfa,0xd3,0x28}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xf0,0x81,0xdd}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x67,0x07,0x16}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xa6,0xe0,0x0c}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x75,0xbe}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x28,0xde}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x02,0x2f,0x11}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x0d,0x9e,0x34}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xc7,0xe9,0x56}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xe2,0x63,0x53}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xfb,0x87,0x1f}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xff,0xf4,0xbd}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x9f,0xd5,0x70}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x26,0xb9}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd6,0x78,0xee}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x18,0xeb,0xbf}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0xe5,0x41,0xfb}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x64,0xc6,0xfd}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x27,0xcd}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x63,0x67,0x33}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xa3,0x91,0xf0}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xa3,0xe1,0x62}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x28,0x00,0x2e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5a,0x53,0xa6,0xea}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xc8,0x29,0x20}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0xcc,0x28,0x19}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0xdc,0xd2,0x81}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0xbc,0xa3,0xc9}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x2b,0xe7,0x01}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x82,0x47,0x1f}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xe4,0x76,0xa9}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xe5,0x41,0xd2}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xc0,0xab}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xa8,0xa4,0xd8}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd8,0x76,0x21}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd9,0x99,0x47}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd9,0x21,0x6d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd9,0x24,0x7e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x7e,0x64,0x17}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x7e,0x7b,0x8f}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0xc1,0xf2,0x38}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x74,0xcb,0xc7,0x23}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x7e,0x7e,0x72}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x61,0x66,0x08,0x3e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x63,0xec,0x28,0xf0}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0x74,0x2d,0xfd}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0x52,0x8f,0x2d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0x88,0xc2,0xe8}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x82,0x4a,0x2a}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0xaf,0xee,0xec}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x36,0x9f,0x4c}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x6a,0xf4,0x4e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x70,0x05,0x25,0xd5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x70,0x4a,0x2d,0x8b}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x72,0x6e,0x25,0xdc}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x74,0xcb,0x86,0x7e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x74,0xcb,0xc7,0x36}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x74,0xcb,0x58,0xa5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x76,0x62,0x40,0x5b}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x80,0x34,0x8f,0xb9}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x86,0x7a,0x38,0x23}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x86,0xd1,0xd3,0x55}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x87,0xb5,0x88,0x5f}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x87,0xb5,0xf8,0x81}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x88,0x90,0xcf,0xf6}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x88,0xf3,0x89,0x28}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x88,0x18,0x22,0xd6}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8a,0xc9,0x5d,0xca}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8a,0x44,0xa6,0x8a}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8a,0x44,0x5c,0x8b}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8b,0xa2,0xcd,0x71}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8b,0xb1,0xb0,0x31}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8f,0xc6,0xe2,0x6e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8f,0xc6,0x61,0x08}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8f,0xb0,0x20,0x2c}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x5b,0x4d,0x7e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x94,0x47,0xc9,0x35}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9b,0x04,0xb0,0xd5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9d,0x5a,0xb7,0x27}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x8a,0x1d,0x93}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0x34,0x2e,0x76}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x94,0xfb,0x9b,0x8f}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x94,0xfb,0x16,0xb9}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x38,0x40,0x93}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9d,0xf5,0x63,0xe9}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0xcb,0x41,0xd6}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa0,0x02,0xca,0xa3}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa1,0x23,0xa0,0x45}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa1,0x61,0x66,0x3e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa1,0x61,0xa5,0x3a}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa1,0x61,0xa5,0x3b}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa1,0x61,0xa5,0x3c}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0x37,0x5b,0x88}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa3,0xac,0x25,0x70}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa4,0x44,0x77,0x81}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa5,0xe3,0xc5,0xe9}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa5,0xe8,0x8e,0x47}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa1,0x2f,0x24,0x65}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa1,0x61,0x8d,0xbd}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0x3e,0x15,0x29}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa3,0xac,0x3d,0xed}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa7,0xe9,0x04,0x7d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa7,0x63,0xe9,0xb5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa8,0x77,0x81,0x7e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa8,0x77,0xe3,0xb5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa8,0x77,0x4a,0xba}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x68,0x9c,0xa6}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x68,0x9c,0xcc}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x68,0xc7,0x17}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x68,0x5b,0xcb}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x68,0xce,0xb4}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x69,0x75,0x78}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x69,0xe5,0xf7}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x69,0x32,0xdb}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x74,0x99,0x58}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xa4,0xd8,0xea}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xd4,0xc5,0x3f}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xff,0xcb,0xbf}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xf5,0x93,0xd2}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xff,0xc6,0x7d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xff,0xcc,0x7c}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x31,0x76,0x25}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x52,0x70,0x6e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x7f,0xa9,0xe6}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x19,0x2e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x3f,0x70}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x80,0xe8,0x32}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x80,0xcd,0x49}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x12,0xf2,0xf4}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x27,0xb5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x28,0x29}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x2a,0x44}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x34,0x36,0x56}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3f,0x33,0x5a}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb5,0xe1,0x88,0x0b}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb5,0xe1,0x88,0x0c}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb5,0xe1,0x88,0x0d}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x69,0xf2,0x9a}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x40,0xcd,0x66}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x78,0x5b}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x8a,0x58,0x2f}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x4c,0xd0,0x7b}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0x9e,0xd9}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x35,0x70,0x96}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x63,0x87,0xc2}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0xa8,0x92,0x66}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0xa3,0x83,0x5b}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0xa3,0xa7,0xfe}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0xc3,0x7a,0x04}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0x24,0x93,0x71}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xc9,0x6e,0xdc}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x5a,0xc8,0x8b}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x7b,0xbc,0xc1}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x64,0x9a,0xf2}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x36,0x71,0xcc}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xe7,0xa1,0x53}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc8,0x3b,0x10,0x12}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x3d,0xe0,0xd2}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x3d,0xfd,0xe5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcf,0xb4,0xfa,0xae}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcf,0xfe,0x32,0x3e}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x71,0x83,0xe5}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x7e,0x02,0x83}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xde,0x0a,0x75}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x61,0x85,0xe8}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x8b,0xf3,0xea}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x72,0xe0,0x30}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xbf,0xdc,0xb4}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xa0,0xf7,0xde}, 22556}
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xdb,0x26,0xec}, 22556},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xa0,0xf7,0xde}, 22556},
|
||||
{{0x20,0x01,0x19,0xf0,0x50,0x01,0x24,0xd8,0x54,0x00,0x03,0xff,0xfe,0x77,0x54,0x6c}, 22556},
|
||||
{{0x20,0x01,0x41,0xd0,0x00,0x02,0xea,0x8a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x20,0x01,0x41,0xd0,0x08,0x00,0x2b,0x9e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, 22556},
|
||||
{{0x20,0x01,0x41,0xd0,0x00,0x0a,0xfe,0xd8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x20,0x01,0x41,0xd0,0x00,0x0e,0x09,0xb2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, 22556},
|
||||
{{0x20,0x01,0x04,0x38,0x80,0x18,0x00,0xca,0x11,0x7f,0x1b,0xd3,0x79,0x7a,0xce,0x3a}, 22556},
|
||||
{{0x20,0x01,0x44,0x79,0x45,0x03,0x0a,0x00,0x1e,0x1b,0x0d,0xff,0xfe,0xe3,0xcd,0xac}, 22556},
|
||||
{{0x24,0x00,0x89,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x0d,0xdf,0xbb}, 22556},
|
||||
{{0x24,0x00,0x89,0x01,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x95,0x2d,0xd0}, 22556},
|
||||
{{0x24,0x00,0x89,0x02,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x01,0xad,0xae}, 22556},
|
||||
{{0x24,0x00,0x89,0x04,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x0d,0x07,0x42}, 22556},
|
||||
{{0x24,0x00,0x89,0x04,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0xa6,0xb6,0xd9}, 22556},
|
||||
{{0x24,0x00,0x89,0x07,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0x01,0xa4,0x73}, 22556},
|
||||
{{0x24,0x00,0x89,0x07,0x00,0x00,0x00,0x00,0xf0,0x3c,0x92,0xff,0xfe,0xe6,0x86,0x60}, 22556}
|
||||
};
|
||||
|
||||
static SeedSpec6 pnSeed6_test[] = {
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
*/
|
||||
|
||||
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
|
||||
#define CLIENT_VERSION_MAJOR 0
|
||||
#define CLIENT_VERSION_MAJOR 1
|
||||
#define CLIENT_VERSION_MINOR 14
|
||||
#define CLIENT_VERSION_REVISION 4
|
||||
#define CLIENT_VERSION_REVISION 5
|
||||
#define CLIENT_VERSION_BUILD 0
|
||||
|
||||
//! Set to true for release, false for prerelease or test build
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#if defined(HAVE_SYS_SELECT_H)
|
||||
#include <sys/select.h>
|
||||
|
@ -27,3 +28,47 @@ extern "C" FDELT_TYPE __fdelt_warn(FDELT_TYPE a)
|
|||
return a / __NFDBITS;
|
||||
}
|
||||
extern "C" FDELT_TYPE __fdelt_chk(FDELT_TYPE) __attribute__((weak, alias("__fdelt_warn")));
|
||||
|
||||
#if defined(__i386__) || defined(__arm__)
|
||||
|
||||
extern "C" int64_t __udivmoddi4(uint64_t u, uint64_t v, uint64_t* rp);
|
||||
|
||||
extern "C" int64_t __wrap___divmoddi4(int64_t u, int64_t v, int64_t* rp)
|
||||
{
|
||||
int32_t c1 = 0, c2 = 0;
|
||||
int64_t uu = u, vv = v;
|
||||
int64_t w;
|
||||
int64_t r;
|
||||
|
||||
if (uu < 0) {
|
||||
c1 = ~c1, c2 = ~c2, uu = -uu;
|
||||
}
|
||||
if (vv < 0) {
|
||||
c1 = ~c1, vv = -vv;
|
||||
}
|
||||
|
||||
w = __udivmoddi4(uu, vv, (uint64_t*)&r);
|
||||
if (c1)
|
||||
w = -w;
|
||||
if (c2)
|
||||
r = -r;
|
||||
|
||||
*rp = r;
|
||||
return w;
|
||||
}
|
||||
#endif
|
||||
|
||||
extern "C" float log2f_old(float x);
|
||||
#ifdef __i386__
|
||||
__asm(".symver log2f_old,log2f@GLIBC_2.1");
|
||||
#elif defined(__amd64__)
|
||||
__asm(".symver log2f_old,log2f@GLIBC_2.2.5");
|
||||
#elif defined(__arm__)
|
||||
__asm(".symver log2f_old,log2f@GLIBC_2.4");
|
||||
#elif defined(__aarch64__)
|
||||
__asm(".symver log2f_old,log2f@GLIBC_2.17");
|
||||
#endif
|
||||
extern "C" float __wrap_log2f(float x)
|
||||
{
|
||||
return log2f_old(x);
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
static inline uint32_t be32dec(const void *pp)
|
||||
{
|
||||
const uint8_t *p = (uint8_t const *)pp;
|
||||
|
@ -60,6 +61,7 @@ static inline void be32enc(void *pp, uint32_t x)
|
|||
p[0] = (x >> 24) & 0xff;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**
|
||||
* PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen):
|
||||
* Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and
|
||||
|
|
|
@ -27,6 +27,7 @@ void
|
|||
PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt,
|
||||
size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
static inline uint32_t le32dec(const void *pp)
|
||||
{
|
||||
const uint8_t *p = (uint8_t const *)pp;
|
||||
|
@ -43,3 +44,4 @@ static inline void le32enc(void *pp, uint32_t x)
|
|||
p[3] = (x >> 24) & 0xff;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -8,12 +8,20 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#if (defined(__ia64__) || defined(__x86_64__)) && \
|
||||
(defined(__linux__) && !defined(__APPLE__)) && \
|
||||
(defined(USE_AVX2))
|
||||
#include <intel-ipsec-mb.h>
|
||||
#endif
|
||||
|
||||
// Internal implementation code.
|
||||
namespace
|
||||
{
|
||||
/// Internal SHA-1 implementation.
|
||||
namespace sha1
|
||||
{
|
||||
|
||||
#ifndef USE_AVX2
|
||||
/** One round of SHA-1. */
|
||||
void inline Round(uint32_t a, uint32_t& b, uint32_t c, uint32_t d, uint32_t& e, uint32_t f, uint32_t k, uint32_t w)
|
||||
{
|
||||
|
@ -26,6 +34,7 @@ uint32_t inline f2(uint32_t b, uint32_t c, uint32_t d) { return b ^ c ^ d; }
|
|||
uint32_t inline f3(uint32_t b, uint32_t c, uint32_t d) { return (b & c) | (d & (b | c)); }
|
||||
|
||||
uint32_t inline left(uint32_t x) { return (x << 1) | (x >> 31); }
|
||||
#endif
|
||||
|
||||
/** Initialize SHA-1 state. */
|
||||
void inline Initialize(uint32_t* s)
|
||||
|
@ -45,6 +54,12 @@ const uint32_t k4 = 0xCA62C1D6ul;
|
|||
/** Perform a SHA-1 transformation, processing a 64-byte chunk. */
|
||||
void Transform(uint32_t* s, const unsigned char* chunk)
|
||||
{
|
||||
#ifdef USE_AVX2
|
||||
// Perform SHA1 one block (Intel AVX2)
|
||||
sha1_one_block_avx2(chunk, s);
|
||||
#else
|
||||
// Perform SHA one block (legacy)
|
||||
|
||||
uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4];
|
||||
uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
|
||||
|
||||
|
@ -138,6 +153,9 @@ void Transform(uint32_t* s, const unsigned char* chunk)
|
|||
s[2] += c;
|
||||
s[3] += d;
|
||||
s[4] += e;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
} // namespace sha1
|
||||
|
|
|
@ -8,12 +8,19 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#if (defined(__ia64__) || defined(__x86_64__)) && \
|
||||
(defined(__linux__) && !defined(__APPLE__)) && \
|
||||
(defined(USE_AVX2))
|
||||
#include <intel-ipsec-mb.h>
|
||||
#endif
|
||||
|
||||
// Internal implementation code.
|
||||
namespace
|
||||
{
|
||||
/// Internal SHA-256 implementation.
|
||||
namespace sha256
|
||||
{
|
||||
#ifndef USE_AVX2
|
||||
uint32_t inline Ch(uint32_t x, uint32_t y, uint32_t z) { return z ^ (x & (y ^ z)); }
|
||||
uint32_t inline Maj(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (z & (x | y)); }
|
||||
uint32_t inline Sigma0(uint32_t x) { return (x >> 2 | x << 30) ^ (x >> 13 | x << 19) ^ (x >> 22 | x << 10); }
|
||||
|
@ -29,6 +36,7 @@ void inline Round(uint32_t a, uint32_t b, uint32_t c, uint32_t& d, uint32_t e, u
|
|||
d += t1;
|
||||
h = t1 + t2;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Initialize SHA-256 state. */
|
||||
void inline Initialize(uint32_t* s)
|
||||
|
@ -46,6 +54,11 @@ void inline Initialize(uint32_t* s)
|
|||
/** Perform one SHA-256 transformation, processing a 64-byte chunk. */
|
||||
void Transform(uint32_t* s, const unsigned char* chunk)
|
||||
{
|
||||
#ifdef USE_AVX2
|
||||
// Perform SHA256 one block (Intel AVX2)
|
||||
sha256_one_block_avx2(chunk, s);
|
||||
#else
|
||||
// Perform SHA256 one block (legacy)
|
||||
uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7];
|
||||
uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
|
||||
|
||||
|
@ -125,6 +138,7 @@ void Transform(uint32_t* s, const unsigned char* chunk)
|
|||
s[5] += f;
|
||||
s[6] += g;
|
||||
s[7] += h;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace sha256
|
||||
|
|
|
@ -8,12 +8,19 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#if (defined(__ia64__) || defined(__x86_64__)) && \
|
||||
(defined(__linux__) && !defined(__APPLE__)) && \
|
||||
(defined(USE_AVX2))
|
||||
#include <intel-ipsec-mb.h>
|
||||
#endif
|
||||
|
||||
// Internal implementation code.
|
||||
namespace
|
||||
{
|
||||
/// Internal SHA-512 implementation.
|
||||
namespace sha512
|
||||
{
|
||||
#ifndef USE_AVX2
|
||||
uint64_t inline Ch(uint64_t x, uint64_t y, uint64_t z) { return z ^ (x & (y ^ z)); }
|
||||
uint64_t inline Maj(uint64_t x, uint64_t y, uint64_t z) { return (x & y) | (z & (x | y)); }
|
||||
uint64_t inline Sigma0(uint64_t x) { return (x >> 28 | x << 36) ^ (x >> 34 | x << 30) ^ (x >> 39 | x << 25); }
|
||||
|
@ -29,6 +36,7 @@ void inline Round(uint64_t a, uint64_t b, uint64_t c, uint64_t& d, uint64_t e, u
|
|||
d += t1;
|
||||
h = t1 + t2;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Initialize SHA-256 state. */
|
||||
void inline Initialize(uint64_t* s)
|
||||
|
@ -46,6 +54,11 @@ void inline Initialize(uint64_t* s)
|
|||
/** Perform one SHA-512 transformation, processing a 128-byte chunk. */
|
||||
void Transform(uint64_t* s, const unsigned char* chunk)
|
||||
{
|
||||
#ifdef USE_AVX2
|
||||
// Perform SHA512 one block (Intel AVX2)
|
||||
sha512_one_block_avx2(chunk, s);
|
||||
#else
|
||||
// Perform SHA512 one block (legacy)
|
||||
uint64_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7];
|
||||
uint64_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
|
||||
|
||||
|
@ -142,6 +155,7 @@ void Transform(uint64_t* s, const unsigned char* chunk)
|
|||
s[5] += f;
|
||||
s[6] += g;
|
||||
s[7] += h;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace sha512
|
||||
|
@ -205,3 +219,4 @@ CSHA512& CSHA512::Reset()
|
|||
sha512::Initialize(s);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,20 +18,50 @@
|
|||
#endif
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
//mlumin 5/2021: walletfees, all attached to GetDogecoinWalletFeeRate which is just the newly exposed ::minWalletTxFee
|
||||
CAmount GetDogecoinWalletFee(size_t nBytes_)
|
||||
|
||||
CFeeRate GetDogecoinFeeRate(int priority)
|
||||
{
|
||||
//mlumin: super simple fee calc for dogecoin
|
||||
CAmount nFee=GetDogecoinWalletFeeRate().GetFee(nBytes_);
|
||||
switch(priority)
|
||||
{
|
||||
case SUCH_EXPENSIVE:
|
||||
return CFeeRate(COIN / 100 * 521); // 5.21 DOGE, but very carefully avoiding floating point maths
|
||||
case MANY_GENEROUS:
|
||||
return CFeeRate(CWallet::minTxFee.GetFeePerK() * 100);
|
||||
case AMAZE:
|
||||
return CFeeRate(CWallet::minTxFee.GetFeePerK() * 10);
|
||||
case WOW:
|
||||
return CFeeRate(CWallet::minTxFee.GetFeePerK() * 5);
|
||||
case MORE:
|
||||
return CFeeRate(CWallet::minTxFee.GetFeePerK() * 2);
|
||||
case MINIMUM:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return CWallet::minTxFee;
|
||||
}
|
||||
|
||||
//mlumin 5/2021: Establish a wallet rate of n koinu per kb.
|
||||
//mlumin: this is somewhat redundant to the globally exposed ::minWalletTxFee, but honestly I'd like to have both the rate and amount (with size) here
|
||||
CFeeRate GetDogecoinWalletFeeRate()
|
||||
const std::string GetDogecoinPriorityLabel(int priority)
|
||||
{
|
||||
//mlumin 5/2021: currently 1x COIN or 1 dogecoin or 100,000,000 koinu
|
||||
return ::minWalletTxFeeRate;
|
||||
switch(priority)
|
||||
{
|
||||
case SUCH_EXPENSIVE:
|
||||
return _("Such expensive");
|
||||
case MANY_GENEROUS:
|
||||
return _("Many generous");
|
||||
case AMAZE:
|
||||
return _("Amaze");
|
||||
case WOW:
|
||||
return _("Wow");
|
||||
case MORE:
|
||||
return _("More");
|
||||
case MINIMUM:
|
||||
return _("Minimum");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return _("Default");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
CAmount GetDogecoinMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree)
|
||||
|
@ -46,8 +76,8 @@ CAmount GetDogecoinMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool
|
|||
return 0;
|
||||
}
|
||||
|
||||
CAmount nMinFee = ::minRelayTxFeeRate.GetRelayFee(nBytes);
|
||||
nMinFee += GetDogecoinDustFee(tx.vout, ::minRelayTxFeeRate);
|
||||
CAmount nMinFee = ::minRelayTxFeeRate.GetFee(nBytes);
|
||||
nMinFee += GetDogecoinDustFee(tx.vout, nDustLimit);
|
||||
|
||||
if (fAllowFree)
|
||||
{
|
||||
|
@ -64,13 +94,14 @@ CAmount GetDogecoinMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool
|
|||
return nMinFee;
|
||||
}
|
||||
|
||||
CAmount GetDogecoinDustFee(const std::vector<CTxOut> &vout, CFeeRate &baseFeeRate) {
|
||||
CAmount GetDogecoinDustFee(const std::vector<CTxOut> &vout, const CAmount dustLimit) {
|
||||
CAmount nFee = 0;
|
||||
|
||||
// To limit dust spam, add base fee for each output less than a COIN
|
||||
// To limit dust spam, add the dust limit for each output
|
||||
// less than the (soft) dustlimit
|
||||
BOOST_FOREACH(const CTxOut& txout, vout)
|
||||
if (txout.IsDust(::minRelayTxFeeRate))
|
||||
nFee += baseFeeRate.GetFeePerK();
|
||||
if (txout.IsDust(dustLimit))
|
||||
nFee += dustLimit;
|
||||
|
||||
return nFee;
|
||||
}
|
||||
|
|
|
@ -2,13 +2,30 @@
|
|||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifndef BITCOIN_DOGECOIN_FEES_H
|
||||
#define BITCOIN_DOGECOIN_FEES_H
|
||||
|
||||
#include "amount.h"
|
||||
#include "chain.h"
|
||||
#include "chainparams.h"
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
CFeeRate GetDogecoinWalletFeeRate();
|
||||
CAmount GetDogecoinMinWalletFee(unsigned int nBytes_);
|
||||
#endif
|
||||
|
||||
enum FeeRatePreset
|
||||
{
|
||||
MINIMUM,
|
||||
MORE,
|
||||
WOW,
|
||||
AMAZE,
|
||||
MANY_GENEROUS,
|
||||
SUCH_EXPENSIVE
|
||||
};
|
||||
|
||||
/** Estimate fee rate needed to get into the next nBlocks */
|
||||
CFeeRate GetDogecoinFeeRate(int priority);
|
||||
const std::string GetDogecoinPriorityLabel(int priority);
|
||||
#endif // ENABLE_WALLET
|
||||
CAmount GetDogecoinMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree);
|
||||
CAmount GetDogecoinDustFee(const std::vector<CTxOut> &vout, CFeeRate &baseFeeRate);
|
||||
CAmount GetDogecoinDustFee(const std::vector<CTxOut> &vout, const CAmount dustLimit);
|
||||
|
||||
#endif // BITCOIN_DOGECOIN_FEES_H
|
||||
|
|
|
@ -49,8 +49,10 @@ unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char
|
|||
switch (vDataToHash.size() & 3) {
|
||||
case 3:
|
||||
k1 ^= tail[2] << 16;
|
||||
// Falls through
|
||||
case 2:
|
||||
k1 ^= tail[1] << 8;
|
||||
// Falls through
|
||||
case 1:
|
||||
k1 ^= tail[0];
|
||||
k1 *= c1;
|
||||
|
|
33
src/init.cpp
33
src/init.cpp
|
@ -473,9 +473,9 @@ std::string HelpMessage(HelpMessageMode mode)
|
|||
if (showDebug) {
|
||||
strUsage += HelpMessageOpt("-acceptnonstdtxn", strprintf("Relay and mine \"non-standard\" transactions (%sdefault: %u)", "testnet/regtest only; ", !Params(CBaseChainParams::TESTNET).RequireStandard()));
|
||||
strUsage += HelpMessageOpt("-incrementalrelayfee=<amt>", strprintf("Fee rate (in %s/kB) used to define cost of relay, used for mempool limiting and BIP 125 replacement. (default: %s)", CURRENCY_UNIT, FormatMoney(DEFAULT_INCREMENTAL_RELAY_FEE)));
|
||||
strUsage += HelpMessageOpt("-dustrelayfee=<amt>", strprintf("Fee rate (in %s/kB) used to defined dust, the value of an output such that it will cost about 1/3 of its value in fees at this fee rate to spend it. (default: %s)", CURRENCY_UNIT, FormatMoney(DUST_RELAY_TX_FEE)));
|
||||
}
|
||||
strUsage += HelpMessageOpt("-dustlimit=<amt>", strprintf(_("Amount under which a transaction output is considered dust, in %s (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_DUST_LIMIT)));
|
||||
strUsage += HelpMessageOpt("-harddustlimit=<amt>", strprintf(_("Amount under which a transaction output is considered non-standard and will not be accepted or relayed, in %s (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_HARD_DUST_LIMIT)));
|
||||
strUsage += HelpMessageOpt("-bytespersigop", strprintf(_("Equivalent bytes per sigop in transactions for relay and mining (default: %u)"), DEFAULT_BYTES_PER_SIGOP));
|
||||
strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER));
|
||||
strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY));
|
||||
|
@ -503,6 +503,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|||
if (showDebug) {
|
||||
strUsage += HelpMessageOpt("-rpcworkqueue=<n>", strprintf("Set the depth of the work queue to service RPC calls (default: %d)", DEFAULT_HTTP_WORKQUEUE));
|
||||
strUsage += HelpMessageOpt("-rpcservertimeout=<n>", strprintf("Timeout during HTTP requests (default: %d)", DEFAULT_HTTP_SERVER_TIMEOUT));
|
||||
strUsage += HelpMessageOpt("-rpcnamecoinapi", strprintf(_("Use Namecoin-compatible AuxPow API structure, (default: %u)"), DEFAULT_USE_NAMECOIN_API));
|
||||
}
|
||||
|
||||
return strUsage;
|
||||
|
@ -1029,34 +1030,42 @@ bool AppInitParameterInteraction()
|
|||
return InitError(AmountErrMsg("blockmintxfee", GetArg("-blockmintxfee", "")));
|
||||
}
|
||||
|
||||
// Feerate used to define dust. Shouldn't be changed lightly as old
|
||||
// implementations may inadvertently create non-standard transactions
|
||||
if (IsArgSet("-dustrelayfee"))
|
||||
{
|
||||
CAmount n = 0;
|
||||
if (!ParseMoney(GetArg("-dustrelayfee", ""), n) || 0 == n)
|
||||
return InitError(AmountErrMsg("dustrelayfee", GetArg("-dustrelayfee", "")));
|
||||
dustRelayFee = CFeeRate(n);
|
||||
}
|
||||
|
||||
fRequireStandard = !GetBoolArg("-acceptnonstdtxn", !chainparams.RequireStandard());
|
||||
if (chainparams.RequireStandard() && !fRequireStandard)
|
||||
return InitError(strprintf("acceptnonstdtxn is not currently supported for %s chain", chainparams.NetworkIDString()));
|
||||
nBytesPerSigOp = GetArg("-bytespersigop", nBytesPerSigOp);
|
||||
|
||||
if (IsArgSet("-harddustlimit"))
|
||||
{
|
||||
CAmount n = nHardDustLimit;
|
||||
if (!ParseMoney(GetArg("-harddustlimit", ""), n))
|
||||
return InitError(AmountErrMsg("harddustlimit", GetArg("-harddustlimit", "")));
|
||||
nHardDustLimit = n;
|
||||
}
|
||||
|
||||
if (IsArgSet("-dustlimit"))
|
||||
{
|
||||
CAmount n = nDustLimit;
|
||||
if (!ParseMoney(GetArg("-dustlimit", ""), n))
|
||||
return InitError(AmountErrMsg("dustlimit", GetArg("-dustlimit", "")));
|
||||
|
||||
nDustLimit = n;
|
||||
}
|
||||
|
||||
if (nDustLimit < nHardDustLimit)
|
||||
{
|
||||
nDustLimit = nHardDustLimit;
|
||||
LogPrintf("Increasing -dustlimit to %s to match -harddustlimit\n", FormatMoney(nHardDustLimit));
|
||||
}
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
if (!CWallet::ParameterInteraction())
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// Configure usage of the namecoin AuxPow API structure
|
||||
fUseNamecoinApi = GetBoolArg("-rpcnamecoinapi", DEFAULT_USE_NAMECOIN_API);
|
||||
|
||||
fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", DEFAULT_PERMIT_BAREMULTISIG);
|
||||
fAcceptDatacarrier = GetBoolArg("-datacarrier", DEFAULT_ACCEPT_DATACARRIER);
|
||||
nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes);
|
||||
|
@ -1347,7 +1356,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||
if (!mapMultiArgs.count("-bind") && !mapMultiArgs.count("-whitebind")) {
|
||||
struct in_addr inaddr_any;
|
||||
inaddr_any.s_addr = INADDR_ANY;
|
||||
fBound |= Bind(connman, CService(in6addr_any, GetListenPort()), BF_NONE);
|
||||
fBound |= Bind(connman, CService((in6_addr)IN6ADDR_ANY_INIT, GetListenPort()), BF_NONE);
|
||||
fBound |= Bind(connman, CService(inaddr_any, GetListenPort()), !fBound ? BF_REPORT_ERROR : BF_NONE);
|
||||
}
|
||||
if (!fBound)
|
||||
|
|
|
@ -490,7 +490,7 @@ void BlockAssembler::addPackageTxs(int &nPackagesSelected, int &nDescendantsUpda
|
|||
packageSigOpsCost = modit->nSigOpCostWithAncestors;
|
||||
}
|
||||
|
||||
if (packageFees < blockMinFeeRate.GetRelayFee(packageSize)) {
|
||||
if (packageFees < blockMinFeeRate.GetFee(packageSize)) {
|
||||
// Everything else we might consider has a lower fee rate
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -3250,7 +3250,12 @@ bool SendMessages(CNode* pto, CConnman& connman, const std::atomic<bool>& interr
|
|||
if (state.vBlocksInFlight.size() > 0) {
|
||||
QueuedBlock &queuedBlock = state.vBlocksInFlight.front();
|
||||
int nOtherPeersWithValidatedDownloads = nPeersWithValidatedDownloads - (state.nBlocksInFlightValidHeaders > 0);
|
||||
if (nNow > state.nDownloadingSince + consensusParams.nPowTargetSpacing * (BLOCK_DOWNLOAD_TIMEOUT_BASE + BLOCK_DOWNLOAD_TIMEOUT_PER_PEER * nOtherPeersWithValidatedDownloads)) {
|
||||
int64_t nCalculatedDlWindow = std::max(consensusParams.nPowTargetSpacing, MIN_BLOCK_DOWNLOAD_MULTIPLIER) *
|
||||
(BLOCK_DOWNLOAD_TIMEOUT_BASE + BLOCK_DOWNLOAD_TIMEOUT_PER_PEER * nOtherPeersWithValidatedDownloads);
|
||||
if (nNow > state.nDownloadingSince + nCalculatedDlWindow) {
|
||||
LogPrint("net", "Timeout downloading block: window=%d; inFlight=%d; validHeaders=%d; otherDlPeers=%d;",
|
||||
nCalculatedDlWindow, state.vBlocksInFlight.size(),
|
||||
state.nBlocksInFlightValidHeaders, nOtherPeersWithValidatedDownloads);
|
||||
LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", queuedBlock.hash.ToString(), pto->id);
|
||||
pto->fDisconnect = true;
|
||||
return true;
|
||||
|
|
|
@ -21,6 +21,11 @@ static const unsigned int DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN = 100;
|
|||
* Timeout = base + per_header * (expected number of headers) */
|
||||
static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_BASE = 15 * 60 * 1000000; // 15 minutes
|
||||
static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER = 1000; // 1ms/header
|
||||
/** Sets a hard minimum to the multiplier used for block download
|
||||
* timeouts, only triggers on regtest, where nPowTargetTimespan
|
||||
* is set to 1 second.
|
||||
*/
|
||||
static constexpr int64_t MIN_BLOCK_DOWNLOAD_MULTIPLIER = 10; // 10 seconds
|
||||
/** Register with a network node to receive its signals */
|
||||
void RegisterNodeSignals(CNodeSignals& nodeSignals);
|
||||
/** Unregister a network node */
|
||||
|
|
|
@ -105,7 +105,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
|
|||
else if ((whichType == TX_MULTISIG) && (!fIsBareMultisigStd)) {
|
||||
reason = "bare-multisig";
|
||||
return false;
|
||||
} else if (txout.IsDust(dustRelayFee)) {
|
||||
} else if (txout.IsDust(nHardDustLimit)) {
|
||||
reason = "dust";
|
||||
return false;
|
||||
}
|
||||
|
@ -207,9 +207,9 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
|
|||
}
|
||||
|
||||
CFeeRate incrementalRelayFee = CFeeRate(DEFAULT_INCREMENTAL_RELAY_FEE);
|
||||
CFeeRate dustRelayFee = CFeeRate(DUST_RELAY_TX_FEE);
|
||||
unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP;
|
||||
CAmount nDustLimit = DEFAULT_DUST_LIMIT;
|
||||
CAmount nHardDustLimit = DEFAULT_HARD_DUST_LIMIT;
|
||||
|
||||
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost)
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue