Skip to content

Instantly share code, notes, and snippets.

View mcelrath's full-sized avatar

Bob McElrath mcelrath

View GitHub Profile
@mcelrath
mcelrath / gist:b71e10ea99f4d258c50fe7081aa46868
Last active September 16, 2023 09:57
Braidpool-based Slots consensus protocols
Each bead commits to:
| Bitcoin Block header | Slots Merkle Root |
| Coinbase | timestamp | nonce | TX Merkle Root | prev block |
Where the block header is a standard bitcoin block header as expanded in the second line
and each bead commits to <Slots Merkle Root> which should be added to the <metadata>
field as described in:
https://github.com/mcelrath/braidcoin/blob/master/braidpool_spec.md
The Slots data structure is a key-value table containing:
@mcelrath
mcelrath / raynet.log
Created February 15, 2023 00:28
Raynet udp log
data = [b'\x02\x00\x00\x00]\x00\x00\x00!0\x9e\xd46\x00\x03\x84\xa5\x00\x12\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x01\x00\x00\x00\x00\x00\x00\x00\x08\x00\x03\x00\x1f\x00\x18\x81', b'\x01\x00\x00\x00\x11\x00\x00\x00!0\x9e\xd46\x00\x03\x84\xa5\x00\x12\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x01\x00', b'\x00\x00\x00\x00!0\x9e\xd4\x07\x00\x00\x00\x01\x00\x1e\x00\x07\x08\x08\x00\xa5\x00\x12\xc6\x07\x08\x00\x00', b'\x00\x00\x00\x00!0\x9e\xd4\x10\x00\x00\x00\x01\x00\x1e\x00\x03\x08\x14\x00\xb5\x07\x16\n\x03\x08\x00\x00\x04\x08\x00\x00\xa2\xf6\xc0\xe2\x01\n\x00\x00', b'\x00\x00\x00\x00!0\x9e\xd4\x13\x00\x00\x00\x01\x00\x1e\x00\x06\x08\x08\x00\xa5\x00\x12\xc6\x06\x08\x00\x00', b'\x00\x00\x00\x00!0\x9e\xd4#\x00\x00\x00\x01\x00\x1e\x00\x02\x08\x10\x00\xa1\xf6\xc0\xe2\x00\n\x00\x00\xa5\x00\x12\xc6\x02\x08\x00\x00', b'\x00\
OP_IF
"24h" OP_CHECKSEQUENCEVERIFY OP_DROP
<hot pubkey> OP_CHECKSIGVERIFY
OP_ELSE
OP_2 <emergency pubkey1> <emergency pubkey2> OP_2 OP_CHECKMULTISIGVERIFY
OP_ENDIF

Keybase proof

I hereby claim:

  • I am mcelrath on github.
  • I am bobmcelrath (https://keybase.io/bobmcelrath) on keybase.
  • I have a public key ASDxymAHGx4eCwcTzmnYuBUwaJMiCE98AIVkB41Nn-xeago

To claim this, I am signing this object:

rpcserver.cpp: In function ‘void RPCRunLater(const string&, boost::function<void()>, int64_t)’:
rpcserver.cpp:566:94: error: no matching function for call to ‘std::map<std::__cxx11::basic_string<char>, boost::shared_ptr<RPCTimerBase> >::insert(std::pair<std::__cxx11::basic_string<char>, RPCTimerBase*>)’
deadlineTimers.insert(std::make_pair(name, timerInterface->NewTimer(func, nSeconds*1000)));
^
In file included from /usr/include/c++/5/map:61:0,
from serialize.h:15,
from amount.h:9,
from rpcserver.h:9,
from rpcserver.cpp:6:
/usr/include/c++/5/bits/stl_map.h:612:7: note: candidate: std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>
DB Version: Berkeley DB 5.3.28: (September 9, 2013)
SQLite Version: 3.8.7.4
Testing: 5000 records, Transient DB
SQLite DB
insert integer key 194719/sec 1253132/sec
select integer key 1050199/sec 1739735/sec
insert blob key 157539/sec 1156336/sec
select blob key 629485/sec 1633453/sec
Verifying that +bobmcelrath is my blockchain ID. https://onename.com/bobmcelrath
{
"metadata": {
"name": "Bouncing Output Test"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{