blocks.sql 676 B

123456789101112131415161718192021
  1. -- Database blocks table definition.
  2. -- We store data in a usable format.
  3. CREATE TABLE IF NOT EXISTS blocks (
  4. -- Header hash identifier of the block
  5. header_hash TEXT PRIMARY KEY NOT NULL,
  6. -- Block version
  7. version INTEGER NOT NULL,
  8. -- Previous block hash
  9. previous TEXT NOT NULL,
  10. -- Block height
  11. height INTEGER NOT NULL,
  12. -- Block creation timestamp
  13. timestamp INTEGER NOT NULL,
  14. -- The block's nonce. This value changes arbitrarily with mining.
  15. nonce INTEGER NOT NULL,
  16. -- Merkle tree root of the transactions hashes contained in this block
  17. root TEXT NOT NULL,
  18. -- Block producer signature
  19. signature BLOB NOT NULL
  20. );