github.com/decred/dcrd/blockchain@v1.2.1/internal/dbnamespace/dbnamespace.go (about) 1 // Package dbnamespace contains constants that define the database namespaces 2 // for the purpose of the blockchain, so that external callers may easily access 3 // this data. 4 package dbnamespace 5 6 import ( 7 "encoding/binary" 8 ) 9 10 var ( 11 // ByteOrder is the preferred byte order used for serializing numeric 12 // fields for storage in the database. 13 ByteOrder = binary.LittleEndian 14 15 // BCDBInfoBucketName is the name of the database bucket used to house 16 // global versioning and date information for the blockchain database. 17 BCDBInfoBucketName = []byte("dbinfo") 18 19 // BCDBInfoVersionKeyName is the name of the database key used to house 20 // the database version. It is itself under the BCDBInfoBucketName 21 // bucket. 22 BCDBInfoVersionKeyName = []byte("version") 23 24 // BCDBInfoCompressionVersionKeyName is the name of the database key 25 // used to house the database compression version. It is itself under 26 // the BCDBInfoBucketName bucket. 27 BCDBInfoCompressionVersionKeyName = []byte("compver") 28 29 // BCDBInfoBlockIndexVersionKeyName is the name of the database key 30 // used to house the database block index version. It is itself under 31 // the BCDBInfoBucketName bucket. 32 BCDBInfoBlockIndexVersionKeyName = []byte("bidxver") 33 34 // BCDBInfoCreatedKeyName is the name of the database key used to house 35 // date the database was created. It is itself under the 36 // BCDBInfoBucketName bucket. 37 BCDBInfoCreatedKeyName = []byte("created") 38 39 // ChainStateKeyName is the name of the db key used to store the best 40 // chain state. 41 ChainStateKeyName = []byte("chainstate") 42 43 // SpendJournalBucketName is the name of the db bucket used to house 44 // transactions outputs that are spent in each block. 45 SpendJournalBucketName = []byte("spendjournal") 46 47 // UtxoSetBucketName is the name of the db bucket used to house the 48 // unspent transaction output set. 49 UtxoSetBucketName = []byte("utxoset") 50 51 // BlockIndexBucketName is the name of the db bucket used to house the 52 // block index which consists of metadata for all known blocks both in 53 // the main chain and on side chains. 54 BlockIndexBucketName = []byte("blockidx") 55 )