Skip to content

Commit 5f96720

Browse files
committed
change for README.md
1 parent e8732a0 commit 5f96720

File tree

18,674 files changed

+3581354
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

18,674 files changed

+3581354
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ https://www.placeh.io
66
What is Placeholders?
77
----------------
88

9-
Placeholders is an experimental digital currency and cloud platform that enables instant payments to anyone, and virtual machine procurement anywhere in the world. Placeholders uses peer-to-peer technology to operate with no central authority: managing transactions and issuing money and virtual machines are carried out collectively by the network.
9+
Placeholders is an experimental digital currency and cloud storage platform that enables instant payments to anyone, and virtual machine procurement anywhere in the world. Placeholders uses peer-to-peer technology to operate with no central authority: managing transactions and issuing money and virtual machines are carried out collectively by the network.
1010

1111
License
1212
-------

contrib/install_db4.sh

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
#!/bin/sh
2+
# Copyright (c) 2017-2019 The Bitcoin Core developers
3+
# Distributed under the MIT software license, see the accompanying
4+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5+
6+
# Install libdb4.8 (Berkeley DB).
7+
8+
export LC_ALL=C
9+
set -e
10+
11+
if [ -z "${1}" ]; then
12+
echo "Usage: $0 <base-dir> [<extra-bdb-configure-flag> ...]"
13+
echo
14+
echo "Must specify a single argument: the directory in which db4 will be built."
15+
echo "This is probably \`pwd\` if you're at the root of the bitcoin repository."
16+
exit 1
17+
fi
18+
19+
expand_path() {
20+
cd "${1}" && pwd -P
21+
}
22+
23+
BDB_PREFIX="$(expand_path ${1})/db4"; shift;
24+
BDB_VERSION='db-4.8.30.NC'
25+
BDB_HASH='12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef'
26+
BDB_URL="https://download.oracle.com/berkeley-db/${BDB_VERSION}.tar.gz"
27+
28+
check_exists() {
29+
command -v "$1" >/dev/null
30+
}
31+
32+
sha256_check() {
33+
# Args: <sha256_hash> <filename>
34+
#
35+
if check_exists sha256sum; then
36+
echo "${1} ${2}" | sha256sum -c
37+
elif check_exists sha256; then
38+
if [ "$(uname)" = "FreeBSD" ]; then
39+
sha256 -c "${1}" "${2}"
40+
else
41+
echo "${1} ${2}" | sha256 -c
42+
fi
43+
else
44+
echo "${1} ${2}" | shasum -a 256 -c
45+
fi
46+
}
47+
48+
http_get() {
49+
# Args: <url> <filename> <sha256_hash>
50+
#
51+
# It's acceptable that we don't require SSL here because we manually verify
52+
# content hashes below.
53+
#
54+
if [ -f "${2}" ]; then
55+
echo "File ${2} already exists; not downloading again"
56+
elif check_exists curl; then
57+
curl --insecure --retry 5 "${1}" -o "${2}"
58+
else
59+
wget --no-check-certificate "${1}" -O "${2}"
60+
fi
61+
62+
sha256_check "${3}" "${2}"
63+
}
64+
65+
mkdir -p "${BDB_PREFIX}"
66+
http_get "${BDB_URL}" "${BDB_VERSION}.tar.gz" "${BDB_HASH}"
67+
tar -xzvf ${BDB_VERSION}.tar.gz -C "$BDB_PREFIX"
68+
cd "${BDB_PREFIX}/${BDB_VERSION}/"
69+
70+
# Apply a patch necessary when building with clang and c++11 (see https://community.oracle.com/thread/3952592)
71+
patch --ignore-whitespace -p1 << 'EOF'
72+
commit 3311d68f11d1697565401eee6efc85c34f022ea7
73+
Author: fanquake <[email protected]>
74+
Date: Mon Aug 17 20:03:56 2020 +0800
75+
Fix C++11 compatibility
76+
diff --git a/dbinc/atomic.h b/dbinc/atomic.h
77+
index 0034dcc..7c11d4a 100644
78+
--- a/dbinc/atomic.h
79+
+++ b/dbinc/atomic.h
80+
@@ -70,7 +70,7 @@ typedef struct {
81+
* These have no memory barriers; the caller must include them when necessary.
82+
*/
83+
#define atomic_read(p) ((p)->value)
84+
-#define atomic_init(p, val) ((p)->value = (val))
85+
+#define atomic_init_db(p, val) ((p)->value = (val))
86+
#ifdef HAVE_ATOMIC_SUPPORT
87+
@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
88+
#define atomic_inc(env, p) __atomic_inc(p)
89+
#define atomic_dec(env, p) __atomic_dec(p)
90+
#define atomic_compare_exchange(env, p, o, n) \
91+
- __atomic_compare_exchange((p), (o), (n))
92+
+ __atomic_compare_exchange_db((p), (o), (n))
93+
static inline int __atomic_inc(db_atomic_t *p)
94+
{
95+
int temp;
96+
@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
97+
* http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
98+
* which configure could be changed to use.
99+
*/
100+
-static inline int __atomic_compare_exchange(
101+
+static inline int __atomic_compare_exchange_db(
102+
db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
103+
{
104+
atomic_value_t was;
105+
@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange(
106+
#define atomic_dec(env, p) (--(p)->value)
107+
#define atomic_compare_exchange(env, p, oldval, newval) \
108+
(DB_ASSERT(env, atomic_read(p) == (oldval)), \
109+
- atomic_init(p, (newval)), 1)
110+
+ atomic_init_db(p, (newval)), 1)
111+
#else
112+
#define atomic_inc(env, p) __atomic_inc(env, p)
113+
#define atomic_dec(env, p) __atomic_dec(env, p)
114+
diff --git a/mp/mp_fget.c b/mp/mp_fget.c
115+
index 5fdee5a..0b75f57 100644
116+
--- a/mp/mp_fget.c
117+
+++ b/mp/mp_fget.c
118+
@@ -617,7 +617,7 @@ alloc: /* Allocate a new buffer header and data space. */
119+
/* Initialize enough so we can call __memp_bhfree. */
120+
alloc_bhp->flags = 0;
121+
- atomic_init(&alloc_bhp->ref, 1);
122+
+ atomic_init_db(&alloc_bhp->ref, 1);
123+
#ifdef DIAGNOSTIC
124+
if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
125+
__db_errx(env,
126+
@@ -911,7 +911,7 @@ alloc: /* Allocate a new buffer header and data space. */
127+
MVCC_MPROTECT(bhp->buf, mfp->stat.st_pagesize,
128+
PROT_READ);
129+
- atomic_init(&alloc_bhp->ref, 1);
130+
+ atomic_init_db(&alloc_bhp->ref, 1);
131+
MUTEX_LOCK(env, alloc_bhp->mtx_buf);
132+
alloc_bhp->priority = bhp->priority;
133+
alloc_bhp->pgno = bhp->pgno;
134+
diff --git a/mp/mp_mvcc.c b/mp/mp_mvcc.c
135+
index 34467d2..f05aa0c 100644
136+
--- a/mp/mp_mvcc.c
137+
+++ b/mp/mp_mvcc.c
138+
@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp)
139+
#else
140+
memcpy(frozen_bhp, bhp, SSZA(BH, buf));
141+
#endif
142+
- atomic_init(&frozen_bhp->ref, 0);
143+
+ atomic_init_db(&frozen_bhp->ref, 0);
144+
if (mutex != MUTEX_INVALID)
145+
frozen_bhp->mtx_buf = mutex;
146+
else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
147+
@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp)
148+
#endif
149+
alloc_bhp->mtx_buf = mutex;
150+
MUTEX_LOCK(env, alloc_bhp->mtx_buf);
151+
- atomic_init(&alloc_bhp->ref, 1);
152+
+ atomic_init_db(&alloc_bhp->ref, 1);
153+
F_CLR(alloc_bhp, BH_FROZEN);
154+
}
155+
diff --git a/mp/mp_region.c b/mp/mp_region.c
156+
index e6cece9..ddbe906 100644
157+
--- a/mp/mp_region.c
158+
+++ b/mp/mp_region.c
159+
@@ -224,7 +224,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
160+
MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
161+
return (ret);
162+
SH_TAILQ_INIT(&htab[i].hash_bucket);
163+
- atomic_init(&htab[i].hash_page_dirty, 0);
164+
+ atomic_init_db(&htab[i].hash_page_dirty, 0);
165+
}
166+
/*
167+
@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
168+
hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID :
169+
mtx_base + i;
170+
SH_TAILQ_INIT(&hp->hash_bucket);
171+
- atomic_init(&hp->hash_page_dirty, 0);
172+
+ atomic_init_db(&hp->hash_page_dirty, 0);
173+
#ifdef HAVE_STATISTICS
174+
hp->hash_io_wait = 0;
175+
hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
176+
diff --git a/mutex/mut_method.c b/mutex/mut_method.c
177+
index 2588763..5c6d516 100644
178+
--- a/mutex/mut_method.c
179+
+++ b/mutex/mut_method.c
180+
@@ -426,7 +426,7 @@ atomic_compare_exchange(env, v, oldval, newval)
181+
MUTEX_LOCK(env, mtx);
182+
ret = atomic_read(v) == oldval;
183+
if (ret)
184+
- atomic_init(v, newval);
185+
+ atomic_init_db(v, newval);
186+
MUTEX_UNLOCK(env, mtx);
187+
return (ret);
188+
diff --git a/mutex/mut_tas.c b/mutex/mut_tas.c
189+
index f3922e0..e40fcdf 100644
190+
--- a/mutex/mut_tas.c
191+
+++ b/mutex/mut_tas.c
192+
@@ -46,7 +46,7 @@ __db_tas_mutex_init(env, mutex, flags)
193+
#ifdef HAVE_SHARED_LATCHES
194+
if (F_ISSET(mutexp, DB_MUTEX_SHARED))
195+
- atomic_init(&mutexp->sharecount, 0);
196+
+ atomic_init_db(&mutexp->sharecount, 0);
197+
else
198+
#endif
199+
if (MUTEX_INIT(&mutexp->tas)) {
200+
@@ -486,7 +486,7 @@ __db_tas_mutex_unlock(env, mutex)
201+
F_CLR(mutexp, DB_MUTEX_LOCKED);
202+
/* Flush flag update before zeroing count */
203+
MEMBAR_EXIT();
204+
- atomic_init(&mutexp->sharecount, 0);
205+
+ atomic_init_db(&mutexp->sharecount, 0);
206+
} else {
207+
DB_ASSERT(env, sharecount > 0);
208+
MEMBAR_EXIT();
209+
EOF
210+
211+
# The packaged config.guess and config.sub are ancient (2009) and can cause build issues.
212+
# Replace them with modern versions.
213+
# See https://github.com/bitcoin/bitcoin/issues/16064
214+
CONFIG_GUESS_URL='https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=55eaf3e779455c4e5cc9f82efb5278be8f8f900b'
215+
CONFIG_GUESS_HASH='2d1ff7bca773d2ec3c6217118129220fa72d8adda67c7d2bf79994b3129232c1'
216+
CONFIG_SUB_URL='https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=55eaf3e779455c4e5cc9f82efb5278be8f8f900b'
217+
CONFIG_SUB_HASH='3a4befde9bcdf0fdb2763fc1bfa74e8696df94e1ad7aac8042d133c8ff1d2e32'
218+
219+
rm -f "dist/config.guess"
220+
rm -f "dist/config.sub"
221+
222+
http_get "${CONFIG_GUESS_URL}" dist/config.guess "${CONFIG_GUESS_HASH}"
223+
http_get "${CONFIG_SUB_URL}" dist/config.sub "${CONFIG_SUB_HASH}"
224+
225+
cd build_unix/
226+
227+
"${BDB_PREFIX}/${BDB_VERSION}/dist/configure" \
228+
--enable-cxx --disable-shared --disable-replication --with-pic --prefix="${BDB_PREFIX}" \
229+
"${@}"
230+
231+
make install
232+
233+
echo
234+
echo "db4 build complete."
235+
echo
236+
# shellcheck disable=SC2016
237+
echo 'When compiling bitcoind, run `./configure` in the following way:'
238+
echo
239+
echo " export BDB_PREFIX='${BDB_PREFIX}'"
240+
# shellcheck disable=SC2016
241+
echo ' ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" ...'

db-4.8.30.NC.tar.gz.1

21.8 MB
Binary file not shown.

db-4.8.30.NC/LICENSE

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/*-
2+
* $Id$
3+
*/
4+
5+
The following is the license that applies to this copy of the Berkeley DB
6+
software. For a license to use the Berkeley DB software under conditions
7+
other than those described here, or to purchase support for this software,
8+
please contact Oracle at [email protected].
9+
10+
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
11+
/*
12+
* Copyright (c) 1990-2009 Oracle. All rights reserved.
13+
*
14+
* Redistribution and use in source and binary forms, with or without
15+
* modification, are permitted provided that the following conditions
16+
* are met:
17+
* 1. Redistributions of source code must retain the above copyright
18+
* notice, this list of conditions and the following disclaimer.
19+
* 2. Redistributions in binary form must reproduce the above copyright
20+
* notice, this list of conditions and the following disclaimer in the
21+
* documentation and/or other materials provided with the distribution.
22+
* 3. Redistributions in any form must be accompanied by information on
23+
* how to obtain complete source code for the DB software and any
24+
* accompanying software that uses the DB software. The source code
25+
* must either be included in the distribution or be available for no
26+
* more than the cost of distribution plus a nominal fee, and must be
27+
* freely redistributable under reasonable conditions. For an
28+
* executable file, complete source code means the source code for all
29+
* modules it contains. It does not include source code for modules or
30+
* files that typically accompany the major components of the operating
31+
* system on which the executable file runs.
32+
*
33+
* THIS SOFTWARE IS PROVIDED BY ORACLE ``AS IS'' AND ANY EXPRESS OR
34+
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35+
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
36+
* NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL ORACLE BE LIABLE
37+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
38+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
39+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
40+
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
41+
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
42+
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
43+
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44+
*/
45+
/*
46+
* Copyright (c) 1990, 1993, 1994, 1995
47+
* The Regents of the University of California. All rights reserved.
48+
*
49+
* Redistribution and use in source and binary forms, with or without
50+
* modification, are permitted provided that the following conditions
51+
* are met:
52+
* 1. Redistributions of source code must retain the above copyright
53+
* notice, this list of conditions and the following disclaimer.
54+
* 2. Redistributions in binary form must reproduce the above copyright
55+
* notice, this list of conditions and the following disclaimer in the
56+
* documentation and/or other materials provided with the distribution.
57+
* 3. Neither the name of the University nor the names of its contributors
58+
* may be used to endorse or promote products derived from this software
59+
* without specific prior written permission.
60+
*
61+
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
62+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
63+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
64+
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
65+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
66+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
67+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
68+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
69+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
70+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
71+
* SUCH DAMAGE.
72+
*/
73+
/*
74+
* Copyright (c) 1995, 1996
75+
* The President and Fellows of Harvard University. All rights reserved.
76+
*
77+
* Redistribution and use in source and binary forms, with or without
78+
* modification, are permitted provided that the following conditions
79+
* are met:
80+
* 1. Redistributions of source code must retain the above copyright
81+
* notice, this list of conditions and the following disclaimer.
82+
* 2. Redistributions in binary form must reproduce the above copyright
83+
* notice, this list of conditions and the following disclaimer in the
84+
* documentation and/or other materials provided with the distribution.
85+
* 3. Neither the name of the University nor the names of its contributors
86+
* may be used to endorse or promote products derived from this software
87+
* without specific prior written permission.
88+
*
89+
* THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND
90+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
91+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
92+
* ARE DISCLAIMED. IN NO EVENT SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE
93+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
94+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
95+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
96+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
97+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
98+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
99+
* SUCH DAMAGE.
100+
*/
101+
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
102+
/***
103+
* ASM: a very small and fast Java bytecode manipulation framework
104+
* Copyright (c) 2000-2005 INRIA, France Telecom
105+
* All rights reserved.
106+
*
107+
* Redistribution and use in source and binary forms, with or without
108+
* modification, are permitted provided that the following conditions
109+
* are met:
110+
* 1. Redistributions of source code must retain the above copyright
111+
* notice, this list of conditions and the following disclaimer.
112+
* 2. Redistributions in binary form must reproduce the above copyright
113+
* notice, this list of conditions and the following disclaimer in the
114+
* documentation and/or other materials provided with the distribution.
115+
* 3. Neither the name of the copyright holders nor the names of its
116+
* contributors may be used to endorse or promote products derived from
117+
* this software without specific prior written permission.
118+
*
119+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
120+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
121+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
122+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
123+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
124+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
125+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
126+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
127+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
128+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
129+
* THE POSSIBILITY OF SUCH DAMAGE.
130+
*/

db-4.8.30.NC/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Berkeley DB 4.8.30: (April 9, 2010)
2+
3+
This is version 4.8.30 of Berkeley DB from Oracle. To view release and
4+
installation documentation, load the distribution file docs/index.html
5+
into your web browser.

0 commit comments

Comments
 (0)