Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| consensus | bool | 1 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| difficulty | numeric | 50 | √ | null | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||||||||||
| gas_limit | numeric | 100 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| gas_used | numeric | 100 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| hash | bytea | 2147483647 | null | 
                                        
  | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| miner_hash | bytea | 2147483647 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| nonce | bytea | 2147483647 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| number | int8 | 19 | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||||||||||||||||||||||||
| parent_hash | bytea | 2147483647 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| size | int4 | 10 | √ | null | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||||||||||
| timestamp | timestamp | 29,6 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| total_difficulty | numeric | 50 | √ | null | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||||||||||
| inserted_at | timestamp | 29,6 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| updated_at | timestamp | 29,6 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||
| refetch_needed | bool | 1 | √ | false | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||||||||||
| base_fee_per_gas | numeric | 100 | √ | null | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||||||||||
| is_empty | bool | 1 | √ | null | 
                                         | 
                                    
                                         | 
                                    
Indexes
| Constraint Name | Type | Sort | Column(s) | 
|---|---|---|---|
| blocks_pkey | Primary key | Asc | hash | 
| blocks_consensus_index | Performance | Asc | consensus | 
| blocks_date | Performance | Asc | number | 
| blocks_inserted_at_index | Performance | Asc | inserted_at | 
| blocks_is_empty_index | Performance | Asc | is_empty | 
| blocks_miner_hash_index | Performance | Asc | miner_hash | 
| blocks_miner_hash_number_index | Performance | Asc/Asc | miner_hash + number | 
| blocks_number_index | Performance | Asc | number | 
| blocks_timestamp_index | Performance | Asc | timestamp | 
| consensus_block_hashes_refetch_needed | Performance | Asc | hash | 
| empty_consensus_blocks | Performance | Asc | consensus | 
| one_consensus_block_at_height | Must be unique | Asc | number | 
| one_consensus_child_per_parent | Must be unique | Asc | parent_hash |