aggregated signatures for combining payments over a low bandwidth mesh network

Background

I’m researching how in a low bandwidth mesh network payment transactions from nodes can be combined to reduce the bandwidth used for payments. Aggregated signatures seem like a useful technology to reduce the size of transactions between nodes involved in a message relay circuit.

I believe it’s important to focus on the signatures because unlike the payment addresseses in a transaction, signatures cannot be compressed by using a lookup table of their hash and/or an HD wallet path.

Greg Maxwell’s write up on aggregated signatures mentions a scheme using Schnorr signatures and two other schemes, one way aggregated signatures (OWAS) and Boneh–Lynn–Shacham (BLS) signature aggregation.

Question

Which signature aggregation approach, if any, do you think is best suited for building up a payment transaction where each node in a chain pays the next node some small amount?

To try and make my question more concrete, a simplified protocol might look like:

1) Node A broadcasts a transaction tx_A that has two outputs: one spends some value to any address and one spends the change back to an address node A controls.

2) Node B receives tx_A, and broadcasts a tx_B that spends the unspent value from tx_A to an address node B controls, and spends from that address (less some fee they keep) to any address. Node B creates a signature for tx_B that aggregates the spending signature from tx_A.

3) Node C receives tx_B and does the same as in step 2 to produce tx_C. This continues until the message is received by the message destination node F, or there is no more unspent value left.

4) The final tx_E should have an aggregated signature that spends from addresses controlled by nodes A..E to pay nodes B..F.

Key requirements are:

  • non-interactive (or only interactive with the next node in the chain)

  • aggregating many signatures does not increase the transaction size

Thanks in advance and sorry if my question is not clear. I’ve had trouble digesting the primary source material and hope what I’m asking isn’t too crazy.

Error getting bitcoin block to process from DB

i am installing a full node on a linux server and i’m trying to connect to bitcoin with BIFROST(https://github.com/stellar/go/tree/master/services/bifrost) but i am getting the error below which looks like a bitcoin error. All blocks have been downloaded. Please someone should guide me. Thanks

Error getting bitcoin block to process from DB: Error getting bitcoin_last_block from DB: get failed: get failed: pq: relation “key_value_store” does not exist pid=65548 service=BitcoinListener
ERRO[2018-01-05T18:42:41Z] Error starting the server err=”Error starting BitcoinListener: Error getting bitcoin block to process from DB: Error getting bitcoin_last_block from DB: get failed: get failed: pq: relation “key_value_store” does not exist” pid=65548

Format of a block key’s contents in bitcoind’s LevelDB?

I am trying to use bitcoind’s LevelDB block index files (that are stored in blocks/index) to find the file (e.g. blk00029.dat) and byte position of specfic blocks.

Thanks to questions What is the database for? and What are the keys used in the blockchain levelDB (ie what are the key:value pairs)? I know where to look, however the contents of the database key for a block puzzles me. Even with the help of the source code I cannot figure out it’s format.

For example for the block at height 100,000, which resides under database key b\x06\xe53\xfd\x1a\xda\x869\x1f?l42\x04\xb0\xd2x\xd4\xaa\xec\x1c\x0b \xaa'\xba\x03\x00\x00\x00\x00\x00 (block’s hash string converted to bytes in little endian order), I am getting the following content which I hexlified for readability:

87c628858c201d04009be99e5883d1e92c0100000050120119172a610421a6c3011dd330d9df07b63616c2cc1f1cd00200000000006657a9252aacd5c0b2940996ecff952228c3067cc38d4885efb5a4ac4247e9f337221b4d4c86041b0f2b5710

The first 3 bytes (87c628) seem to be the same for every block that I get from the database. I’m guessing it is some version identifier?

The last 80 bytes (or 160 characters in hex) are the block header: 010000005 ... f2b5710. They match what you get by executing bitcoin-cli getblock 000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506 false.

The rest is a mystery to me. I know that block 100,000 had 4 transactions, but the byte that holds the value 4 has 129 for block #1, which had only a single transaction.

Where can I find out about the format of, at least, the block keys in LevelDB?

Could it be that the format of each key depends on the version of bitcoind that serialized the contents? If so, how do I figure out which format to use?

Bittrex: What Error Do You Receive for Spamming the API?

I have a script which queries the Bittrex API pretty frequently (it makes an order after the previous order has filled).

This question asks about the rate limits. Therein, it is mentioned that Bittrex is rather dodgy about the rate limits, and they could change over time.

I want to know what the error/warning response for spamming the API is so I can slow down my requests adaptively (and therefore, not need to edit my script if they change the rate limit in the future).

Does anyone know what the error/warning response for spamming the API is?

Bitcoind Testnet time/timereceived constantly changing?

I’ve got a small question: over a week ago I did some transactions on the Bitcoin testnet as I am developing a new GUI header for full nodes. When continuing development today, I noticed that when running the command ‘listtransactions’ the fields ‘time’ and ‘timereceived’ are different from what they were last week.

When checking the transaction ID on this website, it shows the date corresponding with what I receive when using listtransactions.

Can anyone explain to me why the time/timereceived fields changed and why they are so far off from when I actually did the transaction?

Some additional info:

  • I started my node on the testnet today for the first time since a
    week
  • Actual transaction happened last week on (I think) tuesday
    around 13:00 Amsterdam time

What are the chances of getting duplicate wallet using bitcoinlib in python3?

I am using bitcoinlib in python to create bitcoin wallet as shown here. My question is that how random private keys are which are generated by bitcoinlib?

For example Alice has private key ‘5ThisIsMyPrivateKey’ which was created by some other program (bitcoin core, coinbase, hitbtc or anyone) and I am using bitcoinlib and I have a wallet for Bob and Bob’s private key generated by bitcoinlib can be ‘5ThisIsMyPrivateKey’? What is possibility of it?

Another question is that is there a possibility of having same public key of two or more private key? I have seen lots of different private key structure when I was looking for information and I found three of examples where private keys starts with “5”, “K” and “L” so is it possible that same public address can be created by using either of private key version?

I am still new here at encryption and bitcoin and I am just looking for information.

Thanks for your time.

Binance API SIGNED GET request error code -1100 on signature parameter

I am trying to load my crypto portfolio into Excel so I can use its easy analysis functionality on my trades. However, I’m having trouble connecting to the API using VBA’s WinHttpRequest.

I use the following code to try to GET account info (balances) /api/v3/account:

Sub GetBalances()
Dim tNow As String
tNow = CStr(Date2Long(Now()))
Dim sUrl As String
sUrl = "https://api.binance.com/api/v3/account?timestamp=" & tNow & "&signature=[signature here]"

Dim oRequest As WinHttp.WinHttpRequest
Dim sResult As String

On Error GoTo Err_DoSomeJob

Set oRequest = New WinHttp.WinHttpRequest
With oRequest
    .Open "GET", sUrl, True
    .SetRequestHeader "Content-Type", "application/json; charset=UTF-8"
    .SetRequestHeader "X-MBX-APIKEY", "[API key here]"
    .Send "{}"
    .WaitForResponse
    sResult = .ResponseText
    Debug.Print sResult
    sResult = oRequest.Status
    Debug.Print sResult
End With


Exit_DoSomeJob:
    On Error Resume Next
    Set oRequest = Nothing
    Exit Sub

Err_DoSomeJob:
    MsgBox Err.Description, vbExclamation, Err.Number
    Resume Exit_DoSomeJob


End Sub

Private Function Date2Long(dtmDate As Date) As Long
    Date2Long = (dtmDate - #1/1/1970#) * 86400
    Exit Function
End Function

However it gives the following error message:

{“code”:-1100,”msg”:”Illegal characters found in parameter ‘signature’; legal range is ‘^[A-Fa-f0-9]{64}$’.”}

Which seems strange as the secret key’s character range is only A-F, while the secret provided seems to contain A-Z. Anyone else know how to solve this problem? Might it be a problem caused by VBA? Or might the problem lie somewhere else?