aantonop
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 196
Merit: 116
Entrepreneur, coder, hacker, pundit, humanist.
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 22, 2013, 10:40:32 PM |
|
Bite BITcoin Erlang
BED = Bitcoin Erlang Daemon, nice and simple. Usage: "Hey Carla, we're running "BED", are you using bitcoin-js at your startup?"
BITTEN : BITcoin Erlang Node
without acronyms:
The Bitscale Node - Makes Bitcoin Scale
CoinOTP
|
|
|
|
uuidman
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 23, 2013, 12:39:07 AM |
|
Maybe the name Erlnode
|
|
|
|
r.willis (OP)
Jr. Member
Offline
Activity: 42
Merit: 11
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 24, 2013, 07:22:00 AM |
|
I really like BITTEN/BITEN. Release is coming. Can anybody check 198.23.147.4:8333 and tell me if tx relaying works ok? After handshake, host wll notify peers with inv and respond to getdata (type 1 (tx) only).
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 24, 2013, 10:08:54 AM |
|
my log: __main__ - connecting to 192.210.207.147:8333 __main__ - connected to 192.210.207.147:8333 __main__ - sending version to <Node 192.210.207.147:8333> __main__ - recvived version from <Node 192.210.207.147:8333> {'nonce': 11750267548999325335L, 'finalblock': 212672, 'sender': {'services': 1, 'ip': '0.0.0.0', 'port': 0}, 'version': 60002, 'time': 1355854353, 'services': 1, 'useragent': '/ebtcd:0.0.1/', 'type': 'version', 'reciever': {'services': 1, 'ip': '0.0.0.0', 'port': 0}} __main__ - sending verack to <Node 192.210.207.147:8333> __main__ - recvived verack from <Node 192.210.207.147:8333> __main__ - recvived addr from <Node 192.210.207.147:8333> {'type': 'addr', 'addrs': [{'services': 1, 'timestamp': 1364119710, 'port': 8333, 'ip': '192.210.207.147'}]} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '8b8f619892f0c673947721ac850a82739abe7e7908a76519af1ca373e72a0e5e'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': 'd0db4c6499740c10cf7e5b39fe5d92d1983bc53f0c25ffbcab92636d4d73f6a1'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '6a05170eb01f8bcacf42ccec6a397f1fdc160fa152859d9cfe450ab32954c5bc'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': 'e4564170c2bbb448934184643cac1aacb0113befe0f0be46db1c06f346959e36'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '97108906ba10ee3ba04eebb8af465dccec3412fdd88be6e8c3bc812f396a8a67'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': 'b5ecd365f85b9850310e14848d5d139545243d5f34a12dc4fc92b9a22d83edb9'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '98aa22cdadeb60ab539a1e99225a39117d068f70f2c64f869edb0f2d20c55faf'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '1fc9cf75c25f0f669331cb5acaea00f6daafea2f9bde43e4033723957a63f380'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': 'da14d97f6c95bff17e693b0f87fe2caf1c56b1cda2f1a93170cbf56efed8fc93'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': 'a883d7aa04e0db9539ef0631795277bf983ed78e1aa0b9d3aad922a4a14e566f'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': 'e32ebbae43fc0d7dd665a9d8e71b893a16393a2e35b5995078d45c7c87f8a8d8'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': 'a9ee0df7375396834bb9fd78adbb93a024127feddd4aa0c8f12bf03b54bde1e3'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': 'f7cc5a5011c1ad73310eb010989d64a3970f1e2b96520997c051a7de5275f7c4'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '107ff21c6a6d69ac9f3208084e9fcfdbb96d6917169371dd0314bb6575e2aaf4'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': 'acd3dcd564cdc7c4dde43cd0b69a5fbf4fd6f702167d957dfcee9432c6b89478'}], 'type': 'inv'} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '8a936cad5c3d820627d8e7eb6caf0a31fe8c36202acbf1963f148c1133411211'}], 'type': 'inv'}
you should group your invs to improve anonymity and save bandwidth. only sending a inv once a 5 second.
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
r.willis (OP)
Jr. Member
Offline
Activity: 42
Merit: 11
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 24, 2013, 01:03:42 PM |
|
Thanks for testing. Can you also test if getdata works properly with transasctions? Also, can you explain about inv and anonymity? For now I send inv to all peers when I get new tx.
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 24, 2013, 01:48:47 PM |
|
Thanks for testing. Can you also test if getdata works properly with transasctions? Also, can you explain about inv and anonymity? For now I send inv to all peers when I get new tx.
i don't know, think its only meaningful to do it when you are also sending your own transactions, blending you own in with others. the satoshi client sends them in groups. getdata seems to work fine. __main__ - connecting to 192.210.207.147:8333 __main__ - connected to 192.210.207.147:8333 __main__ - sending version to <Node 192.210.207.147:8333> __main__ - recvived version from <Node 192.210.207.147:8333> {'nonce': 3571260833056950700, 'finalblock': 212672, 'sender': {'services': 1, 'ip': '0.0.0.0', 'port': 0}, 'version': 60002, 'time': 1355854353, 'services': 1, 'useragent': '/ebtcd:0.0.1/', 'type': 'version', 'reciever': {'services': 1, 'ip': '0.0.0.0', 'port': 0}} __main__ - sending verack to <Node 192.210.207.147:8333> __main__ - recvived verack from <Node 192.210.207.147:8333> __main__ - recvived addr from <Node 192.210.207.147:8333> {'type': 'addr', 'addrs': [{'services': 1, 'timestamp': 1364132948, 'port': 8333, 'ip': '192.210.207.147'}]} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '8d9efc6660ca76282198f71a8b21936b98e419630672ad54b51f0e467844c3da'}], 'type': 'inv'} __main__ - sending getdata to <Node 192.210.207.147:8333> __main__ - recvived tx from <Node 192.210.207.147:8333> __main__ - got tx: 8d9efc6660ca76282198f71a8b21936b98e419630672ad54b51f0e467844c3da {'inputs': [{'script': u'483045022100ceb6b8a311b8a14d3930dc004ce4ff6dda34beda87c21f19046c82361b1604b802200887b99e45626b87e522a0badca447a6c19ee64e9741b6134eb62428df1cf5d00141049a20d6a2eb15336c1622b9498183d18c0c5ab1aa685f1a09612a4c6c242809850321a944ef01b133aceb6022bef2aa16d5d036a75c4b3d601e5b553a32d8f566', 'outpoint': {'index': 0, 'tx': 'a5930653e67df69033299b8fb9570212b07ffb620d02b509c3d220acec793896'}, 'sequence': 4294967295}, {'script': u'493046022100be02b679976e7aebe165b8d4bcd3bbbdbbd45970f8832416e299942cd2280be9022100aa96403e5a93ebebb0508e933d7473414f1a6a5f4c61289fdb51e577f688bc8b0141049a20d6a2eb15336c1622b9498183d18c0c5ab1aa685f1a09612a4c6c242809850321a944ef01b133aceb6022bef2aa16d5d036a75c4b3d601e5b553a32d8f566', 'outpoint': {'index': 1, 'tx': '1211f69fb8ca81ea8e4480e58eb90bb9ef411e02feca506ab8c326311b54d47a'}, 'sequence': 4294967295}, {'script': u'47304402200099e0ee8e79392ccee8e5f26c05ae55f5708962994319f258cd16f1690f5f2d022061bf3e0e9c72180719b5f8bbac840f7ff64ed48de234b6e681cad2fdeb09b73a0141049a20d6a2eb15336c1622b9498183d18c0c5ab1aa685f1a09612a4c6c242809850321a944ef01b133aceb6022bef2aa16d5d036a75c4b3d601e5b553a32d8f566', 'outpoint': {'index': 0, 'tx': 'e52cd1077b757833251292422f5dcf9163f9617dbdeb8e7046afd5bb2693ee7d'}, 'sequence': 4294967295}], 'locktime': 0, 'version': 1, 'outputs': [{'amount': 22230000, 'script': u'76a91465c44378dca92c950c63d4fb6f977af0e5160ceb88ac'}, {'amount': 13624834, 'script': u'76a914e2737bad9136729f77388e07b45fbdf9d796b16288ac'}]} __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '56b3b0fff13bf3fee18c895864e2fd8ee14486c81a10fec10f28441e4ebc8597'}], 'type': 'inv'} __main__ - sending getdata to <Node 192.210.207.147:8333> __main__ - recvived inv from <Node 192.210.207.147:8333> {'objs': [{'objtype': 1, 'hash': '449c5f1e0a3612099f5cea95957a08bf61ed611ba4f3498742568c6fbb5c56ca'}], 'type': 'inv'} __main__ - sending getdata to <Node 192.210.207.147:8333> __main__ - recvived tx from <Node 192.210.207.147:8333> __main__ - got tx: 56b3b0fff13bf3fee18c895864e2fd8ee14486c81a10fec10f28441e4ebc8597 {'inputs': [{'script': u'47304402205486ae189aeea4eb338881b0c626a4d0eda9f00a5fba31309a75cddb8b3f8b3a02207948a13ba612985f86c2f8189ce2aaffe1df91aab8780c8a9d61f9379ef919080141048cc0b94178715f03ed3d0bceb368191d0fdd7fc16d806567f6f2c45aecafb8f53e5ef849564072189b9b4f8bfe1564da776567ba359cfb0c05e839bcf65371ab', 'outpoint': {'index': 1, 'tx': '43613865df3c6aba0a25e6e5d19681c23f0e84d9246dc75ad8cfe85c9f404689'}, 'sequence': 4294967295}, {'script': u'493046022100fa3f82633d1f581d597949c5ffe80bb9491c7ac3c3c843c8d0ebd1a753782ba0022100addfa96baf88c4f7a5cf951cc691b497e5431ed0f98920e39fefb24c1d34a448014104e9147ece1c26d3319f6b7b5dbad45ab33429f77668857b9b4f3c7422632d6794a826c8e89791c6a2efb7fc4f2e1b3428a10e470315ff096a547f2e3bf91703e6', 'outpoint': {'index': 1, 'tx': '97f979a98c403555d840c70887a9b547671d4666f10b0650b3b7de2475e04c81'}, 'sequence': 4294967295}], 'locktime': 0, 'version': 1, 'outputs': [{'amount': 40076960, 'script': u'76a914d2f0ad0cbbbbca9a9697de43629e38d9a40ebb7688ac'}, {'amount': 125654756, 'script': u'76a914e8c753e1d147dc1594f60033239d982e9e373a4188ac'}]} __main__ - recvived tx from <Node 192.210.207.147:8333> __main__ - got tx: 449c5f1e0a3612099f5cea95957a08bf61ed611ba4f3498742568c6fbb5c56ca {'inputs': [{'script': u'483045022100c823fe360e8ec170d3f7807f779217cc73b4df815114eb20d4ff3501292546f902204f26b4a9995dc591d1d9edd5e08ef643a0ceb3274c4c0de759d32c8bcc7b49bf01210293d3f89b799d0d85ee68753853aba3a8dc9f3eac82ac3f7a002cfac165aeb824', 'outpoint': {'index': 1, 'tx': '1d5a9eb96afb43e69de6e7391910304191742b4b1b517e4bdd5992e8143de07f'}, 'sequence': 4294967295}], 'locktime': 0, 'version': 1, 'outputs': [{'amount': 7950000, 'script': u'76a914e074a32f36dbafe229f8ae8c730615d62f48b40d88ac'}, {'amount': 8000000, 'script': u'76a91406f1b6703d3f56427bfcfd372f952d50d04b64bd88ac'}]}
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
r.willis (OP)
Jr. Member
Offline
Activity: 42
Merit: 11
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 24, 2013, 05:13:16 PM Last edit: March 24, 2013, 05:24:27 PM by r.willis |
|
Thank you for your support. Please check how it works yourself. There is no documentation (and almost no comments), no tests. There are some lurking bugs, but it mostly works. Codebase is really small (~1000 lines + ~500 lines SHA2 by third-party), so do not expect much. Some tunable parameters (build-time) in include/config.erl $ git clone git://github.com/r-willis/biten.git than check README for instructions. UPD: here is one-liner for updating stats every 10 sec: 3> T1 = timer:apply_interval(10*1000, stat, print, []).
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 24, 2013, 06:37:22 PM |
|
Awesome! ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif) code perving now.
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
yoniassia
Newbie
Offline
Activity: 42
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 25, 2013, 03:07:02 AM |
|
You should check twitcoin.net also implemented a bitcoin wallet in erlang
|
|
|
|
r.willis (OP)
Jr. Member
Offline
Activity: 42
Merit: 11
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 25, 2013, 08:02:55 AM |
|
Thanks for the link, I'll check it.
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 25, 2013, 09:43:28 AM |
|
You should check twitcoin.net also implemented a bitcoin wallet in erlang
no it does not, in only interfaces with bitcoind
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
r.willis (OP)
Jr. Member
Offline
Activity: 42
Merit: 11
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 25, 2013, 04:32:26 PM |
|
So, anyone tried it? Does it even work for you?
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 25, 2013, 04:45:38 PM |
|
So, anyone tried it? Does it even work for you?
no, i have exams. if i begin playing with bitten, i gonna fail them...
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
r.willis (OP)
Jr. Member
Offline
Activity: 42
Merit: 11
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 25, 2013, 05:20:22 PM Last edit: March 25, 2013, 08:00:26 PM by r.willis |
|
Good luck with your exams. It seems like there are some malicious nodes on the network, which send thousands of inv messages. As biten have no anti-DoS features, it causes memory exhaustion and erlang VM termination. I hope to push quick-fix today.
P.S. I decided to drop extra "T" from name, so it's biten.
EDIT: pushed some fixes and improvements. Next: download block headers and organize them into trees.
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 25, 2013, 08:35:42 PM |
|
Good luck with your exams.
thank you ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) It seems like there are some malicious nodes on the network, which send thousands of inv messages. As biten have no anti-DoS features, it causes memory exhaustion and erlang VM termination. I hope to push quick-fix today.
they are not malicious, just stress testing the network. ![Wink](https://bitcointalk.org/Smileys/default/wink.gif)
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
aantonop
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 196
Merit: 116
Entrepreneur, coder, hacker, pundit, humanist.
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 27, 2013, 09:35:08 AM |
|
$ git clone git://github.com/r-willis/biten.git
ON IT! I'm meeting a real ErlangOTP *expert* (phds, patents, the whole 9) next week who recently got interested in bitcoin. Perfect timing to introduce your code...
|
|
|
|
r.willis (OP)
Jr. Member
Offline
Activity: 42
Merit: 11
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 27, 2013, 07:56:48 PM |
|
Do not think he will be impressed - it's my first "real" OTP project. I hope it will be able to run more than 24h without problems - right now after 2-3 hours it terminates.
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 27, 2013, 08:09:07 PM |
|
Do not think he will be impressed - it's my first "real" OTP project. I hope it will be able to run more than 24h without problems - right now after 2-3 hours it terminates.
same here, it just dies... ![Sad](https://bitcointalk.org/Smileys/default/sad.gif)
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
r.willis (OP)
Jr. Member
Offline
Activity: 42
Merit: 11
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 27, 2013, 08:28:30 PM |
|
same here, it just dies... Can you show output of stat:print() ~5 min and ~30 min after start?
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 27, 2013, 08:46:59 PM |
|
same here, it just dies... Can you show output of stat:print() ~5 min and ~30 min after start? Start time..2013.03.27 20:44:01 UTC ok Cur time....2013.03.27 20:45:22 UTC Connects:...2190 4> Connected:..149 Accepted:...0 Answers:....149 Cur peers...131 Relayed TX:.482 Mempool: inv table..111 req table..10 tx table...119 peer table.111 check inv..0.0168 s clean inv..0.0005 s clean req..0.0001 s clean tx...0.0006 s Errors: timeout:...167 refused:...160 unreach:...91 other:.....762 the next will come in 30 min
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
|