Code Monkey home page Code Monkey logo

picocoin's People

Contributors

aido avatar amiller avatar colindean avatar csjones avatar dtebbs avatar fanquake avatar grimd34th avatar hubslave avatar jaromil avatar jayschwa avatar jgarzik avatar joeldejesus1 avatar jonasschnelli avatar kroggen avatar libbitc avatar willricketts 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

picocoin's Issues

Connection refused

After running src/picocoin chain=testnet3 netsync i get connection refused errors:

src/picocoin chain=testnet3 netsync socket connect 2001:470:1f07:11a2:2677:3ff:fe89:f688: No route to host net: failed to start connection to 2001:470:1f07:11a2:2677:3ff:fe89:f688 socket connect 2001:470:1f01:523::1: No route to host net: failed to start connection to 2001:470:1f01:523::1 socket connect 2001:470:8226:a001::2: No route to host net: failed to start connection to 2001:470:8226:a001::2 socket connect 2001:470:6f:2cb::2: No route to host net: failed to start connection to 2001:470:6f:2cb::2 llnet: 46.19.139.72 read: Connection reset by peer net: connect 212.7.21.46 failed: Connection refused ^C

running on MacOSX 10.8

any ideas?

compile error on debian amd64

uname -a Linux server2 2.6.32-5-amd64 #1 SMP Mon Feb 25 00:26:11 UTC 2013 x86_64 GNU/Linux

after running make i get:

gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I../include    -g -O2 -MT base58.o -MD -MP -MF .deps/base58.Tpo -c -o base58.o base58.c
In file included from base58.c:11:
../include/ccoin/util.h:22: error: expected declaration specifiers or ‘...’ before ‘int64_t’
make[2]: *** [base58.o] Error 1

any ideas?

use of argp in rawtx.c but not in picocoin and brd

Hi,

Is it a good idea to have picocoin and brd use argp aswell?, I think argp was later introduced after picocoin and brd were written or is there a reason not to use it in picocoin, brd and possible others?

I would like to convert,

Possible bug in net.c

Take a look at the is_local function in net.c, line 130.
I think the if has no effect there unless you delete the ;

ipv6 prefix in net.C 2011:0470/36

HI Jgarzik,
in the net.c module i see in function "bn_group" the code snippet

2011:0470/36 ipv6 prefix is unassigned, what are you checking for precisely?

_ else if (ipaddr[GB(15)] == 0x20 && ipaddr[GB(14)] == 0x11 &&
ipaddr[GB(13)] == 0x04 && ipaddr[GB(12)] == 0x70)
bits = 36;
}
else bits = 32;_

CHECKMULTISIG tests failing

Hi,

The following CHECKMULTISIG tests copied from bitcoincore's test data file script_tests.json are failing in picocoin:

["", "0 0 0 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK", "CHECKMULTISIG is allowed to have zero keys and/or sigs"],
["", "0 0 0 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 0 1 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK", "Zero sigs means no sigs are checked"],
["", "0 0 0 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 2 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK", "Test from up to 20 pubkeys, all not checked"],
["", "0 0 'a' 'b' 'c' 3 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 4 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 5 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 6 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 7 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 8 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 9 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 10 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 11 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 12 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 13 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 14 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 15 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 16 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 17 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 18 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 19 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 2 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 3 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 4 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 5 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 6 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 7 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 8 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 9 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 10 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 11 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 12 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 13 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 14 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 15 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 16 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 17 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 18 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 19 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"]

["",
"0 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG",
"P2SH,STRICTENC", "OK",
"nOpCount is incremented by the number of keys evaluated in addition to the usual one op per op. In this case we have zero keys, so we can execute 201 CHECKMULTISIGS"],

["1",
"0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY",
"P2SH,STRICTENC", "OK"],

["",
"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG",
"P2SH,STRICTENC", "OK",
"Even though there are no signatures being checked nOpCount is incremented by the number of keys."],

["1",
"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY",
"P2SH,STRICTENC", "OK"],

[
    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0 2 CHECKMULTISIG NOT",
    "STRICTENC",
    "PUBKEYTYPE",
    "2-of-2 CHECKMULTISIG NOT with the first pubkey invalid, and both signatures validly encoded."
],
[
    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 1",
    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
    "STRICTENC",
    "SIG_DER",
    "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but first signature invalid."
],

autoreconf: automake failed with exit status: 1

What's the recommended compilation approach? Any log files? I think I've got all the dependencies installed too.

./autogen.sh
Makefile.am: error: required file './README' not found
lib/Makefile.am:2: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '__CPPFLAGS')
src/Makefile.am:2: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '__CPPFLAGS')
test/Makefile.am:2: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
autoreconf: automake failed with exit status: 1

Script tests

Hi,

Just to note that some CSV tests that pass in bitcoin-core are failing here so have been removed from test/script_tests.json for now. See libbitc#2
Also, the automatically generated tests from bitcoin-core test/script_tests.jsonhave been removed

I do not think this is a problem with lib/script_eval.c but rather test/script.c will probably need to be updated for these removed tests to pass.
Once we get over this issue all script tests from bitcoin-core will pass except the SCRIPT_VERIFY_WITNESS and SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM ones.

Possible memory leaks in script.c and clist.c

Hi,

Running valgrind --leak-check=full on script test highlights some lost bytes:

aido:~/workspace/test (master) $ valgrind --leak-check=full ./script
==9190== Memcheck, a memory error detector
==9190== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==9190== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==9190== Command: ./script
==9190== 
==9190== 
==9190== HEAP SUMMARY:
==9190==     in use at exit: 407 bytes in 48 blocks
==9190==   total heap usage: 45,284 allocs, 45,236 frees, 2,232,161 bytes allocated
==9190== 
==9190== 17 (16 direct, 1 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 4
==9190==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9190==    by 0x407A13: buffer_copy (buffer.c:42)
==9190==    by 0x404E47: stack_push_str (script_eval.c:217)
==9190==    by 0x405726: bp_script_eval.isra.11 (script_eval.c:565)
==9190==    by 0x4067DB: bp_script_verify (script_eval.c:1069)
==9190==    by 0x40224E: test_script (script.c:24)
==9190==    by 0x40224E: runtest (script.c:61)
==9190==    by 0x402042: main (script.c:74)
==9190== 
==9190== 390 (368 direct, 22 indirect) bytes in 23 blocks are definitely lost in loss record 4 of 4
==9190==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9190==    by 0x407A13: buffer_copy (buffer.c:42)
==9190==    by 0x404E22: stack_push (script_eval.c:202)
==9190==    by 0x40561C: bp_script_eval.isra.11 (script_eval.c:388)
==9190==    by 0x4067DB: bp_script_verify (script_eval.c:1069)
==9190==    by 0x40224E: test_script (script.c:24)
==9190==    by 0x40224E: runtest (script.c:61)
==9190==    by 0x402042: main (script.c:74)
==9190== 
==9190== LEAK SUMMARY:
==9190==    definitely lost: 384 bytes in 24 blocks
==9190==    indirectly lost: 23 bytes in 24 blocks
==9190==      possibly lost: 0 bytes in 0 blocks
==9190==    still reachable: 0 bytes in 0 blocks
==9190==         suppressed: 0 bytes in 0 blocks
==9190== 
==9190== For counts of detected and suppressed errors, rerun with: -v
==9190== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

"Failed to start engine" when doing netsync (OS X)

I tried sync'ing. I did this before creating an address and after, same difference. I wouldn't expect it to really do anything without an address to look for, but it could probably have a more meaningful error message if it has no work to do since there are no addresses.

But, in the case that there's an address, perhaps it should be doing something here.

[colin@kid picocoin]$ PICOCOIN_PASSPHRASE=blah src/picocoin netsync
failed to start engine

I suppose I should be using testnet, too, haha.

compilation issues on osx

I fist had to specify LIBS=/opt/local/lib to get configure to complete. Then I had to install the argp-standalone library, and specify "-largp" in LIBS. i also had to add the following to src/brd.h:

#ifdef __APPLE__
#  define off64_t off_t
#  define lseek64 lseek
#endif

Help command

I know it's probably a todo item, but I might tackle it if no one else does before I get time to do it.

O_LARGEFILE and OSX

FYI:

./autogen.sh && ./configure && make ALMOST works on OSX 10.8, after installing dependencies ('port install libevent glib2 jansson').

The only error is O_LARGEFILE undefined. I'm opening this issue because I don't know nuthin about that flag or the best cross-platform way of enabling more-than-2-GB-files (I believe it Just Works on current versions of OSX).

code: "Warning" because truncation of 64 bit integer

https://bitcoin.org/en/developer-reference#compactsize-unsigned-integers
I have a question about this piece of code related to the link above
module: serialize.c

The WARNING in the code below because uint64_t is truncated to uint32_t

I dont understand the specs in the link above say otherwise, is there a reason for this?

function:
` bool deser_varlen(uint32_t *lo, struct const_buffer *buf)
{
uint32_t len;
unsigned char c;

    if (!deser_bytes(&c, buf, 1)) return false;

    if (c == 253) {
            uint16_t v16;
            if (!deser_u16(&v16, buf)) return false;
            len = v16;
    }
    else if (c == 254) {
            uint32_t v32;
            if (!deser_u32(&v32, buf)) return false;
            len = v32;
    }
    else if (c == 255) {
            uint64_t v64;
            if (!deser_u64(&v64, buf)) return false;
            len = (uint32_t) v64;   /* WARNING: truncate */
    }
    else
            len = c;

    *lo = len;
    return true;

}
`

OpenSSL fails , is returning '0' EC_KEY_new_by_curve_name(NID_secp256k1)

in key.c .....key->k = EC_KEY_new_by_curve_name(NID_secp256k1);

I have 2 bitcoin clients failing on this api call 'picocoin' and "bitc"
My openSSL version on CENTOS is

OpenSSL 1.0.1e-fips 11 Feb 2013

How to fix this?


bool bp_key_init(struct bp_key *key)
{
        memset(key, 0, sizeof(*key));

        key->k = EC_KEY_new_by_curve_name(NID_secp256k1);
        if (!key->k)
                return false;

        return true;
}

missing include file

I forked it and looking at the code.

keyset.c has the include....

include "picocoin-config.h"

I cannot find the picocoin-config.h file))

Coverity static analysis

Hi,

Coverity static analysis can easily be added to picocoin by adding something like the following to .travis.yml:

.
.
env:
  global:
    - secure: "W4D9Wmi+kJbxJuekKXJnhp665L2ljUuq5jrXmRqBwRDIZxbQi/mJqBEVcHEf/3W3l9W67pLd+mvV0cVv9g0AQ/nkUCSj5JCNJrePeovaQmf1QHluTa+bDUABa68X1sx201uj4EmkGJJHtYkv3Cimucut1C4g83eGXajnptKinqyLnUg9ji8aYmv7wm8n12VFeMM7+RyR53MT0nuPpCEw0hRQJQxKzXq/qw/5Wb0vBU1IovNX6bFQNMgTcHEXpppIh7efaAM50v4lj3zd5ZgLDuREmss/HriuJD3KUCWUoVgOkg+QUyW4IAIiI/dWSX9PJYtf1rKhc4ANwjq828NzyhbMJWlOBOBVAZxg+xWmc5+I+mHgmV/YylTMN4+sFnFi9gdDjmF8ImsME2qjDXm1txFknLeNP4CCEHKYCcgsNGPKUtrn2L9Be99HMScBqy7nmCQyhKvTWnYc7j/Je6PjEkXYNT96VNwZ4U8mXktkNPcYkQ43oMbUplITGiA8s50vuWQTLGjFjj+cxgAsz0rOc7+RSVxogY+MkP3+Fc28BKu1ZLLTvAmADWR+xd/179JnL+IAzM5eHUInlIp56DZF7nDoYFyt/yw3VCRUYPNOXVXzY8vCVGI+Hcr+MjmgDu7lhUeTvREaR3iJjEV3QutN79KYKr+CEeRVIoxOBigRVj4="
    - MAKEJOBS=-j3
.
.
addons:
  coverity_scan:
    project:
      name: "jgarzik/picocoin"
      description: "Build submitted via Travis CI"
    notification_email: [email protected]
    build_command_prepend: "./autogen.sh; ./configure; make clean"
    build_command: "make check"
    branch_pattern: master
.
.

And maybe a nice badge in README.md.

[![Coverity Scan Build Status](https://scan.coverity.com/projects/8288/badge.svg)](https://scan.coverity.com/projects/jgarzik-picocoin) 

See:
aido@9ce5f09

I haven't added this as a pull request as the keys, project number etc. will be different for jgarzik/picocoin.

The Coverity scan at https://scan.coverity.com/projects/aido-picocoin currently finds 28 defects; some high impact, others low.

I have the following components configured:

Component name Pattern Ignore
lib ./lib/. No
ccoin ./include/ccoin/. No
src ./src/. No
test ./test/. No
external ./external/. Yes

Coverity suggest creating a separate coverity branch and merging from master occasionally to trigger a scan.
For projects with fewer than 100K lines of code the number of allowed weekly builds per project are up to 12 builds per week, with a maximum of 3 builds per day. Picocoin is well within these limits so probably no need for a separate coverity branch for now.

Unable to build on OS 10.7

After using homebrew to install (and reinstall) dependencies, ./autogen.sh returns:

configure.ac:89: warning: macro `AM_PATH_GLIB_2_0' not found in library
configure.ac:29: installing `./config.sub'
configure.ac:23: installing `./missing'
configure.ac:23: installing `./install-sh'
configure.ac:29: installing `./config.guess'
lib/Makefile.am: installing `./depcomp'
Makefile.am: installing `./INSTALL'
configure.ac:89: error: possibly undefined macro: AM_PATH_GLIB_2_0
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

Travis builds failing on OSX

Hi,

Recently Travis CI updated the default OSX image. Xcode 7.3 is now the default.
https://blog.travis-ci.com/2016-10-04-osx-73-default-image-live/

This causes some of the picocoin builds to fail on OSX.

As a temporary workaround the old OSX image can still be used by adding the following to .travis.yml:

osx_image: beta-xcode6.1

However, this older image will only be maintained up until Monday, October 31st 2016.

For some reason the aes-util test fails on the newer OSX images:, example here:
https://travis-ci.org/aido/picocoin/jobs/166044768

Valgrind builds on OSX are also failing due to some memory issue with clist and coredefs tests, example here:
https://travis-ci.org/aido/picocoin/jobs/166044770

This issue may be reproduced by restarting any Travis OSX builds that have previously completed successfully.

brd.c function "nc_msg_addr" needlessly parsing addresses if protover < CADDR_TIME_VERSION

HI,

I see in this function the bp_adresses are fetched from the buffer but later on if the conn->protover is < CADDR_TIME_VERSION it is discarded, can we move this up front to the top of the function?

static bool nc_msg_addr(struct nc_conn *conn)
{
.
. if (!deser_msg_addr(conn->protover, &ma, &buf))
goto out;
.
.

    /* ignore ancient addresses */                     <-- move this to beginning of function?
    if (conn->protover < CADDR_TIME_VERSION)
            goto out_ok;

.
.
}

wallet: Missing PICOCOIN_PASSPHRASE for AES crypto

I've compiled pico coin but when I try create a new wallet i.e.
sudo ./picocoin new-wallet

wallet: Missing PICOCOIN_PASSPHRASE for AES crypto
wallet: failed to store picocoin.wallet

Do I need to set the PICOCOIN_PASSPHRASE somewhere?

Bitcoincore script tests failing in picocoin.

Hi,

The following script tests copied from bitcoincore's test data file script_tests.json are failing in picocoin:

["", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK", "Test the test: we should have an empty stack after scriptSig evaluation"],
["  ", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK", "and multiple spaces should not change that."],
["   ", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["    ", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK"],
["1 2", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC", "OK", "Similarly whitespace around and between symbols"],
["1  2", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC", "OK"],
["  1  2", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC", "OK"],
["1  2  ", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC", "OK"],
["  1  2  ", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC", "OK"],

["1", "", "P2SH,STRICTENC", "OK"],
["0x02 0x01 0x00", "", "P2SH,STRICTENC", "OK", "all bytes are significant, not only the last one"],
["0x09 0x00000000 0x00000000 0x10", "", "P2SH,STRICTENC", "OK", "equals zero when cast to Int64"],

["0 0 1", "EQUAL EQUAL", "P2SH,STRICTENC", "OK", "OP_0 and bools must have identical byte representations"]
["all PUSHDATA forms are equivalent"],

["0x4c 0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "OK", "PUSHDATA1 of 75 bytes equals direct push of it"],
["0x4d 0xFF00 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4c 0xFF 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "OK", "PUSHDATA2 of 255 bytes equals PUSHDATA1 of it"],

["", "DEPTH", "P2SH,STRICTENC",   "EVAL_FALSE", "Test the test: we should have an empty stack after scriptSig evaluation"],
["  ", "DEPTH", "P2SH,STRICTENC", "EVAL_FALSE", "and multiple spaces should not change that."],
["   ", "DEPTH", "P2SH,STRICTENC", "EVAL_FALSE"],
["    ", "DEPTH", "P2SH,STRICTENC", "EVAL_FALSE"],

["", "", "P2SH,STRICTENC","EVAL_FALSE"],
["", "NOP", "P2SH,STRICTENC","EVAL_FALSE"],
["", "NOP DEPTH", "P2SH,STRICTENC", "EVAL_FALSE"],
["NOP", "", "P2SH,STRICTENC", "EVAL_FALSE"],
["NOP", "DEPTH", "P2SH,STRICTENC", "EVAL_FALSE"],
["NOP","NOP", "P2SH,STRICTENC", "EVAL_FALSE"],
["NOP","NOP DEPTH", "P2SH,STRICTENC", "EVAL_FALSE"],

PolarSSL

Have you evaluated use of PolarSSL instead of OpenSSL?

It implements almost all the same calls, works better on embedded and is less license encumbered. It already can absolve to all tasks needed by OpenVPN, for instance.

Picocoin is neat! and much needed. will have a look...

Wallet does not store addresses ?

Hi Jeff,

i am using version v0.5 of picocoin (faa9b83).
When i do something like in the script below, i only get an empty wallet.
What am i doing wrong? Or do i need to upgrade ?

Unfortunately, i am not able to compile the latest version, see bottom of this message
========== testrun ===============
`
PICOCOIN_PASSPHRASE="test"
cmd="bin/picocoin0.5 --set=config=.picocoin/picocoin0.5.conf"

$cmd address
$cmd address
$cmd address
$cmd address
$cmd info
$cmd dump
`

i am getting only an empty wallet:
bitcoin@server:~$ ./picocoin05.sh 1LpuWPHuDRoCQWCwS7pM1U66gXxDpsqR6D 1BNJHTMgu77T4ZZJxGSFt6HkYG8bnWPxPT 18uqEDigNh5SVL88Gfaq8E1dGAuPedUx8S 1JTy1AZ3iEFXJg4hqVxdccBjAAk1cybxyd { "version": 1, "n_privkeys": 0, "n_hd_extkeys": 1, "netmagic": f9beb4d9 } { "accounts": [ { "acct_idx": 0, "name": "master", "next_key_idx": 213 } ], "def_acct": "master", "hdmaster": [ { "hdpriv": "9Xoy2u8vevhdokmLL5wks8mx6hGUKkU9LqBV1qLwiRaVMtAaqR3zm4RLFgD1VPCdRScwRpuUWfNnqDEMufFmJ9nkARoKw8kkSS2qJpVNZS" } ], "keys": [], "netmagic": "f9beb4d9", "version": 1 }
========== testrun end ===============

========== compile message ===========

gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../include -g -O2 -MT core.o -MD -MP -MF .deps/core.Tpo -c -o core.o core.c mv -f .deps/core.Tpo .deps/core.Po gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../include -g -O2 -MT coredefs.o -MD -MP -MF .deps/coredefs.Tpo -c -o coredefs.o coredefs.c mv -f .deps/coredefs.Tpo .deps/coredefs.Po make[2]: *** No rule to make targetdns.c', needed by dns.o'. Stop. make[2]: Leaving directory /home/bitcoin/dev/picocoin/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory /home/bitcoin/dev/picocoin'
Thank you !

block relay deamon

Hi Jgarzik,

what does the block relay deamon (brd executable) do? Its commandline options are not described (as compared to picocoin executable), so, its not really needed?

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.