GithubHelp home page GithubHelp logo

elementsproject / elements Goto Github PK

View Code? Open in Web Editor NEW
1.0K 1.0K 367.0 146.1 MB

Open Source implementation of advanced blockchain features extending the Bitcoin protocol

License: MIT License

Shell 1.16% QMake 0.01% Python 24.85% Makefile 0.79% C++ 57.04% C 13.72% HTML 0.12% Objective-C++ 0.03% M4 1.34% Assembly 0.15% Sage 0.33% Scheme 0.13% CMake 0.30% Dockerfile 0.02% Cap'n Proto 0.01% Java 0.01%

elements's People

Contributors

achow101 avatar ajtowns avatar apoelstra avatar delta1 avatar dongcarl avatar fanquake avatar gavinandresen avatar gmaxwell avatar hebasto avatar instagibbs avatar jamesdorfman avatar jnewbery avatar jonasschnelli avatar jonatack avatar laanwj avatar luke-jr avatar meshcollider avatar morcos avatar non-github-bitcoin avatar practicalswift avatar promag avatar ryanofsky avatar sdaftuar avatar sipa avatar sjors avatar stevenroose avatar thebluematt avatar thestack avatar theuni avatar vasild avatar

Stargazers

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

Watchers

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

elements's Issues

Issues with ./contrib/sidechain-manipulation.py after creating a New Sidechain

Iโ€™am using this link: https://github.com/ElementsProject/elements/blob/alpha/fedpeg-README.md
after creating my sidechain i got an error with this command: ./elements/contrib/sidechain-manipulation.py generate-one-of-one-multisig sidechain-wallet

Error:
Traceback (most recent call last):
File "./contrib/sidechain-manipulation.py", line 134, in
address = sidechain.getnewaddress()
File "/home/axa-lab/sidechains/elements/contrib/../../python-bitcoinrpc/bitcoinrpc/authproxy.py", line 139, in call
response = self._get_response()
File "/home/axa-lab/sidechains/elements/contrib/../../python-bitcoinrpc/bitcoinrpc/authproxy.py", line 179, in _get_response
http_response = self.__conn.getresponse()
File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 453, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine: ''

Send To Sidechain fails

I've followed all the steps in alpha-README.md, but fail to see the expected result in Step 6 of To Move Money into Elements Alpha.

$ ./contrib/sidechain-manipulation.py send-to-sidechain 2MuCWkMxPNLoV2qxCKXUSnmeZpz8VMtEzjz 1

Sending 1 to 2N82VPmsiZRC3xbDX9fxgiTKgkiY8BFjKZt...
(nonce: 4483e3dccfef99bc6e350a9665fc1ee5)

Traceback (most recent call last):
  File "./contrib/sidechain-manipulation.py", line 121, in <module>
    txid = bitcoin.sendtoaddress(send_address, Decimal(sys.argv[3]))
  File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 107, in __call__
    'id': self.__id_count})
  File "/usr/lib/python2.7/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 201, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 264, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python2.7/json/encoder.py", line 178, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: Decimal('1') is not JSON serializable

[0.13.1] "high-hash"

Failure of a block to have a correct scriptsig results in a "high-hash" error message when submitted via RPC. Replace with something more correct.

Signature hashing of transactions incorrect/surprising for multiple inputs.

CTransactionSignatureSerializer::SerializeInput() is would logically serialize the amount of the output it is spending. Instead, it serializes the amount that the currently-being-verified input is spending. See interpreter.cpp:1831:

 // Serialize the output value 
 ::Serialize(s, nValue, nType, nVersion); 

That nValue is the value of the currently-being verified output. Indeed, dumping what is actually hashed for a 2-input transaction gives:

# Version number
01000000
# Number of inputs
02
# Input 1.  TXID:
cc6dced8113ff403c8bd5709a4b2b457b96a16b9458e5aac99569a0f271f92e900000000
# This is the correct amount (200,000,000 satoshi):
00000000000000000000000000000000000000000000000000000000000bebc200
00
00
# Since we're checking sig for input 0, script is serialized
84
a914631ac2e12267394320198d5f8760cff167cfda0d876321027fd6b164179afe28e414325e07b1a96976cea337474f57e80dad571f1d18982a672103de31b72983bde45effa48f4f26de132e45d0ed23efba630f16008d570c9e43a168527c2102aeef54810e0c01695692f66db3cce1c08c49103656647a088454c85a2f237d9852ae
# nSequence
ffffffff
# Input 2. TXID:
fadd0818c489f9e75b3c85f875567aa1ff7b9a620aea1f18bc174b97b239b7c400000000
# This is the wrong amount, copied from above.  Should be 100,000,000 satoshi!
00000000000000000000000000000000000000000000000000000000000bebc200
00
00
# No script, since it's not the input being signed.
00
ffffffff

...

Implement cost function

Cost functions estimate resource requirements during block validation. A new consensus rule would be introduced such that blocks above a certain cost limit are invalid. The cost function (and cost limit) should be a chain specific parameter to allow accounting for chain specific features. In Bitcoin, for example, the node costs are mostly driven by signature hashing.

This branch is an example of a resource tracker for bitcoin.

alphad maxes out the CPU while waiting for Tx confirmations?

Hello. I'm running Ubuntu 15.04 and am attempting to follow the alpha README. In particular, I'm now trying to move money into alpha ("send-to-sidechain"). I sent a coin, and now alphad is maxing out my CPU. Anybody have any idea why this might be happening? Is it trying to sync with bitcoind somehow? Is there some way I can confirm what's going on? There are a couple of wrinkles that I encountered initially, which might have some bearing. (Doubtful, but hey, I might as well list everything.)

  • I was running Armory in testnet mode when I sent the money. The Python script apparently used an Armory wallet, which was interesting, as I had to apply a small hack to the script to unlock the wallet first. (I'd submit a PR to fix this but I'm not sure offhand what the recommended method is to check for a locked wallet before proceeding. I don't see any valid RPC calls.) (PR #44 has been submitted.)
  • The Tx had no fees attached. Is this intentional? Is this a byproduct of Armory being used by accident? (Nevermind. Looks like Armory somehow didn't record the fee, possibly because the P2SH input address uses a compressed key. Either that or the block explorer I'm using is lying. :) )

Hmmm. Wait a minute. Now that confirmations are rolling in, alphad has calmed down. Perhaps it gets spun up while waiting for a confirmation? I'll try again and see if it happens again.

Thanks.

blindtrust option name is confusing, rename and invert meaning

blindtrust is confusing. It should be renamed and inverted to be clearer.

blindtrust=1 is the default where it trusts incoming pegs without verifyiing against bitcoind.
blindtrust=0 uses callrpc.cpp to query bitcoind when it needs to validate the incoming peg.

Rename the option and invert to default to 0.
validateincomingpeg ?
validatepeg ?
verifyincomingpeg ?
verifypeg ?

Opinions?

windows build failure

I have all the dependencies for bitcoind installed and successfully built it in windows(can build bitcoin-qt in windows successfully), but when trying to build alpha it fails with the following error:
CXXLD alpha-tx.exe
c:/deps/openssl-1.0.1l\libssl.a(ssl_err2.o):ssl_err2.c:(.text+0x4): undefined reference to ERR_load_crypto_strings' c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x1e6): undefined reference toCOMP_CTX_free'
c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x202): undefined reference to COMP_CTX_free' c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0xa2a): undefined reference toBIO_s_socket'
c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0xb25): undefined reference to BIO_s_socket' c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0xc95): undefined reference toBIO_s_socket'
c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x1460): undefined reference to COMP_CTX_free' c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x147c): undefined reference toCOMP_CTX_free'
c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x1580): undefined reference to COMP_CTX_free' c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x159c): undefined reference toCOMP_CTX_free'
c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x309a): undefined reference to COMP_CTX_free' c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x30b6): more undefined references toCOMP_CTX_free' follow
c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x5ca1): undefined reference to BIO_f_buffer' c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x5f9c): undefined reference toX509_STORE_set_default_paths'
c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x5fac): undefined reference to X509_STORE_load_locations' c:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: c:/deps/openssl-1.0.1l\libssl.a(ssl_lib.o): bad reloc address 0x80 in section.data'
c:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
make[2]: *** [alpha-tx.exe] Error 1
make[2]: Leaving directory /c/elements-alpha/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/c/elements-alpha/src'
make: *** [all-recursive] Error 1

Integrate pegging.py in qa/rpc-tests/feature_fedpeg.py

Currently pegging.py is run indepdently instead of using rpc-tets.py like the rest.

Currently:

python3 ./qa/rpc-tests/pegging.py /home/myhost/bitcoin-0.15.1/bin/

We should move to something like:

python3 ./qa/pull-tester/rpc-tests.py feature_fedpeg --parent-binary=/home/myhost/bitcoin-0.15.1/bin/

while still maintaining the existing test passing by using its same binary for the parent chain:

python3 ./qa/pull-tester/rpc-tests.py feature_fedpeg 

secp256k1_rangeproof_genrand insufficient validation of signed argument

The signed argument len of the secp256k1_rangeproof_genrand function must not be greater than 10 but its sign is not verified.. A negative len value will result in an unbounded copy operation to the rngseed buffer on the stack. Exploitable code paths were not identified.

See elements/src/secp256k1/src/modules/rangeproof/rangeproof_impl.h line 149 9d91a9f

secp256k1_rangeproof_genrand(secp256k1_scalar_t *sec, secp256k1_scalar_t *s, 
unsigned char *message, int *rsizes, int rings, const unsigned char *nonce,
const unsigned char *commit, const unsigned char *proof, int len) {
    unsigned char tmp[32];
    unsigned char rngseed[32 + 33 + 10];
    [...]
    VERIFY_CHECK(len <= 10);
    memcpy(rngseed, nonce, 32);
    memcpy(rngseed + 32, commit, 33);
    memcpy(rngseed + 65, proof, len);

OS/X configure fails: configure: error: libdb_cxx headers missing

checking build system type... x86_64-apple-darwin13.4.0
checking host system type... x86_64-apple-darwin13.4.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for g++... g++
checking whether we are using the GNU Objective C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to print strings... printf
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin13.4.0 file names to x86_64-apple-darwin13.4.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin13.4.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin13.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin13.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking for ar... /usr/bin/ar
checking for ranlib... /usr/bin/ranlib
checking for strip... /usr/bin/strip
checking for gcov... /usr/bin/gcov
checking for lcov... no
checking for java... /usr/bin/java
checking for genhtml... no
checking for git... /usr/bin/git
checking for ccache... no
checking for xgettext... no
checking for hexdump... /usr/bin/hexdump
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for port... no
checking for brew... brew
checking whether the linker accepts -Wl,-headerpad_max_install_names... yes
checking whether byte ordering is bigendian... no
checking if compiler needs -Werror to reject unknown flags... yes
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking for PTHREAD_PRIO_INHERIT... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking whether the linker accepts -Wl,--large-address-aware... no
checking for __attribute__((visibility))... no
checking for __attribute__((dllexport))... no
checking for __attribute__((dllimport))... no
checking whether C++ compiler accepts -Wstack-protector... yes
checking whether C++ compiler accepts -fstack-protector-all... yes
checking whether C++ preprocessor accepts -D_FORTIFY_SOURCE=2... yes
checking whether C++ preprocessor accepts -U_FORTIFY_SOURCE... yes
checking whether the linker accepts -Wl,--dynamicbase... no
checking whether the linker accepts -Wl,--nxcompat... no
checking whether the linker accepts -Wl,-z,relro... no
checking whether the linker accepts -Wl,-z,now... no
checking whether C++ compiler accepts -fPIE... yes
checking whether the linker accepts -pie... yes
checking whether the linker accepts -Wl,-dead_strip... yes
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/prctl.h usability... no
checking sys/prctl.h presence... no
checking for sys/prctl.h... no
checking for library containing getaddrinfo_a... no
checking for library containing inet_pton... none required
checking whether strnlen is declared... yes
checking whether le32toh is declared... no
checking whether le64toh is declared... no
checking whether htole32 is declared... no
checking whether htole64 is declared... no
checking whether be32toh is declared... no
checking whether be64toh is declared... no
checking whether htobe32 is declared... no
checking whether htobe64 is declared... no
checking for MSG_NOSIGNAL... no
checking for library containing clock_gettime... no
checking for visibility attribute... yes
checking whether C++ compiler accepts -fvisibility=hidden... yes
checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing

Issue on claim-on-sidechain in sidechain-manipulation.py

Hi,

I was trying to testing the sidechain, but there was a problem when I called the function claim-on sidechain, here is the details:

Redeeming from utxo 4a466058a8754698a95ff29bc8bece97e1e131dfda29f76d30c958903fd85eb0:1 (value 20994180.93597788, refund 20994180.43597788) [libsecp256k1] illegal argument: *outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33 : 65) Traceback (most recent call last): File "./contrib/sidechain-manipulation.py", line 237, in <module> txid = sidechain.sendrawtransaction(res_tx) File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 139, in __call__ response = self._get_response() File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 180, in _get_response http_response = self.__conn.getresponse() File "/usr/lib/python2.7/httplib.py", line 1045, in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 409, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 373, in _read_status raise BadStatusLine(line) httplib.BadStatusLine: ''

Additionally, I just checked the log of alpha, and it says:

2016-02-15 13:47:48 opencon thread start 2016-02-15 13:47:48 addcon thread start 2016-02-15 13:47:48 net thread start 2016-02-15 13:47:48 dnsseed thread start 2016-02-15 13:47:49 receive version message: /ElementsAlpha:0.10.2/: version 70002, blocks=128650, us=170.252.244.1:37198, peer=1 2016-02-15 13:47:49 Added time data, samples 2, offset +0 (+0 minutes) 2016-02-15 13:47:50 receive version message: /ElementsAlpha:0.10.2/: version 70002, blocks=128650, us=170.252.244.1:56955, peer=2 2016-02-15 13:47:50 Added time data, samples 3, offset +0 (+0 minutes) 2016-02-15 13:47:51 Cannot connect to i6gawycbsddduuvp.onion:4242: unsupported network 2016-02-15 13:47:53 Cannot connect to 4azvkpo55qaskhjl.onion:4242: unsupported network 2016-02-15 13:47:56 Cannot connect to 4zhkir2ofl7orfom.onion:4242: unsupported network 2016-02-15 13:47:57 connect() to [2604:a880:1:20::269:c001]:4242 failed: Network is unreachable (101) 2016-02-15 13:47:58 connect() to [2600:3c00::f03c:91ff:fe98:986]:4242 failed: Network is unreachable (101) 2016-02-15 13:47:59 Cannot connect to jojqfliinm4prlo4.onion:4242: unsupported network 2016-02-15 13:47:59 P2P peers available. Skipped DNS seeding. 2016-02-15 13:47:59 dnsseed thread exit 2016-02-15 13:48:00 Cannot connect to bbgw7gpjpko5yvuh.onion:4242: unsupported network 2016-02-15 13:48:02 connect() to 45.56.122.234:4242 failed after select(): Connection refused (111) 2016-02-15 13:48:02 connect() to 50.0.37.37:4242 failed after select(): No route to host (113)

I don't know if the connection issue may affect the claiming process?
I have tried also different version of libsecp256k1 and contracthashtool, mention in #59, but it didn't help either.
Do you have some suggestions on this?

Thank you,

Out of date dependencies prevent building on Arch

When building the alpha branch, I am getting the following error:

net.cpp: In function โ€˜void ThreadMapPort()โ€™:
net.cpp:1000:68: error: invalid conversion from โ€˜int*โ€™ to โ€˜unsigned charโ€™ [-fpermissive]
     devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
                                                                    ^~~~~~
net.cpp:1000:74: error: too few arguments to function โ€˜UPNPDev* upnpDiscover(int, const char*, const char*, int, int, unsigned char, int*)โ€™
     devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);

I have miniupnpc 2.0 on my Arch system.
Sorry in advance if this is not the right place to post this.

signrawtransaction can incorrectly reserializes existing pubscript

Sorry that I don't have a minimal example:

$ result/bin/alpha-cli -rpcuser=zieHie3u -rpcpassword=ahv0aSh5 -testnet -rpcconnect=127.0.0.1 -rpcconnectport=18332 -tracksidechain=all -txindex  -blindtrust=true signrawtransaction 010000000222383bc5b0ed8f715c6d077bdf86c9f507c2a47bdbce85ee7b1a2675db40362001000000fd500340841195c8c8c9d6505811d275131cc430c921cf26448b440ff5b2b4cb2da07d7f4b1abda49b96419e3bea3cc99cfac54715261682021daba121309bb816ea8903510400000000149490d2792a618c68bcb9340238d427a4938397082000000000000000000000000000000000000000000000000000000000000186a004ffffffff4d4f0182549d517e7c8201249d7e01007e53798201209d7e050000fd4f017e7c82024f019d7e7c82549d7e0201007e7c7e020000aa7e0317a9147e01147b8201149d7e4ca57c82549d517e7b8201249d7e01007e53798201209d7e040000ba147e787e54798202a5009d7e7b82549d7e0201007e7b7e020000aa7e0317a9147e74568763770114537a8201149d7e7b7ea97e210363b5d43ad4be3101b73308a969613844eb16f0f764a077d507425bbb9f7231fc7b670480b6ce1db2757c7e777c51767e767e767e767e767e767e6876537a01877e547a82549d7e04830000007ea85379c201837e7cac7ea97e01877e7c82549d7e04830000007ea87c76635188210363b5d43ad4be3101b73308a969613844eb16f0f764a077d507425bbb9f7231fc67008821021b64ddcea77f1eaecc3d9c87416df2e8afbce17c4db4fe03633e37be700c8dcd686fc2777c01837e7cac2422383bc5b0ed8f715c6d077bdf86c9f507c2a47bdbce85ee7b1a2675db4036200100000004010000004d4f0182549d517e7c8201249d7e01007e53798201209d7e050000fd4f017e7c82024f019d7e7c82549d7e0201007e7c7e020000aa7e0317a9147e01147b8201149d7e4ca57c82549d517e7b8201249d7e01007e53798201209d7e040000ba147e787e54798202a5009d7e7b82549d7e0201007e7b7e020000aa7e0317a9147e74568763770114537a8201149d7e7b7ea97e210363b5d43ad4be3101b73308a969613844eb16f0f764a077d507425bbb9f7231fc7b670480b6ce1db2757c7e777c51767e767e767e767e767e767e6876537a01877e547a82549d7e04830000007ea85379c201837e7cac7ea97e01877e7c82549d7e04830000007ea87c76635188210363b5d43ad4be3101b73308a969613844eb16f0f764a077d507425bbb9f7231fc67008821021b64ddcea77f1eaecc3d9c87416df2e8afbce17c4db4fe03633e37be700c8dcd686fc2777c01837e7cacffffffff22383bc5b0ed8f715c6d077bdf86c9f507c2a47bdbce85ee7b1a2675db4036200000000000ffffffffab0d000000000000020000000000000000000000000000000000000000000000000000000000000186a0000017a914f0d6838ee8e4ec53be9f4bddbd97722dabbb562f8702c0a5323c01c1bd4560799f6971bf05dc4a2d7416b05080cbcf20ba19585e10a0fd040a401f444dc7959c64c45156fbf648fb43704b6d6a1ba143da00dedbc55e8695a49d930f999ede34f6d13ae7371dbc76756407a76faa7a86aa357b307f6a5842ce2dacca119e153a18e8b043f4023cd9b1396486ec67ec0f0fd3b1e3bb8877349c10ea1d30d6a0fe1d4e7f0bd1c0ad946e97195e4f648432da2ee1b460041d325d0639984d81892bb2c277f4890e8faed13f69b2254041a17ce0df580cb779987cbdcb0abce1c7d972935ad6f0d19a7c0969808d7a327a8c6680ceb2ce1aa9d88e7f74c6a97d615e4adb0c506a1e5cf19b789ca154fc4d6b20b179c0aed440a91ad9ea6cb1ac1d9576071a02500887d9952003c13fb2c1c1e9192a7368bcaf1038ccf9ebacee86efc1c429b6d09df601173858879ff006ebda57580173f78a2b07a4028b37dab27b701197bf05311e1b7205f06e709366193f2a654f03bf4e05810628fa64c312e40bea33e955842cb1885a36624865568ffd15a06263ed77103ac5f10c2944eb5210cdee6c8c3fcfa91a079faa412b26c19a7d3c68edf9cc4715a5140e1f16f1867101e5148c4d05a0319300d1b5520434c3fee423f4da569b8c3c295c80fbe88a8ac67781920841a270e12e42f34df268f81656a93b872bd1e43f9dcaacc2fb265164a5233e4d7a3543ade5c6c311fa3dd73e4777b78df7792acfd4e42def6802402304448682d6e652cc8b817a579f9da5c37913d4f815b8d2f23121b345fb52da6e5eb154d57242495d7661fb40df5c651edf1ec874f787c8a4393115b39f60ce8538fb18d25208f539570173349eb6519fc8d079e977124edf08222f109382b8e459f99c63a65c36c687c8172dfbdd7a19380387234190b9dff2c2b08c89dbd34d1a085d54f16c38818429c606202f7b467d39e9f34439e5502e3842c1cd6d255147f3086854c4ac22aef3055c22ce532c47212116c1c0f400e1cf8e25bcd578e2cc4a2bdbbe50f21ce0fcc8073cf1563687ad4519c4392f3364b0a8be579785fea66cfea5322b8726acc04b9c9840d0b3c48cf6f515acaf9575f941b3b6e97e57cb177fd688b296a0099fe41b07ee9e965c9c66d6be08fed5f88277ef8be9dcf54c7292c4ac6f3aac50e862ae61302e629bdc9f72876ea3c6fc60a700635a53afe9dcd8514b2b4b7a941af9c5e51acc0b933735dbdda3fc09c5aaaa338cece85be00119332357bae27356d8b484f79571ad0e217145166a5dc5e892a056d5bd9f82a545a9e9333cdb2ddba82c14d2bec21595e967814e0c85e864455ecf529e4672617217724e99c28c5ffc0e6e5153c0b87fb87c4601f8a43de84279c9224e9f499e8e13d3b32fdc94dc1f092920ad07ccc5d6887743267f08d8f76e14b70d24b74055b02265e1c2c459836e9a55a256af7f8d2a649c877d013b0eb907e7764d7564ba2c6b2ca224cf7aef095928833e25f930603a1055a4a5a9cc6be3041224d7ee61e2e12198bd352440969a4cba9fc7e4635a85fab6d67857b9f9288ad33ddfae0e7ef4111d646369425922bbb743058c7474b63ae9f211d01246c55486e6a58a8ba2d4096df1e6af8610fd76ea51745c8eeac73d3b62e683826f3512c569fedf0197b80006959d84c6d555853b7887b8451bd151acdb493117b2fcfb5a6a9c4a528155c047fc1b0d8cf06e6a38c2421e8c66daece283d4c0ffae8d1bb4fb1bffe16ce79248c858997a84d7b21ff7855e6f9714d10cb37361f8473b541b69fdb53c0d572e198cf144f246803caf9b855232ef639f478b0978af2de2359c78fe2ac863be666dbe73380267b2a1ab8f8755e4fce3e4469822e74fb710c4ca38c573fd735799da23a93db3c93fc4058cc37bca95c21f59dc33090cf83a8eba5fd87e57484f138c3936bfae8e532b591ffa7ecf90d5987a1384d89bd43ec674e2eb5c32b0f1f95aff80a89fc52b47f7d2a06852258908059a2632945b4a44f05a2bd41d46cb5128fe89fd8c569fd94202005756eb10b33c80994873d8546f7277b0cffe7d3f8166353e6ba25189da5feedb46b65a65ce6dc1800529f417f7b5dbe033ded5bf8fa7d6b902b4dc0f179aaf256f9f7a6d1031c4032b00320480f53cb940c105b52f315400070e80a76e40955bfbecd81f7acea8d23d4c7f9ab8bcf0ffdb4424c80f7172a599be960218b4e44137a6647b8554413bfdfa682b4c68bdb1013dbc43a2aa3f7a5de14f38534ff98b6bd91e4c34aa39d2d586b0b5db4bbbe0526a1da6ec3f58861d0f10cb498ddfd7fa14642031b6a386ba724e3e9343e778abb06cb7fe35a08672a030f2c83f1c393f89402bbd4188bba8dcd9e3c270e401c0c5c79eff9c7a18cf43811072d9a65538e4bac3d131de03af425de947d7dea9f1b151a0b1a81f7c91abcc7614b487965892f05bb1598047d29153a95744bd615510872d8d322ae9af5b88a3ef5ea8b58a9332838cd15e6552b9241b0ef48b4a4b782fd3e9ef99c34000be4b540601e8aeb63dfcd0d0680bb83224bc1b5a2bcec1b10e3f310236a10c4a74a62243ef0a11e2d30b0bc3758d507a55ccc831e407d0326a6559be328936ee86b3ceae23f266d2944ffa2d9d333cdbe34dfaeb6a29031054f2d3d8a5acf19e641ac7aa7fb82077d49f7606aba8bc48424a8c8de8f9c25353fcba6c27a1be25dff175a5b7d550efa4cad0654d9fabc26f29b9ea627d207d4242cd9bfedca87b3987d9550103e55866359089a2637e1f11339e2f6342dcf5ddefa9be8ae20dbf6f43dbd8b2ec03edde46133856295b3e8e21df6a7fd8eeb12927f213d53c024b0e8d874ab1ec81cbe9a8b050404b308f922a0370a0ec1d7ff2c2c6761de14b6b3b3ac0cb38896189d212175ad05d70dd7d85cbe76a29ec232ba2bc57f8f77fc6509d2855f13a41fddedc5840a07ee66011cad56a0d73491d37ba272584bb799b6b06fb89fa043813f7339c092ec7a382f1e63ccef52b0c44635fb1feeb7c67135909b181686a9c17485cf0bd83506c3755cd55fdbb1a4b07f17c8deaeb281beaebdd5cbd9d105b357023b44dd77a590eeb477aa055648a6d6cb5d12f29948493276d0dcc52453a4bb27b04c47bb4c94fafeeda98c40f1b35aff3584b10811c23637ec8214dc78b51f7e3c22c8863aa09e077ea570a621bc1117b026ba44c4ec7aea849e3e8ac54e878e29540ea98bc3ca68ffa82cb25fae13836623db25be1aa4f7d03c4d33bb773bf3fac207ee7572795cf47c0f6c73907b1eb7292c32a3509dab43f6ffb71b379a1d4ea54f1d3d7eedd03475f4222a8527a3d63242c767bacb5123d8262f6e7e42b1a10408b84d6e44fd1222c2715721a29c10df58d3419a8dc52c40528ac61e04428caa110f941fd3fca671803dfa3203f51f80ed3934569335faa04ea443a2edd4829fb2b0fc7ce79d11d4a3bab6caf02eeafff89d6ab695df0b7daf9fd7db34a87ed848c4e52cd035a08dc4986b24f15b3dcca0ce937e1a5312667588a5ef837545e793814c03f1f0566755e3e234e5b68d66617d71721b22cadde19286f4a0375924d54f7b367185fa11492814eff5c445b5323e82f862dda9e9001f2527bc41a2c0043b62486176c3c9e39e160cf3dc51fea3f9cb8357c4d79a6bbd5ebf7094ad935caa05871210353c4abe3150847e2554fa6f4cd735b73cf74bbead171a535b4d492adfc9e25501976a91495e34c3c2d6cb24c9a8d98f9d336f5f38395ad2488ac00000000
{
    "hex" : "010000000222383bc5b0ed8f715c6d077bdf86c9f507c2a47bdbce85ee7b1a2675db40362001000000fd510340841195c8c8c9d6505811d275131cc430c921cf26448b440ff5b2b4cb2da07d7f4b1abda49b96419e3bea3cc99cfac54715261682021daba121309bb816ea890301010400000000149490d2792a618c68bcb9340238d427a4938397082000000000000000000000000000000000000000000000000000000000000186a004ffffffff4d4f0182549d517e7c8201249d7e01007e53798201209d7e050000fd4f017e7c82024f019d7e7c82549d7e0201007e7c7e020000aa7e0317a9147e01147b8201149d7e4ca57c82549d517e7b8201249d7e01007e53798201209d7e040000ba147e787e54798202a5009d7e7b82549d7e0201007e7b7e020000aa7e0317a9147e74568763770114537a8201149d7e7b7ea97e210363b5d43ad4be3101b73308a969613844eb16f0f764a077d507425bbb9f7231fc7b670480b6ce1db2757c7e777c51767e767e767e767e767e767e6876537a01877e547a82549d7e04830000007ea85379c201837e7cac7ea97e01877e7c82549d7e04830000007ea87c76635188210363b5d43ad4be3101b73308a969613844eb16f0f764a077d507425bbb9f7231fc67008821021b64ddcea77f1eaecc3d9c87416df2e8afbce17c4db4fe03633e37be700c8dcd686fc2777c01837e7cac2422383bc5b0ed8f715c6d077bdf86c9f507c2a47bdbce85ee7b1a2675db4036200100000004010000004d4f0182549d517e7c8201249d7e01007e53798201209d7e050000fd4f017e7c82024f019d7e7c82549d7e0201007e7c7e020000aa7e0317a9147e01147b8201149d7e4ca57c82549d517e7b8201249d7e01007e53798201209d7e040000ba147e787e54798202a5009d7e7b82549d7e0201007e7b7e020000aa7e0317a9147e74568763770114537a8201149d7e7b7ea97e210363b5d43ad4be3101b73308a969613844eb16f0f764a077d507425bbb9f7231fc7b670480b6ce1db2757c7e777c51767e767e767e767e767e767e6876537a01877e547a82549d7e04830000007ea85379c201837e7cac7ea97e01877e7c82549d7e04830000007ea87c76635188210363b5d43ad4be3101b73308a969613844eb16f0f764a077d507425bbb9f7231fc67008821021b64ddcea77f1eaecc3d9c87416df2e8afbce17c4db4fe03633e37be700c8dcd686fc2777c01837e7cacffffffff22383bc5b0ed8f715c6d077bdf86c9f507c2a47bdbce85ee7b1a2675db403620000000006441ab56dee5f1f713c3bccbf0fd619bc3e0f4fabf92a548b04ce3f280da2cce4f5ab4420f9d67166961f1d29f80c66c31732e1e123ae62996c3c5137d54a1994dc5012103e3a347e0c5895cee59e2206c08f52f19a172f444d1a2000efa4388f22ba14676ffffffffab0d000000000000020000000000000000000000000000000000000000000000000000000000000186a0000017a914f0d6838ee8e4ec53be9f4bddbd97722dabbb562f8702c0a5323c01c1bd4560799f6971bf05dc4a2d7416b05080cbcf20ba19585e10a0fd040a401f444dc7959c64c45156fbf648fb43704b6d6a1ba143da00dedbc55e8695a49d930f999ede34f6d13ae7371dbc76756407a76faa7a86aa357b307f6a5842ce2dacca119e153a18e8b043f4023cd9b1396486ec67ec0f0fd3b1e3bb8877349c10ea1d30d6a0fe1d4e7f0bd1c0ad946e97195e4f648432da2ee1b460041d325d0639984d81892bb2c277f4890e8faed13f69b2254041a17ce0df580cb779987cbdcb0abce1c7d972935ad6f0d19a7c0969808d7a327a8c6680ceb2ce1aa9d88e7f74c6a97d615e4adb0c506a1e5cf19b789ca154fc4d6b20b179c0aed440a91ad9ea6cb1ac1d9576071a02500887d9952003c13fb2c1c1e9192a7368bcaf1038ccf9ebacee86efc1c429b6d09df601173858879ff006ebda57580173f78a2b07a4028b37dab27b701197bf05311e1b7205f06e709366193f2a654f03bf4e05810628fa64c312e40bea33e955842cb1885a36624865568ffd15a06263ed77103ac5f10c2944eb5210cdee6c8c3fcfa91a079faa412b26c19a7d3c68edf9cc4715a5140e1f16f1867101e5148c4d05a0319300d1b5520434c3fee423f4da569b8c3c295c80fbe88a8ac67781920841a270e12e42f34df268f81656a93b872bd1e43f9dcaacc2fb265164a5233e4d7a3543ade5c6c311fa3dd73e4777b78df7792acfd4e42def6802402304448682d6e652cc8b817a579f9da5c37913d4f815b8d2f23121b345fb52da6e5eb154d57242495d7661fb40df5c651edf1ec874f787c8a4393115b39f60ce8538fb18d25208f539570173349eb6519fc8d079e977124edf08222f109382b8e459f99c63a65c36c687c8172dfbdd7a19380387234190b9dff2c2b08c89dbd34d1a085d54f16c38818429c606202f7b467d39e9f34439e5502e3842c1cd6d255147f3086854c4ac22aef3055c22ce532c47212116c1c0f400e1cf8e25bcd578e2cc4a2bdbbe50f21ce0fcc8073cf1563687ad4519c4392f3364b0a8be579785fea66cfea5322b8726acc04b9c9840d0b3c48cf6f515acaf9575f941b3b6e97e57cb177fd688b296a0099fe41b07ee9e965c9c66d6be08fed5f88277ef8be9dcf54c7292c4ac6f3aac50e862ae61302e629bdc9f72876ea3c6fc60a700635a53afe9dcd8514b2b4b7a941af9c5e51acc0b933735dbdda3fc09c5aaaa338cece85be00119332357bae27356d8b484f79571ad0e217145166a5dc5e892a056d5bd9f82a545a9e9333cdb2ddba82c14d2bec21595e967814e0c85e864455ecf529e4672617217724e99c28c5ffc0e6e5153c0b87fb87c4601f8a43de84279c9224e9f499e8e13d3b32fdc94dc1f092920ad07ccc5d6887743267f08d8f76e14b70d24b74055b02265e1c2c459836e9a55a256af7f8d2a649c877d013b0eb907e7764d7564ba2c6b2ca224cf7aef095928833e25f930603a1055a4a5a9cc6be3041224d7ee61e2e12198bd352440969a4cba9fc7e4635a85fab6d67857b9f9288ad33ddfae0e7ef4111d646369425922bbb743058c7474b63ae9f211d01246c55486e6a58a8ba2d4096df1e6af8610fd76ea51745c8eeac73d3b62e683826f3512c569fedf0197b80006959d84c6d555853b7887b8451bd151acdb493117b2fcfb5a6a9c4a528155c047fc1b0d8cf06e6a38c2421e8c66daece283d4c0ffae8d1bb4fb1bffe16ce79248c858997a84d7b21ff7855e6f9714d10cb37361f8473b541b69fdb53c0d572e198cf144f246803caf9b855232ef639f478b0978af2de2359c78fe2ac863be666dbe73380267b2a1ab8f8755e4fce3e4469822e74fb710c4ca38c573fd735799da23a93db3c93fc4058cc37bca95c21f59dc33090cf83a8eba5fd87e57484f138c3936bfae8e532b591ffa7ecf90d5987a1384d89bd43ec674e2eb5c32b0f1f95aff80a89fc52b47f7d2a06852258908059a2632945b4a44f05a2bd41d46cb5128fe89fd8c569fd94202005756eb10b33c80994873d8546f7277b0cffe7d3f8166353e6ba25189da5feedb46b65a65ce6dc1800529f417f7b5dbe033ded5bf8fa7d6b902b4dc0f179aaf256f9f7a6d1031c4032b00320480f53cb940c105b52f315400070e80a76e40955bfbecd81f7acea8d23d4c7f9ab8bcf0ffdb4424c80f7172a599be960218b4e44137a6647b8554413bfdfa682b4c68bdb1013dbc43a2aa3f7a5de14f38534ff98b6bd91e4c34aa39d2d586b0b5db4bbbe0526a1da6ec3f58861d0f10cb498ddfd7fa14642031b6a386ba724e3e9343e778abb06cb7fe35a08672a030f2c83f1c393f89402bbd4188bba8dcd9e3c270e401c0c5c79eff9c7a18cf43811072d9a65538e4bac3d131de03af425de947d7dea9f1b151a0b1a81f7c91abcc7614b487965892f05bb1598047d29153a95744bd615510872d8d322ae9af5b88a3ef5ea8b58a9332838cd15e6552b9241b0ef48b4a4b782fd3e9ef99c34000be4b540601e8aeb63dfcd0d0680bb83224bc1b5a2bcec1b10e3f310236a10c4a74a62243ef0a11e2d30b0bc3758d507a55ccc831e407d0326a6559be328936ee86b3ceae23f266d2944ffa2d9d333cdbe34dfaeb6a29031054f2d3d8a5acf19e641ac7aa7fb82077d49f7606aba8bc48424a8c8de8f9c25353fcba6c27a1be25dff175a5b7d550efa4cad0654d9fabc26f29b9ea627d207d4242cd9bfedca87b3987d9550103e55866359089a2637e1f11339e2f6342dcf5ddefa9be8ae20dbf6f43dbd8b2ec03edde46133856295b3e8e21df6a7fd8eeb12927f213d53c024b0e8d874ab1ec81cbe9a8b050404b308f922a0370a0ec1d7ff2c2c6761de14b6b3b3ac0cb38896189d212175ad05d70dd7d85cbe76a29ec232ba2bc57f8f77fc6509d2855f13a41fddedc5840a07ee66011cad56a0d73491d37ba272584bb799b6b06fb89fa043813f7339c092ec7a382f1e63ccef52b0c44635fb1feeb7c67135909b181686a9c17485cf0bd83506c3755cd55fdbb1a4b07f17c8deaeb281beaebdd5cbd9d105b357023b44dd77a590eeb477aa055648a6d6cb5d12f29948493276d0dcc52453a4bb27b04c47bb4c94fafeeda98c40f1b35aff3584b10811c23637ec8214dc78b51f7e3c22c8863aa09e077ea570a621bc1117b026ba44c4ec7aea849e3e8ac54e878e29540ea98bc3ca68ffa82cb25fae13836623db25be1aa4f7d03c4d33bb773bf3fac207ee7572795cf47c0f6c73907b1eb7292c32a3509dab43f6ffb71b379a1d4ea54f1d3d7eedd03475f4222a8527a3d63242c767bacb5123d8262f6e7e42b1a10408b84d6e44fd1222c2715721a29c10df58d3419a8dc52c40528ac61e04428caa110f941fd3fca671803dfa3203f51f80ed3934569335faa04ea443a2edd4829fb2b0fc7ce79d11d4a3bab6caf02eeafff89d6ab695df0b7daf9fd7db34a87ed848c4e52cd035a08dc4986b24f15b3dcca0ce937e1a5312667588a5ef837545e793814c03f1f0566755e3e234e5b68d66617d71721b22cadde19286f4a0375924d54f7b367185fa11492814eff5c445b5323e82f862dda9e9001f2527bc41a2c0043b62486176c3c9e39e160cf3dc51fea3f9cb8357c4d79a6bbd5ebf7094ad935caa05871210353c4abe3150847e2554fa6f4cd735b73cf74bbead171a535b4d492adfc9e25501976a91495e34c3c2d6cb24c9a8d98f9d336f5f38395ad2488ac00000000",
    "complete" : false
}

When you look carefully, you can see that the ...ea89035104... has been incorrectly transformed into ...ea8903010104... in the output

Peer finding cpu waste

Inherited upstream bug from Bitcoin core that is more relevant on the alpha network than Bitcoin main net:

Where there are very few peers in peers.dat, peer selection wastes a bunch of CPU due to the process of probabilistic selecting the next peer to use being pretty simplistic.

decodescript still says OP_NOP3, not OP_CSV

alpha-cli -datadir=/home/rusty/.alpha -regtest -testnet=0 decodescript 748c63a9148ffaeae14cbffc20dd8d5bd948a61e9acf9af4cf882102ba9e8a913c675861d8b9a8ca3020a1b615f391500e668cd799a2b3cf59c5789267043c65cd1db2752102949f823b49795c9a86d8d60493cafe9b7542b4a4b2f14b3d04214ef6eaf1e05068ac
{
"asm" : "OP_DEPTH OP_1SUB OP_IF OP_HASH160 8ffaeae14cbffc20dd8d5bd948a61e9acf9af4cf OP_EQUALVERIFY 02ba9e8a913c675861d8b9a8ca3020a1b615f391500e668cd799a2b3cf59c57892 OP_ELSE 500000060 OP_NOP3 OP_DROP 02949f823b49795c9a86d8d60493cafe9b7542b4a4b2f14b3d04214ef6eaf1e050 OP_ENDIF OP_CHECKSIG",
"type" : "nonstandard",
"p2sh" : "2N1SwkKGpJBViUgi147sT2cjyS5pMPEb8so"
}

[0.13.1] Support multiple fedpegscript/signblockscript depending on blockheight

If for whatever reason the federation keys need to be changed but we don't want to start a new chain, the user should be able to set command-line flags that do so.

One idea is in addition to -fedpegscript=<hex> allow -fedpegscript=<height>:<hex>. Legacy parameter sets the hex value from genesis block onwards until the next highest height-hex pair.

Bad invocation of 'git rev-list' during alphad build

When building alphad, in the middle of the build process I get the following output:

... (some output, and then:)

  CXX      compat/libbitcoin_util_a-glibc_sanity.o
  CXX      compat/libbitcoin_util_a-glibcxx_sanity.o
  CXX      libbitcoin_util_a-chainparamsbase.o
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
  limiting output:
    --max-count=<n>
    --max-age=<epoch>
    --min-age=<epoch>
    --sparse
    --no-merges
    --min-parents=<n>
    --no-min-parents
    --max-parents=<n>
    --no-max-parents
    --remove-empty
    --all
    --branches
    --tags
    --remotes
    --stdin
    --quiet
  ordering output:
    --topo-order
    --date-order
    --reverse
  formatting output:
    --parents
    --children
    --objects | --objects-edge
    --unpacked
    --header | --pretty
    --abbrev=<n> | --no-abbrev
    --abbrev-commit
    --left-right
  special purpose:
    --bisect
    --bisect-vars
    --bisect-all
  CXX      libbitcoin_util_a-clientversion.o
  CXX      libbitcoin_util_a-random.o
  CXX      libbitcoin_util_a-rpcprotocol.o

... (and then some more output)

@gmaxwell is also seeing this, and thought it was due to his old version of Git. But I'm on git 2.3.6 on OS X, and he's on git 2.0.something on Linux, and we're both seeing the same thing. The offending call to git rev-list is inside share/genbuild.sh. I may take a closer look.

Document Assets API

Let's begin the process of documenting the full API for asset issuance.

[edits by @bteitelb]
Assets API needs to be accessible to newbies, for use in trainings, and for use by integration partners.

@jtimon could you start this? Please use @ChristopherA for QA (i.e. Does it make sense to him?), as well as copyediting and technical writing support.

[0.13.1] fixup reindexing with new signblockscript behavior

Right now if you enter a new signblockscript(or anything else we commit to in the genesis block) this changes the genesis block and then complains that the genesis block is wrong.

If the user reindexes, it allows it to start and starts from block 0. In regtest mode it also fails to call SyncWithWallet on these newly generated outputs, requiring the user to nuke wallet.dat.

We should basically not allow reindex to do this and instead require the user to take direct action.

OS X build failure

I have all the dependencies for bitcoind installed and successfully built it, but when trying to build elements it fails with the following error:

Undefined symbols for architecture x86_64:
  "IsConfirmedBitcoinBlock(uint256 const&, int)", referenced from:
      TransactionSignatureChecker::IsConfirmedBitcoinBlock(uint256 const&, bool) const in libalphaconsensus_la-interpreter.o
  "CHMAC_SHA256::CHMAC_SHA256(unsigned char const*, unsigned long)", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "_SSL_library_init", referenced from:
      boost::asio::ssl::detail::openssl_init_base::do_init::do_init() in libalphaconsensus_la-interpreter.o
  "CHMAC_SHA256::Finalize(unsigned char*)", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "CheckBitcoinProof(CBlockHeader const&)", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "GetScriptForDestination(boost::variant<CNoDestination, CKeyID, CScriptID, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&)", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "GetBoolArg(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "CPartialMerkleTree::CPartialMerkleTree()", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "CheckProof(CBlockHeader const&)", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "boost::system::system_category()", referenced from:
      __GLOBAL__sub_I_script.cpp in libalphaconsensus_la-script.o
      boost::asio::ssl::detail::openssl_init_base::do_init::do_init() in libalphaconsensus_la-interpreter.o
      ___cxx_global_var_init62 in libalphaconsensus_la-interpreter.o
      ___cxx_global_var_init65 in libalphaconsensus_la-interpreter.o
      __GLOBAL__sub_I_interpreter.cpp in libalphaconsensus_la-interpreter.o
  "CBlockHeader::GetHash() const", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "_SSL_load_error_strings", referenced from:
      boost::asio::ssl::detail::openssl_init_base::do_init::do_init() in libalphaconsensus_la-interpreter.o
  "CPartialMerkleTree::ExtractMatches(std::__1::vector<uint256, std::__1::allocator<uint256> >&)", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "CScriptID::CScriptID(CScript const&)", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libalphaconsensus_la-interpreter.o
  "boost::system::generic_category()", referenced from:
      __GLOBAL__sub_I_script.cpp in libalphaconsensus_la-script.o
      __GLOBAL__sub_I_interpreter.cpp in libalphaconsensus_la-interpreter.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libalphaconsensus.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

RPC signblock should fail if the block can not be signed

Currently if the daemon has no key to sign the block calling the "signblock" RPC returns an empty "" signature. Instead we want to throw an RPC error in that case. GenerateProof returns a bool, but this indicates that a full proof has been created and can be successfully verified, and not that a partial proof (signature) has been created.

Create new address format for confidential transactions

The present address format is not intended to be a standard. In particular there are probably significant improvements that can be made with respect to e.g. error correction and deterministic address size (base32/64). Also, the version byte selected was pretty much chosen at random. We should make sure it's one of the ones that has a consistent starting prefix.

Method not found on RPC call sidechain-manipulation.py

Hi everyone, I'm following the alpha-readme.md for getting started with sidechains. I am on step 6. I'm trying to run this command

chris@chris-870Z5E-880Z5E-680Z5E:~/dev/elements$ ./contrib/sidechain-manipulation.py generate-one-of-one-multisig sidechain-wallet
Traceback (most recent call last):
File "./contrib/sidechain-manipulation.py", line 95, in
address = sidechain.getnewaddress()
File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 138, in call
raise JSONRPCException(response['error'])
JSONRPCException: -32601: Method not found

Got the following error from an RPC Call:
{u'message': u'Method not found', u'code': -32601}

but I am getting an error instead of a response like the guide indicates. I'm not familiar with what this error is. I'm pretty sure I have followed all of the steps in the guide. Is anyone familiar with this?

Functionaries can be made to stop processing withdraws by an attacker

If you move money into Alpha twice via the same address/nonce, then claim only the first, the functionaries may end up trying to spend the second (as it is in their watch-only wallet) but will refuse to sign the unknown input, stalling their progress.
The fix is rather easy - add such outputs to utxos when they are detected during signing.

cannot convert โ€˜unsigned char*โ€™ to โ€˜secp256k1_pubkey_t*โ€™

I was following along with alpha-README.md and made it to make CXXFLAGS="-I../secp256k1/install/usr/local/include -L../secp256k1/install/usr/local/lib -static" of the To move money into Elements Alpha section. Here's the output:

$ make CXXFLAGS="-I../secp256k1/install/usr/local/include -L../secp256k1/install/usr/local/lib -static"
g++ -O2 -Wall -I../secp256k1/install/usr/local/include -L../secp256k1/install/usr/local/lib -static -I. contracthashtool.c stolen.cpp uint256.cpp crypto/ripemd160.cpp crypto/sha2.cpp -o contracthashtool -lsecp256k1
contracthashtool.c: In function โ€˜int main(int, char**)โ€™:
contracthashtool.c:246:75: error: cannot convert โ€˜unsigned char*โ€™ to โ€˜secp256k1_pubkey_t*โ€™ for argument โ€˜2โ€™ to โ€˜int secp256k1_ec_pubkey_tweak_add(const secp256k1_context_t*, secp256k1_pubkey_t*, const unsigned char*)โ€™
     if (secp256k1_ec_pubkey_tweak_add(secp256k1_ctx, keys_work[i], 33, res) == 0) {
                                                                           ^
contracthashtool.c:290:67: error: cannot convert โ€˜unsigned char*โ€™ to โ€˜secp256k1_pubkey_t*โ€™ for argument โ€˜2โ€™ to โ€˜int secp256k1_ec_pubkey_create(const secp256k1_context_t*, secp256k1_pubkey_t*, const unsigned char*)โ€™
   if (secp256k1_ec_pubkey_create(secp256k1_ctx, pub, &len, priv, 1) != 1 || len != 33)
                                                                   ^
make: *** [all] Error 1

If there's anything that I can do to help, please let me know.

mandatory-script-verify-flag-failed (Withdraw proof validation failed - output does not match expected

I'm trying to work my through the alpha-README.md file. I'm on this step:

chris@chris-870Z5E-880Z5E-680Z5E:~/dev/elements$ ./contrib/sidechain-manipulation.py claim-on-sidechain 2NFRtY9CUwWCjBS6xbhJUkNYgs5HKzLoyyd 7d3e344f3b7ba903f608e29e9046c981 89cad7aff265ea0883a629f8106aa9bfe70646336bb9e7543a7a4640476bd3bd

and I'm getting the following error:

Redeeming from utxo eb37c77d94e284b52b58eeec52b43591bf0cebe61da1c29ecaf0347b12d5bcab:0 (value 0.01, refund 0.0095)
Traceback (most recent call last):
  File "./contrib/sidechain-manipulation.py", line 237, in <module>
    txid = sidechain.sendrawtransaction(res_tx)
  File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 138, in __call__
    raise JSONRPCException(response['error'])
JSONRPCException: -26: 16: mandatory-script-verify-flag-failed (Withdraw proof validation failed - output does not match expected)

Got the following error from an RPC Call:
{u'message': u'16: mandatory-script-verify-flag-failed (Withdraw proof validation failed - output does not match expected)', u'code': -26}

My first guess was that my bitcoind instance wasn't synced up to the network, but at the time of this post I ran

chris@chris-870Z5E-880Z5E-680Z5E:~/dev/elements$ bitcoin-cli -testnet getblockcount
606934

So I'm not really sure what could be wrong.

send-to-sidechain Aborted (core dumped)

Hi everyone, I'm trying to follow the alpha-README.md. I'm on step 6 trying to execute this line

chris@chris-870Z5E-880Z5E-680Z5E:~/dev/elements$ ./contrib/sidechain-manipulation.py send-to-sidechain 2N9N5MUVcieJysWJqEUa3CXdPnGQARexHXA 1

and I am getting the following error:

chris@chris-870Z5E-880Z5E-680Z5E:~/dev/elements$ ./contrib/sidechain-manipulation.py send-to-sidechain 2N9N5MUVcieJysWJqEUa3CXdPnGQARexHXA 1

[libsecp256k1] illegal argument: *outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33 : 65)

Aborted (core dumped)

<open file '/home/chris/dev/elements/contrib/../../contracthashtool/contracthashtool -t -g -r 55210269992fb441ae56968e5b77d46a3e53b69f136444ae65a94041fc937bdb28d93321021df31471281d4478df85bfce08a10aab82601dca949a79950f8ddf7002bd915a2102174c82021492c2c6dfcbfa4187d10d38bed06afb7fdcd72c880179fddd641ea121033f96e43d72c33327b6a4631ccaa6ea07f0b106c88b9dc71c9000bb6044d5e88a210313d8748790f2a86fb524579b46ce3c68fedd58d2a738716249a9f7d5458a15c221030b632eeb079eb83648886122a04c7bf6d98ab5dfb94cf353ee3e9382a4c2fab02102fb54a7fcaa73c307cfd70f3fa66a2e4247a71858ca731396343ad30c7c4009ce57ae -d 2N9N5MUVcieJysWJqEUa3CXdPnGQARexHXA', mode 'r' at 0x7ff3cd570ed0>

['Using testnet!', '']
Traceback (most recent call last):
File "./contrib/sidechain-manipulation.py", line 115, in
full_contract = cht_read.split("\n")[1 + is_testnet][26:]
IndexError: list index out of range

I've supplemented sidechains-manipulations.py to add a few extra print statements to help debug. It now looks like this

104         elif sys.argv[1] == "send-to-sidechain":
105                 if len(sys.argv) != 4:
106                         help()
107 
108                 cht = os.popen("%s %s -g -r %s -d %s" % (contracthashtool_path, testnet_arg, redeem_script, sys.argv[2]))
109                 cht_read = cht.read()
110                 print("=" * 50)
111                 print(cht)
112                 nonce = cht_read.split("\n")[0 + is_testnet][7:]
113                 print("=" * 50)
114                 print(cht_read.split("\n"))
115                 full_contract = cht_read.split("\n")[1 + is_testnet][26:]
116                 send_address = cht_read.split("\n")[3 + is_testnet][40:]

Can anyone explain what I am doing wrong?

recipe for target 'bitcoind-bitcoind.o' failed

With regards to #40, I upgraded to 15.04 using the command do-release-upgrade -d and it continued to output the same error, so I've chosen to use a new vagrant box instead. I'm using the official ubuntu vivid64 vagrant box.

Here are all the deb packages which have been installed:

autoconf build-essential libtool libdb++-dev libdb-dev libboost-all-dev autoconf autotools-dev libssl-dev pkg-config bitcoind libdb4.8-dev libdb4.8++-dev

Here's what I experienced:


vagrant@vagrant-ubuntu-vivid-64:~/local/elements$ git branch
  alpha
* mainchain


vagrant@vagrant-ubuntu-vivid-64:~/local/elements$ make clean && ./autogen.sh && ./configure && make
Making clean in src
make[1]: Entering directory '/home/vagrant/local/elements/src'
make[2]: Entering directory '/home/vagrant/local/elements/src'
 rm -f bitcoind bitcoin-cli bitcoin-tx test/test_bitcoin
test -z "leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno test/*.gcda test/*.gcno test/data/script_valid.json.h test/data/base58_keys_valid.json.h test/data/base58_encode_decode.json.h test/data/base58_keys_invalid.json.h test/data/script_invalid.json.h test/data/tx_invalid.json.h test/data/tx_valid.json.h test/data/sighash.json.h test/data/alertTests.raw.h  " || rm -f leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno test/*.gcda test/*.gcno test/data/script_valid.json.h test/data/base58_keys_valid.json.h test/data/base58_encode_decode.json.h test/data/base58_keys_invalid.json.h test/data/script_invalid.json.h test/data/tx_invalid.json.h test/data/tx_valid.json.h test/data/sighash.json.h test/data/alertTests.raw.h
test -z "libbitcoinconsensus.la" || rm -f libbitcoinconsensus.la
rm -f ./so_locations
rm -rf .libs _libs
rm -rf compat/.libs compat/_libs
rm -rf crypto/.libs crypto/_libs
rm -rf primitives/.libs primitives/_libs
rm -rf qt/.libs qt/_libs
rm -rf qt/test/.libs qt/test/_libs
rm -rf script/.libs script/_libs
rm -rf test/.libs test/_libs
make -C leveldb clean
make[3]: Entering directory '/home/vagrant/local/elements/src/leveldb'
rm -f db_bench leveldbutil arena_test autocompact_test bloom_test c_test cache_test coding_test corruption_test crc32c_test db_test dbformat_test env_test filename_test filter_block_test hash_test issue178_test issue200_test log_test memenv_test skiplist_test table_test version_edit_test version_set_test write_batch_test db_bench_sqlite3 db_bench_tree_db libleveldb.a libleveldb.so libleveldb.so.1 libleveldb.so.1.18 libmemenv.a */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk
rm -rf ios-x86/* ios-arm/*
make[3]: Leaving directory '/home/vagrant/local/elements/src/leveldb'
make -C secp256k1 clean
make[3]: Entering directory '/home/vagrant/local/elements/src/secp256k1'
test -z "libsecp256k1.la" || rm -f libsecp256k1.la
rm -f ./so_locations
rm -rf .libs _libs
rm -rf src/.libs src/_libs
 rm -f tests
rm -f *.o
rm -f src/*.o
rm -f src/*.lo
test -z "tests.log" || rm -f tests.log
test -z "tests.trs" || rm -f tests.trs
test -z "test-suite.log" || rm -f test-suite.log
rm -f *.lo
make[3]: Leaving directory '/home/vagrant/local/elements/src/secp256k1'
rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
rm -f config.h
rm -f *.o
rm -f compat/*.o
rm -f compat/*.lo
rm -f crypto/*.o
rm -f crypto/*.lo
rm -f primitives/*.o
rm -f primitives/*.lo
rm -f qt/*.o
rm -f qt/res/*.o
rm -f qt/test/*.o
rm -f script/*.o
rm -f script/*.lo
rm -f support/*.o
rm -f test/*.o
rm -f univalue/*.o
rm -f wallet/*.o
rm -f wallet/test/*.o
test -z "test/test_bitcoin.log" || rm -f test/test_bitcoin.log
test -z "test/test_bitcoin.trs" || rm -f test/test_bitcoin.trs
test -z "test-suite.log" || rm -f test-suite.log
rm -f *.lo
make[2]: Leaving directory '/home/vagrant/local/elements/src'
make[1]: Leaving directory '/home/vagrant/local/elements/src'
make[1]: Entering directory '/home/vagrant/local/elements'
test -z "Bitcoin-Qt.dmg bitcoin-0.10.99-win-setup" || rm -f Bitcoin-Qt.dmg bitcoin-0.10.99-win-setup
rm -rf .libs _libs
rm -rf test_bitcoin.coverage/ total.coverage/ Bitcoin-Qt.app
rm -f *.lo
make[1]: Leaving directory '/home/vagrant/local/elements'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `build-aux/m4'.
libtoolize: copying file `build-aux/m4/libtool.m4'
libtoolize: copying file `build-aux/m4/ltoptions.m4'
libtoolize: copying file `build-aux/m4/ltsugar.m4'
libtoolize: copying file `build-aux/m4/ltversion.m4'
libtoolize: copying file `build-aux/m4/lt~obsolete.m4'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `build-aux/m4'.
libtoolize: copying file `build-aux/m4/libtool.m4'
libtoolize: copying file `build-aux/m4/ltoptions.m4'
libtoolize: copying file `build-aux/m4/ltsugar.m4'
libtoolize: copying file `build-aux/m4/ltversion.m4'
libtoolize: copying file `build-aux/m4/lt~obsolete.m4'
Makefile.am:5: warning: user variable 'GZIP_ENV' defined here ...
/usr/share/automake-1.14/am/distdir.am: ... overrides Automake variable 'GZIP_ENV' defined here
Makefile.am:54: warning: user target 'distcleancheck' defined here ...
/usr/share/automake-1.14/am/distdir.am: ... overrides Automake target 'distcleancheck' defined here
src/Makefile.am:407: warning: user target '.mm.o' defined here ...
/usr/share/automake-1.14/am/depend2.am: ... overrides Automake target '.mm.o' defined here
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for g++... g++
checking whether we are using the GNU Objective C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... gcc3
checking how to print strings... printf
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ar... /usr/bin/ar
checking for ranlib... /usr/bin/ranlib
checking for strip... /usr/bin/strip
checking for gcov... /usr/bin/gcov
checking for lcov... no
checking for java... no
checking for genhtml... no
checking for git... /usr/bin/git
checking for ccache... no
checking for xgettext... no
checking for hexdump... /usr/bin/hexdump
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether byte ordering is bigendian... no
checking if compiler needs -Werror to reject unknown flags... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking whether the linker accepts -Wl,--large-address-aware... no
checking for __attribute__((visibility))... yes
checking for __attribute__((dllexport))... no
checking for __attribute__((dllimport))... no
checking whether C++ compiler accepts -Wstack-protector... yes
checking whether C++ compiler accepts -fstack-protector-all... yes
checking whether C++ preprocessor accepts -D_FORTIFY_SOURCE=2... yes
checking whether C++ preprocessor accepts -U_FORTIFY_SOURCE... yes
checking whether the linker accepts -Wl,--dynamicbase... no
checking whether the linker accepts -Wl,--nxcompat... no
checking whether the linker accepts -Wl,-z,relro... yes
checking whether the linker accepts -Wl,-z,now... yes
checking whether C++ compiler accepts -fPIE... yes
checking whether the linker accepts -pie... yes
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/prctl.h usability... yes
checking sys/prctl.h presence... yes
checking for sys/prctl.h... yes
checking for library containing getaddrinfo_a... -lanl
checking for library containing inet_pton... none required
checking whether strnlen is declared... yes
checking whether le16toh is declared... yes
checking whether le32toh is declared... yes
checking whether le64toh is declared... yes
checking whether htole16 is declared... yes
checking whether htole32 is declared... yes
checking whether htole64 is declared... yes
checking whether be16toh is declared... yes
checking whether be32toh is declared... yes
checking whether be64toh is declared... yes
checking whether htobe16 is declared... yes
checking whether htobe32 is declared... yes
checking whether htobe64 is declared... yes
checking whether bswap_16 is declared... yes
checking whether bswap_32 is declared... yes
checking whether bswap_64 is declared... yes
checking for MSG_NOSIGNAL... yes
checking for library containing clock_gettime... none required
checking for visibility attribute... yes
checking for Berkeley DB C++ headers... default
checking for main in -ldb_cxx-4.8... yes
checking miniupnpc/miniwget.h usability... no
checking miniupnpc/miniwget.h presence... no
checking for miniupnpc/miniwget.h... no
checking miniupnpc/miniupnpc.h usability... no
checking miniupnpc/miniupnpc.h presence... no
checking for miniupnpc/miniupnpc.h... no
checking miniupnpc/upnpcommands.h usability... no
checking miniupnpc/upnpcommands.h presence... no
checking for miniupnpc/upnpcommands.h... no
checking miniupnpc/upnperrors.h usability... no
checking miniupnpc/upnperrors.h presence... no
checking for miniupnpc/upnperrors.h... no
checking for QT... no
checking for QT... no
configure: WARNING: Qt dependencies not found; bitcoin-qt frontend will not be built
checking whether to build Bitcoin Core GUI... no (Qt4)
checking for boostlib >= 1.20.0... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options... yes
checking whether the Boost::Thread library is available... yes
checking for exit in -lboost_thread... yes
checking whether the Boost::Chrono library is available... yes
checking for exit in -lboost_chrono... yes
checking whether the Boost::Unit_Test_Framework library is available... yes
checking for dynamic linked boost test... yes
checking for SSL... yes
checking for CRYPTO... yes
checking openssl/ec.h usability... yes
checking openssl/ec.h presence... yes
checking for openssl/ec.h... yes
checking whether to build bitcoind... yes
checking whether to build utils (bitcoin-cli bitcoin-tx)... yes
checking whether to build libraries... yes
checking if ccache should be used... no
checking if wallet should be enabled... yes
checking whether to build with support for UPnP... no
checking whether to build test_bitcoin... yes
checking whether to reduce exports... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating libbitcoinconsensus.pc
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating share/setup.nsi
config.status: creating share/qt/Info.plist
config.status: creating src/test/buildenv.py
config.status: creating qa/pull-tester/run-bitcoind-for-test.sh
config.status: creating qa/pull-tester/tests-config.sh
config.status: creating src/config/bitcoin-config.h
config.status: src/config/bitcoin-config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in src/secp256k1 (/home/vagrant/local/elements/src/secp256k1)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  '--disable-shared' '--with-pic' --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ar... /usr/bin/ar
checking for ranlib... /usr/bin/ranlib
checking for strip... /usr/bin/strip
checking for gcc option to accept ISO C89... (cached) none needed
checking if gcc supports -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings... yes
checking for __int128... yes
checking for __builtin_expect... yes
checking for x86_64 assembly availability... yes
checking gmp.h usability... no
checking gmp.h presence... no
checking for gmp.h... no
checking for CRYPTO... yes
checking for main in -lcrypto... yes
checking for EC functions in libcrypto... yes
checking whether byte ordering is bigendian... no
configure: Using assembly optimizations: x86_64
configure: Using field implementation: 64bit
configure: Using bignum implementation: no
configure: Using scalar implementation: 64bit
configure: Using endomorphism optimizations: no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libsecp256k1.pc
config.status: creating src/libsecp256k1-config.h
config.status: src/libsecp256k1-config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
Fixing libtool for -rpath problems.
Making all in src
make[1]: Entering directory '/home/vagrant/local/elements/src'
make[2]: Entering directory '/home/vagrant/local/elements/src'
  CXX      crypto/libbitcoinconsensus_la-hmac_sha512.lo
  CXX      crypto/libbitcoinconsensus_la-ripemd160.lo
  CXX      crypto/libbitcoinconsensus_la-sha1.lo
  CXX      crypto/libbitcoinconsensus_la-sha256.lo
  CXX      crypto/libbitcoinconsensus_la-sha512.lo
  CXX      libbitcoinconsensus_la-eccryptoverify.lo
  CXX      libbitcoinconsensus_la-ecwrapper.lo
  CXX      libbitcoinconsensus_la-hash.lo
  CXX      primitives/libbitcoinconsensus_la-transaction.lo
  CXX      libbitcoinconsensus_la-pubkey.lo
  CXX      script/libbitcoinconsensus_la-bitcoinconsensus.lo
  CXX      script/libbitcoinconsensus_la-interpreter.lo
  CXX      script/libbitcoinconsensus_la-script.lo
  CXX      libbitcoinconsensus_la-uint256.lo
  CXX      libbitcoinconsensus_la-utilstrencodings.lo
  CXXLD    libbitcoinconsensus.la
  CXX      bitcoind-bitcoind.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
Makefile:5538: recipe for target 'bitcoind-bitcoind.o' failed
make[2]: *** [bitcoind-bitcoind.o] Error 4
make[2]: Leaving directory '/home/vagrant/local/elements/src'
Makefile:6346: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/vagrant/local/elements/src'
Makefile:616: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

I know everyone here is busy, but any guidance would be very much appreciated.

IndexError: list index out of range (sidechain-manipulation.py line 141)

Running this:
$ ./contrib/sidechain-manipulation.py send-to-sidechain 2NGN94dzNQ764Ef2aMyj5G87mzCGio4i2jh 1

Produces this error on line 141 of sidechain-manipulation.py:

[libsecp256k1] illegal argument: *outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33 : 65)
Traceback (most recent call last):
  File "./contrib/sidechain-manipulation.py", line 141, in <module>
    full_contract = cht_read.split("\n")[1 + is_testnet][26:]
IndexError: list index out of range

I'm using the latest commits of everything, as of the date of posting this issue.

Documentation question wrt alpha-README and send-to-sidechain

I'm trying to figure out exactly what this line does

  [matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py send-to-sidechain 2NCs5ufweTL8VHKNT6wrZMTkrnnmpZCy99j 1
  Sending 1 to 2N3zXjbwdTcPsJiy8sUK9FhWJhqQCxA8Jjr...
  (nonce: 94ffbf32c1f1c0d3089b27c98fd991d5)
  Sent tx with id bf01b88710b6023125379510ebd84b373bee88217c80739a1144e5e92b4ee2d0

The send-to-sidechain command leads me to believe that we are sending 1 BTC to the address 2NC...99j, however in the logs it clearly says that the 1 BTC is being sent to 2N3...Jjr. What is really happening here?

Is the transfer of coins happening like this: 2N3...Jjr is still on the test network - and the 1 BTC will be locked into this address until it is not longer being used on the sidechain. The address 2NC...99j is the address used to represent the 1 BTC on the sidechain network until it is destroyed on the sidechain and is unlocked from 2N3..Jjr on the regular test network?

Scanning key is reused

Confidential transaction addresses reuse the scanning key, https://github.com/ElementsProject/elements/blob/alpha/src/rpcwallet.cpp#L107

This is bad for privacy and alpha should use a new key per transaction

IRC conversation on #sidechains-dev for context:

GAit
14:58 https://github.com/ElementsProject/elements/blob/alpha/src/rpcwallet.cpp#L107 - in which circumstances is it safe to reuse the scanning key? what implications does it have in terms of usecases and privacy? should it be changed per tx if possible?
maaku
16:31 scanning keys are analagous to public derivaiton of HD wallets โ€” there are situations where you might want to delegate the ability to see an entire series of payemtns
16:31 that is an important feature to support
16:32 but in general, and especially with the bitcoin-qt bag-of-keys wallet model, per-tx scanning keys provide better privacy
16:32 alphad presently supports only one per-wallet scanning key, and this is considered a bug
GAit
16:42 thanks maaku, very useful
16:43 makes sense. In an HD contest one would use a separate derivation branch and generate a scanning key per tx, privately derived/hardened.

Priority/Free relay disappearing

It's expected by 0.15 that free relay/priority will be completely gone from the codebase. We will need a different method to get pegin transactions into mempools and confirmed in blocks.

Possible solutions:

  1. Implement our own "peg-in only queue" and preferentially reserve some of each block for this
  2. Adapt claimpegin to pay fees like any other transaction
  3. Completely revamp the pegging process

(1) may be hard to get safe/correct
(2) Easier to get safe/correct, but doesn't explain how withdraw lock combine transactions can pay fees, unless the user has already pegged in funds. Perhaps functionaries themselves can do sweeping and use prioritizetransaction or some similar feature.
(3) is a long-term solution

Insufficient priority when trying to claim-on-sidechain

While following the steps to move money into Elements Alpha sidechain-manipulation.py throws an RPC-JSON exception:

JSONRPCException: -26: 66: insufficient priority

Following is the transaction log of commands and replies:

# ./sidechain-manipulation.py generate-one-of-one-multisig sidechain-wallet
One-of-one address: 22E8QKHaTijFemPDwKvAk9qoTgagPfp8nBQiry87MMU1h2gQG78XZbxHedHgd6Gid57txjm3FdEcmqg85
P2SH address: 2Mz73R1ZUHPKrg3gCj5Z1X2woC3UiHh8asi

# ./sidechain-manipulation.py send-to-sidechain 2Mz73R1ZUHPKrg3gCj5Z1X2woC3UiHh8asi 1
Sending 1 to 2MsjEJu9KSsYPsRyHkx9ym7ALNhpX96Tf2Q...
(nonce: 90887ed8625cd48c00d101bb96b6a8b7)
Sent tx with id 24174c4d5981fb5f517f1a79b97586f850dad73e25439f1e2edf9fea0953c59f

# ./sidechain-manipulation.py claim-on-sidechain 2Mz73R1ZUHPKrg3gCj5Z1X2woC3UiHh8asi 90887ed8625cd48c00d101bb96b6a8b7 24174c4d5981fb5f517f1a79b97586f850dad73e25439f1e2edf9fea0953c59f
Redeeming from utxo bbcb5fc6e3c276409a6134fff59866db59f5b43b56601243b265d3dafc647a67:1 (value 20994185.69597788, refund 20994184.69597788)
Traceback (most recent call last):
  File "./sidechain-manipulation.py", line 195, in <module>
    txid = sidechain.sendrawtransaction(res_tx)
  File "/opt/elements/lib/python-bitcoinrpc/bitcoinrpc/authproxy.py", line 138, in __call__
    raise JSONRPCException(response['error'])
JSONRPCException: -26: 66: insufficient priority

Got the following error from an RPC Call:
{u'message': u'66: insufficient priority', u'code': -26}

I have tried multiple times, initially I didn't have any alphatestnet3 coins but since then I have some from the faucet.

# ./alpha-cli.sh getwalletinfo
{
    "walletversion" : 60000,
    "balance" : 1.00000000,
    "txcount" : 1,
    "keypoololdest" : 1442243484,
    "keypoolsize" : 98,
    "unlocked_until" : 0
}

Then I thought the amount I was trying to send was too small (I was using 0.4 testnet3 coins but the manual was using 1.0) but my last attempt using 1.0 yielded the same exception.

I'm running the alphad daemon with the following configuration:

testnet=1
rpcuser=elements_user
rpcpassword=elements_pass
rpcconnect=127.0.0.1
rpcconnectport=18332
tracksidechain=all
txindex=1
#blindtrust=true

and bitcoind daemon with:

testnet=1
rpcuser=elements_user
rpcpassword=elements_pass
txindex=1

The source code is in sync with HEAD on GitHub.

I'm very interested in the project and happy to provide further details if needed.

Rebuild the database using -reindex to change -txindex.

Already running bitcoind binary, checked out alpha and compiled. On launching bitcoind, I am prompted to rebuild the block database:

< quote>

$:bitcoind -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -testnet -txindex -daemon
Bitcoin server starting
$:: You need to rebuild the database using -reindex to change -txindex.

Do you want to rebuild the block database now?

< end quote>

Is this necessary for elements or an artefact of not building bitcoind from source?

(On Ubuntu 14.04 64)

Coinbase output maturity limits are not enforced

@luke-jr notes that coinbase outputs can be claimed on alpha after the usual 6 blocks, not after the 100 block maturity requirement to spend them. This actually wont break anything and you still have to wait to claim them (due to the 144 alpha block limit), but it should be fixed.

Not a Bitcoin Core fork

Given that ElementsProject is no fork of Bitcoin Core, at least in the eyes of GitHub, using the fork compare mechanism isn't possible, which would be very handy in my opinion, to answer the question: "what exactly is the diff between EP and Core?"

As alternative to a fork, providing a reference branch could have a similar effect. Edit: I'm not sure, if https://github.com/ElementsProject/elements/commits/bitcoin is meant to be the reference branch, given the test commits.

OP_CHECKSIGVERIFY incorrectly checks for a hash type suffix of signatures

CHECKSIGFROMSTACKVERIFY calls CheckSignatureEncoding:

if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, serror)) {

CheckSignatureEncoding in turns calls IsDefinedHashtypeSignature

if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsDefinedHashtypeSignature(vchSig)) {

which is incorrect because signatures for CHECKSIGFROMSTACKVERIFY do not have hashtypes.

One way of fixing this could be to mask out SCRIPT_VERIFY_STRICTENC when calling CheckSignatureEncoding.

A better way would be to give signatures from CHECKSIG and CHECKSIGFROMSTACK different types.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.