Bitcoin Forum
September 25, 2018, 02:28:57 AM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Format of keys and values in bitcore [CLOSED]  (Read 1233 times)
Shawshank
Legendary
*
Offline Offline

Activity: 1432
Merit: 1051



View Profile
July 10, 2014, 09:51:44 PM
 #1

I am trying to understand the format of keys and values in the bitcore LevelDB database.

I have extracted this record:

{"key":"txa2-1XPTgDRhN8RFnzniWCddobD9iKZatrvH4-9998728386554-faa2cb087a2b0c5e2c898f713ebd77762afb7088a2bd0c720615a6b2efc54eb1-1",
"value":"1000000:1:1:42f4500dec4c6f8cd41337767bdf7e2caa48c153ae2114334a645ac927d03766:289:1273862997"}

For the "key" name:
What does the number 9998728386554 mean?
What does the last number 1 at the end mean?

For the "value" name:
What does the pair :1:1: mean?
What does the number 289 mean?

EDIT: More precisely, the LevelDB database is created by insight-api, which uses bitcore.

A bank-only system is similar to having your Bitcoin wallet confined to your national ID, essentially forfeiting your privacy and handing all private keys to the government
1537842537
Hero Member
*
Offline Offline

Posts: 1537842537

View Profile Personal Message (Offline)

Ignore
1537842537
Reply with quote  #2

1537842537
Report to moderator
1537842537
Hero Member
*
Offline Offline

Posts: 1537842537

View Profile Personal Message (Offline)

Ignore
1537842537
Reply with quote  #2

1537842537
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537842537
Hero Member
*
Offline Offline

Posts: 1537842537

View Profile Personal Message (Offline)

Ignore
1537842537
Reply with quote  #2

1537842537
Report to moderator
1537842537
Hero Member
*
Offline Offline

Posts: 1537842537

View Profile Personal Message (Offline)

Ignore
1537842537
Reply with quote  #2

1537842537
Report to moderator
1537842537
Hero Member
*
Offline Offline

Posts: 1537842537

View Profile Personal Message (Offline)

Ignore
1537842537
Reply with quote  #2

1537842537
Report to moderator
Shawshank
Legendary
*
Offline Offline

Activity: 1432
Merit: 1051



View Profile
July 11, 2014, 09:34:42 AM
 #2

I managed to get the answer after reviewing the source code. For the record (pun intended)  Smiley

Quote from: Shawshank
For the "key" name:
What does the number 9998728386554 mean?

1e13-Unix timestamp, i.e. reverse timestamp, to be able to order it backwards quickly.

Quote from: Shawshank
What does the last number 1 at the end mean?

vout order in the transaction

Quote from: Shawshank
For the "value" name:
What does the pair :1:1: mean?
What does the number 289 mean?

This info is relevant for version of insight older than v0.2. For version 0.2 and older spents are obtained with  txs-.

A bank-only system is similar to having your Bitcoin wallet confined to your national ID, essentially forfeiting your privacy and handing all private keys to the government
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!