okx / ord

👁‍🗨 Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
46 stars 29 forks source link

runes index 0 with enabled `--index-runes` #46

Open nooperpudd opened 4 months ago

nooperpudd commented 4 months ago

ord version : 0.14.1.4

command parameters:

env:
  ORD_BITCOIN_RPC_PASS: xxx
  ORD_BITCOIN_RPC_USER: xxx
Command: ord                                                                                                                                                                                                                                         
Args:                                                                                                                                                                                                                                         
   --data-dir=/data/ord                                                                                                                                                                                                                        
   -chain=mainnet                                                                                                                                                                                                                             
   --log-level=info                                                                                                                                                                                                                            
   --db-cache-size=4294967296                                                                                                                                                                                                                  
   --enable-index-brc20                                                                                                                                                                                                                        
   --enable-index-bitmap                                                                                                                                                                                                                       
   --index-runes                                                                                                                                                                                                                               
   --enable-save-ord-receipts                                                                                                                                                                                                                  
   --rpc-url=http://btc-2a.coin.svc.cluster.local:8332                                                                                                                                                                                         
   --index-sats                                                                                                                                                                                                                                
   --index-transactions                                                                                                                                                                                                                        
   server                                                                                                                                                                                                                                      
    --enable-json-api

log info:

2024-07-10T08:10:22.711828864+00:00 INFO ord::index - Setting DB cache size to 4294967296 bytes                                                                                                                                                   
│ 2024-07-10T08:10:38.629325650+00:00 INFO ord::index - Options:                                                                                                                                                                                    
│ Options {                                                                                                                                                                                                                                         
│     log_level: LogLevel(                                                                                                                                                                                                                          
│         Info,                                                                                                                                                                                                                                     
│     ),                                                                                                                                                                                                                                            
│     log_dir: None,                                                                                                                                                                                                                                
│     bitcoin_data_dir: None,                                                                                                                                                                                                                       
│     bitcoin_rpc_pass: None,                                                                                                                                                                                                                       
│     bitcoin_rpc_user: None,                                                                                                                                                                                                                       
│     chain_argument: Mainnet,                                                                                                                                                                                                                      
│     config: None,                                                                                                                                                                                                                                 
│     config_dir: None,                                                                                                                                                                                                                             
│     cookie_file: None,                                                                                                                                                                                                                            
│     data_dir: "/data/ord",                                                                                                                                                                                                                        
│     db_cache_size: Some(                                                                                                                                                                                                                          
│         4294967296,                                                                                                                                                                                                                               
│     ),                                                                                                                                                                                                                                            
│     lru_size: 10000000,                                                                                                                                                                                                                           
│     first_inscription_height: None,                                                                                                                                                                                                               
│     height_limit: None,                                                                                                                                                                                                                           
│     index: None,                                                                                                                                                                                                                                  
│     index_runes: true,                                                                                                                                                                                                                            
│     index_sats: true,                                                                                                                                                                                                                             
│     index_transactions: true,                                                                                                                                                                                                                     
│     no_index_inscriptions: false,                                                                                                                                                                                                                 
│     regtest: false,                                                                                                                                                                                                                               
│     rpc_url: Some(                                                                                                                                                                                                                                
│         "http://btc-2a.coin.svc.cluster.local:8332",                                                                                                                                                                                              
│     ),                                                                                                                                                                                                                                            
│     signet: false,                                                                                                                                                                                                                                
│     testnet: false,                                                                                                                                                                                                                               
│     enable_save_ord_receipts: true,                                                                                                                                                                                                               
│     enable_index_bitmap: true,                                                                                                                                                                                                                    
│     enable_index_brc20: true,                                                                                                                                                                                                                     
│     first_brc20_height: None,                                                                                                                                                                                                                     
│     commit_height_interval: 200,                                                                                                                                                                                                                  
│     commit_persist_interval: 0,                                                                                                                                                                                                                   
│ }

status:

{
   "blessed_inscriptions":72459571,
   "cursed_inscriptions":472043,
   "chain":"mainnet",
   "height":851541,
   "inscriptions":72931614,
   "lost_sats":2895502904,
   "minimum_rune_for_next_block":"IWCWQKDXRLEZ",
   "rune_index":false,
   "runes":0,
   "sat_index":true,
   "started":"2024-07-10T12:27:17.220370092Z",
   "transaction_index":true,
   "unrecoverably_reorged":false,
   "uptime":{
      "secs":721,
      "nanos":635932040
gssvv commented 2 months ago

Same issue for me

I think it's intentionally disabled on mainnet: https://github.com/okx/ord/blob/33a33fcd0b06a6231c8625a3a571b4c39747c0d8/src/options.rs#L866C6-L866C85

 #[test]
  fn index_runes_only_returns_true_if_index_runes_flag_is_passed_and_not_on_mainnnet() {
    assert!(Arguments::try_parse_from([
      "ord",
      "--chain=signet",
      "--index-runes",
      "index",
      "update"
    ])
    .unwrap()