Repository navigation
synchronizing history blocks events failed #6438
Description
Activity
---------------main_net_config.conf--------------------
net { type = mainnet # type = testnet } storage { # Directory for storing persistent data db.engine = "LEVELDB", db.sync = true, db.directory = "database", index.directory = "index", transHistory.switch = "on", # You can custom these 14 databases' configs: # account, account-index, asset-issue, block, block-index, # block_KDB, peers, properties, recent-block, trans, # utxo, votes, witness, witness_schedule. # Otherwise, db configs will remain default and data will be stored in # the path of "output-directory" or which is set by "-d" ("--output-directory"). # setting can impove leveldb performance .... start # node: if this will increase process fds,you may be check your ulimit if 'too many open files' error occurs # see https://github.com/tronprotocol/tips/blob/master/tip-343.md for detail # if you find block sync has lower performance,you can try this settings #default = { # maxOpenFiles = 100 #} #defaultM = { # maxOpenFiles = 500 #} #defaultL = { # maxOpenFiles = 1000 #} # setting can impove leveldb performance .... end # Attention: name is a required field that must be set !!! properties = [ // { // name = "account", // path = "storage_directory_test", // createIfMissing = true, // paranoidChecks = true, // verifyChecksums = true, // compressionType = 1, // compressed with snappy // blockSize = 4096, // 4 KB = 4 * 1024 B // writeBufferSize = 10485760, // 10 MB = 10 * 1024 * 1024 B // cacheSize = 10485760, // 10 MB = 10 * 1024 * 1024 B // maxOpenFiles = 100 // }, // { // name = "account-index", // path = "storage_directory_test", // createIfMissing = true, // paranoidChecks = true, // verifyChecksums = true, // compressionType = 1, // compressed with snappy // blockSize = 4096, // 4 KB = 4 * 1024 B // writeBufferSize = 10485760, // 10 MB = 10 * 1024 * 1024 B // cacheSize = 10485760, // 10 MB = 10 * 1024 * 1024 B // maxOpenFiles = 100 // }, ] needToUpdateAsset = true //dbsettings is needed when using rocksdb as the storage implement (db.engine="ROCKSDB"). //we'd strongly recommend that do not modify it unless you know every item's meaning clearly. dbSettings = { levelNumber = 7 //compactThreads = 32 blocksize = 64 // n * KB maxBytesForLevelBase = 256 // n * MB maxBytesForLevelMultiplier = 10 level0FileNumCompactionTrigger = 4 targetFileSizeBase = 256 // n * MB targetFileSizeMultiplier = 1 } //backup settings when using rocks db as the storage implement (db.engine="ROCKSDB"). //if you want to use the backup plugin, please confirm set the db.engine="ROCKSDB" above. backup = { enable = false // indicate whether enable the backup plugin propPath = "prop.properties" // record which bak directory is valid bak1path = "bak1/database" // you must set two backup directories to prevent application halt unexpected(e.g. kill -9). bak2path = "bak2/database" frequency = 10000 // indicate backup db once every 10000 blocks processed. } balance.history.lookup = true # checkpoint.version = 2 # checkpoint.sync = true # the estimated number of block transactions (default 1000, min 100, max 10000). # so the total number of cached transactions is 65536 * txCache.estimatedTransactions # txCache.estimatedTransactions = 1000 # if true, transaction cache initialization will be faster. default false # txCache.initOptimization = true # data root setting, for check data, currently, only reward-vi is used. # merkleRoot = { # reward-vi = 9debcb9924055500aaae98cdee10501c5c39d4daa75800a996f4bdda73dbccd8 // main-net, Sha256Hash, hexString # } } node.discovery = { enable = true persist = true } # custom stop condition #node.shutdown = { # BlockTime = "54 59 08 * * ?" # if block header time in persistent db matched. # BlockHeight = 33350800 # if block header height in persistent db matched. # BlockCount = 12 # block sync count after node start. #} node.backup { # udp listen port, each member should have the same configuration port = 10001 # my priority, each member should use different priority priority = 8 # time interval to send keepAlive message, each member should have the same configuration keepAliveInterval = 3000 # peer's ip list, can't contain mine members = [ # "ip", # "ip" ] } crypto { engine = "eckey" } # prometheus metrics start # node.metrics = { # prometheus{ # enable=true # port="9527" # } # } # prometheus metrics end node { # trust node for solidity node # trustNode = "ip:port" trustNode = "127.0.0.1:50051" # expose extension api to public or not walletExtensionApi = true listen.port = 18888 connection.timeout = 2 fetchBlock.timeout = 200 tcpNettyWorkThreadNum = 0 udpNettyWorkThreadNum = 1 # Number of validate sign thread, default availableProcessors # validateSignThreadNum = 16 maxConnections = 30 minConnections = 8 minActiveConnections = 3 maxConnectionsWithSameIp = 2 maxHttpConnectNumber = 50 minParticipationRate = 15 isOpenFullTcpDisconnect = false inactiveThreshold = 600 //seconds p2p { version = 11111 # 11111: mainnet; 20180622: testnet } active = [ # Active establish connection in any case # Sample entries: # "ip:port", # "ip:port" ] passive = [ # Passive accept connection in any case # Sample entries: # "ip:port", # "ip:port" ] fastForward = [ "100.27.171.62:18888", "15.188.6.125:18888" ] http { fullNodeEnable = true fullNodePort = 8090 solidityEnable = true solidityPort = 8091 PBFTEnable = true PBFTPort = 8092 } rpc { enable = true port = 50051 solidityEnable = true solidityPort = 50061 PBFTEnable = true PBFTPort = 50071 # Number of gRPC thread, default availableProcessors / 2 # thread = 16 # The maximum number of concurrent calls permitted for each incoming connection # maxConcurrentCallsPerConnection = # The HTTP/2 flow control window, default 1MB # flowControlWindow = # Connection being idle for longer than which will be gracefully terminated maxConnectionIdleInMillis = 60000 # Connection lasting longer than which will be gracefully terminated # maxConnectionAgeInMillis = # The maximum message size allowed to be received on the server, default 4MB # maxMessageSize = # The maximum size of header list allowed to be received, default 8192 # maxHeaderListSize = # Transactions can only be broadcast if the number of effective connections is reached. minEffectiveConnection = 1 # The switch of the reflection service, effective for all gRPC services # reflectionService = true } # number of solidity thread in the FullNode. # If accessing solidity rpc and http interface timeout, could increase the number of threads, # The default value is the number of cpu cores of the machine. #solidity.threads = 8 # Limits the maximum percentage (default 75%) of producing block interval # to provide sufficient time to perform other operations e.g. broadcast block # blockProducedTimeOut = 75 # Limits the maximum number (default 700) of transaction from network layer # netMaxTrxPerSecond = 700 # Whether to enable the node detection function, default false # nodeDetectEnable = false # use your ipv6 address for node discovery and tcp connection, default false # enableIpv6 = false # if your node's highest block num is below than all your pees', try to acquire new connection. default false # effectiveCheckEnable = false # Dynamic loading configuration function, disabled by default # dynamicConfig = { # enable = false # Configuration file change check interval, default is 600 seconds # checkInterval = 600 # } dns { # dns urls to get nodes, url format tree://{pubkey}@{domain}, default empty treeUrls = [ #"tree://AKMQMNAJJBL73LXWPXDI4I5ZWWIZ4AWO34DWQ636QOBBXNFXH3LQS@main.trondisco.net", ] # enable or disable dns publish, default false # publish = false # dns domain to publish nodes, required if publish is true # dnsDomain = "nodes1.example.org" # dns private key used to publish, required if publish is true, hex string of length 64 # dnsPrivate = "b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291" # known dns urls to publish if publish is true, url format tree://{pubkey}@{domain}, default empty # knownUrls = [ #"tree://APFGGTFOBVE2ZNAB3CSMNNX6RRK3ODIRLP2AA5U4YFAA6MSYZUYTQ@nodes2.example.org", # ] # staticNodes = [ # static nodes to published on dns # Sample entries: # "ip:port", # "ip:port" # ] # merge several nodes into a leaf of tree, should be 1~5 # maxMergeSize = 5 # only nodes change percent is bigger then the threshold, we update data on dns # changeThreshold = 0.1 # dns server to publish, required if publish is true, only aws or aliyun is support # serverType = "aws" # access key id of aws or aliyun api, required if publish is true, string # accessKeyId = "your-key-id" # access key secret of aws or aliyun api, required if publish is true, string # accessKeySecret = "your-key-secret" # if publish is true and serverType is aliyun, it's endpoint of aws dns server, string # aliyunDnsEndpoint = "alidns.aliyuncs.com" # if publish is true and serverType is aws, it's region of aws api, such as "eu-south-1", string # awsRegion = "us-east-1" # if publish is true and server-type is aws, it's host zone id of aws's domain, string # awsHostZoneId = "your-host-zone-id" } # open the history query APIs(http&GRPC) when node is a lite fullNode, # like {getBlockByNum, getBlockByID, getTransactionByID...}. # default: false. # note: above APIs may return null even if blocks and transactions actually are on the blockchain # when opening on a lite fullnode. only open it if the consequences being clearly known openHistoryQueryWhenLiteFN = false jsonrpc { # Note: If you turn on jsonrpc and run it for a while and then turn it off, you will not # be able to get the data from eth_getLogs for that period of time. httpFullNodeEnable = true httpFullNodePort = 8545 httpSolidityEnable = true httpSolidityPort = 8555 httpPBFTEnable = true httpPBFTPort = 8565 # The maximum blocks range to retrieve logs for eth_getLogs, default value is 5000, # should be > 0, otherwise means no limit. maxBlockRange = 5000 # The maximum number of allowed topics within a topic criteria, default value is 1000, # should be > 0, otherwise means no limit. maxSubTopics = 1000 } # Disabled api list, it will work for http, rpc and pbft, both fullnode and soliditynode, # but not jsonrpc. # Sample: The setting is case insensitive, GetNowBlock2 is equal to getnowblock2 # # disabledApi = [ # "getaccount", # "getnowblock2" # ] } ## rate limiter config rate.limiter = { # Every api could be set a specific rate limit strategy. Three strategy are supported:GlobalPreemptibleAdapter、IPQPSRateLimiterAdapte、QpsRateLimiterAdapter # GlobalPreemptibleAdapter: permit is the number of preemptible resource, every client must apply one resourse # before do the request and release the resource after got the reponse automaticlly. permit should be a Integer. # QpsRateLimiterAdapter: qps is the average request count in one second supported by the server, it could be a Double or a Integer. # IPQPSRateLimiterAdapter: similar to the QpsRateLimiterAdapter, qps could be a Double or a Integer. # If do not set, the "default strategy" is set.The "default startegy" is based on QpsRateLimiterAdapter, the qps is set as 1000. # # Sample entries: # http = [ # { # component = "GetNowBlockServlet", # strategy = "GlobalPreemptibleAdapter", # paramString = "permit=1" # }, # { # component = "GetAccountServlet", # strategy = "IPQPSRateLimiterAdapter", # paramString = "qps=1" # }, # { # component = "ListWitnessesServlet", # strategy = "QpsRateLimiterAdapter", # paramString = "qps=1" # } ], rpc = [ # { # component = "protocol.Wallet/GetBlockByLatestNum2", # strategy = "GlobalPreemptibleAdapter", # paramString = "permit=1" # }, # { # component = "protocol.Wallet/GetAccount", # strategy = "IPQPSRateLimiterAdapter", # paramString = "qps=1" # }, # { # component = "protocol.Wallet/ListWitnesses", # strategy = "QpsRateLimiterAdapter", # paramString = "qps=1" # }, ] # global qps, default 50000 # global.qps = 50000 # IP-based global qps, default 10000 # global.ip.qps = 10000 } seed.node = { # List of the seed nodes # Seed nodes are stable full nodes # example: # ip.list = [ # "ip:port", # "ip:port" # ] ip.list = [ "3.225.171.164:18888", "52.8.46.215:18888", "3.79.71.167:18888", "108.128.110.16:18888", "18.133.82.227:18888", "35.180.81.133:18888", "13.210.151.5:18888", "18.231.27.82:18888", "3.12.212.122:18888", "52.24.128.7:18888", "15.207.144.3:18888", "3.39.38.55:18888", "54.151.226.240:18888", "35.174.93.198:18888", "18.210.241.149:18888", "54.177.115.127:18888", "54.254.131.82:18888", "18.167.171.167:18888", "54.167.11.177:18888", "35.74.7.196:18888", "52.196.244.176:18888", "54.248.129.19:18888", "43.198.142.160:18888", "3.0.214.7:18888", "54.153.59.116:18888", "54.153.94.160:18888", "54.82.161.39:18888", "54.179.207.68:18888", "18.142.82.44:18888", "18.163.230.203:18888", # "[2a05:d014:1f2f:2600:1b15:921:d60b:4c60]:18888", // use this if support ipv6 # "[2600:1f18:7260:f400:8947:ebf3:78a0:282b]:18888", // use this if support ipv6 ] } genesis.block = { # Reserve balance assets = [ { accountName = "Zion" accountType = "AssetIssue" address = "TLLM21wteSPs4hKjbxgmH1L6poyMjeTbHm" balance = "99000000000000000" }, { accountName = "Sun" accountType = "AssetIssue" address = "TXmVpin5vq5gdZsciyyjdZgKRUju4st1wM" balance = "0" }, { accountName = "Blackhole" accountType = "AssetIssue" address = "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy" balance = "-9223372036854775808" } ] witnesses = [ { address: THKJYuUmMKKARNf7s2VT51g5uPY6KEqnat, url = "http://GR1.com", voteCount = 100000026 }, { address: TVDmPWGYxgi5DNeW8hXrzrhY8Y6zgxPNg4, url = "http://GR2.com", voteCount = 100000025 }, { address: TWKZN1JJPFydd5rMgMCV5aZTSiwmoksSZv, url = "http://GR3.com", voteCount = 100000024 }, { address: TDarXEG2rAD57oa7JTK785Yb2Et32UzY32, url = "http://GR4.com", voteCount = 100000023 }, { address: TAmFfS4Tmm8yKeoqZN8x51ASwdQBdnVizt, url = "http://GR5.com", voteCount = 100000022 }, { address: TK6V5Pw2UWQWpySnZyCDZaAvu1y48oRgXN, url = "http://GR6.com", voteCount = 100000021 }, { address: TGqFJPFiEqdZx52ZR4QcKHz4Zr3QXA24VL, url = "http://GR7.com", voteCount = 100000020 }, { address: TC1ZCj9Ne3j5v3TLx5ZCDLD55MU9g3XqQW, url = "http://GR8.com", voteCount = 100000019 }, { address: TWm3id3mrQ42guf7c4oVpYExyTYnEGy3JL, url = "http://GR9.com", voteCount = 100000018 }, { address: TCvwc3FV3ssq2rD82rMmjhT4PVXYTsFcKV, url = "http://GR10.com", voteCount = 100000017 }, { address: TFuC2Qge4GxA2U9abKxk1pw3YZvGM5XRir, url = "http://GR11.com", voteCount = 100000016 }, { address: TNGoca1VHC6Y5Jd2B1VFpFEhizVk92Rz85, url = "http://GR12.com", voteCount = 100000015 }, { address: TLCjmH6SqGK8twZ9XrBDWpBbfyvEXihhNS, url = "http://GR13.com", voteCount = 100000014 }, { address: TEEzguTtCihbRPfjf1CvW8Euxz1kKuvtR9, url = "http://GR14.com", voteCount = 100000013 }, { address: TZHvwiw9cehbMxrtTbmAexm9oPo4eFFvLS, url = "http://GR15.com", voteCount = 100000012 }, { address: TGK6iAKgBmHeQyp5hn3imB71EDnFPkXiPR, url = "http://GR16.com", voteCount = 100000011 }, { address: TLaqfGrxZ3dykAFps7M2B4gETTX1yixPgN, url = "http://GR17.com", voteCount = 100000010 }, { address: TX3ZceVew6yLC5hWTXnjrUFtiFfUDGKGty, url = "http://GR18.com", voteCount = 100000009 }, { address: TYednHaV9zXpnPchSywVpnseQxY9Pxw4do, url = "http://GR19.com", voteCount = 100000008 }, { address: TCf5cqLffPccEY7hcsabiFnMfdipfyryvr, url = "http://GR20.com", voteCount = 100000007 }, { address: TAa14iLEKPAetX49mzaxZmH6saRxcX7dT5, url = "http://GR21.com", voteCount = 100000006 }, { address: TBYsHxDmFaRmfCF3jZNmgeJE8sDnTNKHbz, url = "http://GR22.com", voteCount = 100000005 }, { address: TEVAq8dmSQyTYK7uP1ZnZpa6MBVR83GsV6, url = "http://GR23.com", voteCount = 100000004 }, { address: TRKJzrZxN34YyB8aBqqPDt7g4fv6sieemz, url = "http://GR24.com", voteCount = 100000003 }, { address: TRMP6SKeFUt5NtMLzJv8kdpYuHRnEGjGfe, url = "http://GR25.com", voteCount = 100000002 }, { address: TDbNE1VajxjpgM5p7FyGNDASt3UVoFbiD3, url = "http://GR26.com", voteCount = 100000001 }, { address: TLTDZBcPoJ8tZ6TTEeEqEvwYFk2wgotSfD, url = "http://GR27.com", voteCount = 100000000 } ] timestamp = "0" #2017-8-26 12:00:00 parentHash = "0xe58f33f9baf9305dc6f82b9f1934ea8f0ade2defb951258d50167028c780351f" } // Optional.The default is empty. // It is used when the witness account has set the witnessPermission. // When it is not empty, the localWitnessAccountAddress represents the address of the witness account, // and the localwitness is configured with the private key of the witnessPermissionAddress in the witness account. // When it is empty,the localwitness is configured with the private key of the witness account. //localWitnessAccountAddress = localwitness = [ ] #localwitnesskeystore = [ # "localwitnesskeystore.json" #] block = { needSyncCheck = true maintenanceTimeInterval = 21600000 proposalExpireTime = 259200000 // 3 day: 259200000(ms) } # Transaction reference block, default is "solid", configure to "head" may cause TaPos error # trx.reference.block = "solid" // head;solid; # This property sets the number of milliseconds after the creation of the transaction that is expired, default value is 60000. # trx.expiration.timeInMilliseconds = 60000 vm = { supportConstant = true maxEnergyLimitForConstant = 100000000 minTimeRatio = 0.0 maxTimeRatio = 5.0 saveInternalTx = true # Indicates whether the node stores featured internal transactions, such as freeze, vote and so on saveFeaturedInternalTx = true # Indicates whether the node stores the details of the internal transactions generated by the # CANCELALLUNFREEZEV2 opcode, such as bandwidth/energy/tronpower cancel amount. # saveCancelAllUnfreezeV2Details = false # In rare cases, transactions that will be within the specified maximum execution time (default 10(ms)) are re-executed and packaged # longRunningTime = 10 # Indicates whether the node support estimate energy API. # estimateEnergy = false # Indicates the max retry time for executing transaction in estimating energy. # estimateEnergyMaxRetry = 3 } committee = { allowCreationOfContracts = 0 //mainnet:0 (reset by committee),test:1 allowAdaptiveEnergy = 0 //mainnet:0 (reset by committee),test:1 } event.subscribe = { native = { useNativeQueue = true // if true, use native message queue, else use event plugin. bindport = 5555 // bind port sendqueuelength = 1000 //max length of send queue } version = 1 # Specify the starting block number to sync historical events. This is only applicable when version = 1. # After performing a full event sync, set this value to 0 or a negative number. startSyncBlockNum = 1 #startSyncBlockNum = 8418291 path = "" // absolute path of plugin server = "" // target server address to receive event triggers // dbname|username|password, if you want to create indexes for collections when the collections // are not exist, you can add version and set it to 2, as dbname|username|password|version // if you use version 2 and one collection not exists, it will create index automaticaly; // if you use version 2 and one collection exists, it will not create index, you must create index manually; dbconfig = "" contractParse = true topics = [ { triggerName = "block" // block trigger, the value can't be modified enable = false topic = "block" // plugin topic, the value could be modified solidified = false // if set true, just need solidified block, default is false }, { triggerName = "transaction" enable = false topic = "transaction" solidified = false ethCompatible = false // if set true, add transactionIndex, cumulativeEnergyUsed, preCumulativeLogCount, logList, energyUnitPrice, default is false }, { triggerName = "contractevent" enable = true topic = "contractevent" }, { triggerName = "contractlog" enable = true topic = "contractlog" redundancy = true // if set true, contractevent will also be regarded as contractlog }, { triggerName = "solidity" // solidity block trigger(just include solidity block number and timestamp), the value can't be modified enable = true // the default value is true topic = "solidity" }, { triggerName = "solidityevent" enable = true topic = "solidityevent" }, { triggerName = "soliditylog" enable = true topic = "soliditylog" redundancy = false // if set true, solidityevent will also be regarded as soliditylog } ] filter = { fromblock = "" // the value could be "", "earliest" or a specified block number as the beginning of the queried range toblock = "" // the value could be "", "latest" or a specified block number as end of the queried range contractAddress = [ "" // contract address you want to subscribe, if it's set to "", you will receive contract logs/events with any contract address. ] contractTopic = [ "" // contract topic you want to subscribe, if it's set to "", you will receive contract logs/events with any contract topic. ] } }the snapshot from [http://35.247.128.170/backup20250822/]
--------------log-------------------
14:41:48.082 INFO [history-event] [event](RealtimeEventService.java:73) Flush realtime event Num:1413,ID:00000000000005854ba75e411fc487beaf2466bff9d7f1cf644778090a965912 14:41:48.082 INFO [history-event] [event](SolidEventService.java:70) Flush solid event Num:1413,ID:00000000000005854ba75e411fc487beaf2466bff9d7f1cf644778090a965912 14:41:48.105 ERROR [history-event] [event](HistoryEventService.java:75) History event service fail. at org.tron.core.services.event.BlockEventGet.getContractTrigger(BlockEventGet.java:102) at org.tron.core.services.event.BlockEventGet.getBlockEvent(BlockEventGet.java:78) at org.tron.core.services.event.HistoryEventService.syncEvent(HistoryEventService.java:64) at org.tron.core.services.event.HistoryEventService.lambda$init$0(HistoryEventService.java:40)14:44:46.460 INFO [history-event] [event](SolidEventService.java:70) Flush solid event Num:1552,ID:0000000000000610672609fc1ff968fa0372b5638e1d4fbf1cfdf47c9e2ce6bd 14:44:46.481 INFO [history-event] [event](RealtimeEventService.java:73) Flush realtime event Num:1553,ID:00000000000006118ee8778b226c6c853b3434ab9f5c16464750a7c2910334ab 14:44:46.481 INFO [history-event] [event](SolidEventService.java:70) Flush solid event Num:1553,ID:00000000000006118ee8778b226c6c853b3434ab9f5c16464750a7c2910334ab 14:44:46.503 ERROR [history-event] [event](HistoryEventService.java:75) History event service fail. at org.tron.core.services.event.BlockEventGet.getContractTrigger(BlockEventGet.java:102) at org.tron.core.services.event.BlockEventGet.getBlockEvent(BlockEventGet.java:78) at org.tron.core.services.event.HistoryEventService.syncEvent(HistoryEventService.java:64) at org.tron.core.services.event.HistoryEventService.lambda$init$0(HistoryEventService.java:40)@zjwei0421 There may be no transaction information at the beginning of the original data or the storage method may be inconsistent. If you want to start syncing from 0, it is recommended to deploy a node and re-sync the block.
A null pointer exception also occurs when startSyncBlockNum is 8418291.
-----------------log---------------------14:59:01.430 INFO [main] [o.e.j.s.Server](Server.java:415) Started @62241ms 14:59:01.430 INFO [main] [service](AbstractService.java:27) HttpApiOnPBFTService started, listening on 8092 14:59:01.430 INFO [main] [app](ServiceContainer.java:52) All api services started. 14:59:01.430 INFO [main] [event](EventService.java:30) Start to load eventPlugin. true, 1, 8418292 block: false, false trx: false, false, false event: true, false log: true, true, false, false solid: false 14:59:01.431 INFO [main] [event](HistoryEventService.java:43) History event service start. 14:59:01.434 INFO [main] [consensus](ConsensusService.java:85) consensus service start success 14:59:01.440 INFO [main] [net](NodePersistService.java:57) Read node from store: 30 nodes 14:59:01.442 INFO [main] [net](TronNetService.java:199) Local ipv4: 47.96.106.209 14:59:01.443 INFO [main] [net](TronNetService.java:200) Local ipv6: null 14:59:01.461 ERROR [history-event] [event](HistoryEventService.java:75) History event service fail. java.lang.NullPointerException: null at org.tron.core.services.event.BlockEventGet.getContractTrigger(BlockEventGet.java:102) at org.tron.core.services.event.BlockEventGet.getBlockEvent(BlockEventGet.java:78) at org.tron.core.services.event.HistoryEventService.syncEvent(HistoryEventService.java:64) at org.tron.core.services.event.HistoryEventService.lambda$init$0(HistoryEventService.java:40) at java.lang.Thread.run(Thread.java:748) 14:59:01.483 INFO [PeerServer] [net](PeerServer.java:60) TCP listener started, bind port 18888 14:59:01.499 INFO [main] [net](PublishService.java:108) Dns publish service is disable 14:59:01.500 INFO [main] [net](P2pService.java:32) P2p service started 14:59:01.509 INFO [DiscoverServer] [net](DiscoverServer.java:74) Discovery server started, bind port 18888 14:59:01.514 INFO [main] [net](ResilienceService.java:58) OpenFullTcpDisconnect is disabled
It appears that the
resultis null. I've also noticed that in thegetTransactionInfoByBlockNummethod in Wallet.java,public TransactionInfoList getTransactionInfoByBlockNum(long blockNum) { when getTransactionRetStore is empty, it retrieves data from getTransactionHistoryStore. We might be able to resolve this issue by utilizing the
getTransactionInfoByBlockNummethod.Have any specific modification suggestions? I will try to build again.
@zjwei0421 After your node is started, access this interface locally to see if you can get the data: http://127.0.0.1:8090/wallet/gettransactioninfobyblocknum?num=342
The returned result is as follows:
[ { "fee": 100000, "blockNumber": 342, "contractResult": [ "" ], "blockTimeStamp": 1529892564000, "receipt": { "net_fee": 100000 }, "id": "5281eb99b3cab6b3cb4777e6b070df936f2cb068163fb8f3959a1cd88733a4c2" } ]@zjwei0421 Try deploying a node and syncing from block 0 to see if there is still a problem.
syncing from block 0 should be no problem
:59:45.545 INFO [solid-event] [event](BlockEventCache.java:86) Get solid events 786, 0000000000000327cff9a9cc4821f9054311a580b7e2f100cb5a8878a3dba4f3 16:59:45.545 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:787,ID:000000000000031374113709ab42a61a23cd7e3110d8e9d657b39dd8daa58261 16:59:45.545 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:788,ID:00000000000003149933b6907913f2d931607d2f8dc6b70996deb31ed41847f8 16:59:45.545 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:789,ID:00000000000003153cf87a695a22d55ffe96263af5fb9c1e4c419a12138a32e0 16:59:45.545 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:790,ID:00000000000003166a050c4cfdb484dff1fcda0d9b0885411005aabea7060437 16:59:45.545 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:791,ID:0000000000000317cc8974f372d9296e18d74f77f843d4ba073161fb1c4f3a01 16:59:45.545 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:792,ID:0000000000000318735bf0f5d58ab01e59745e83c8998132d5d47564edf7ba39 16:59:45.545 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:793,ID:000000000000031979089007261f079d254bb3cd970cd3747e465a64f4df6183 16:59:45.545 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:794,ID:000000000000031a0bfd90a9c1ea8f5e072a53cf1777d24ebca774537c6c3f5f 16:59:45.545 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:795,ID:000000000000031b4fb00b17c7d2ad7dd0c33aa87198f77a8b13d03ad9ad94af 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:796,ID:000000000000031c6b27958bff0b46104c8d617ee2e8637e5cb57864e64e9cd7 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:797,ID:000000000000031d988dccd27b9d2b0ac4ecc0b665bc6017c028fbc4068ba907 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:798,ID:000000000000031ed821373cf631f63b396ca1c69e21128f3a874deeff32b362 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:799,ID:000000000000031f25c058b86fb1d47166fc4fdc51da4cdbebecf306faa79b3c 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:800,ID:00000000000003202158f7f54de49b6f20a368934ed89557a985c56e1f69f74f 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:801,ID:0000000000000321a902535036d9f3b4e20a7458f26674e5caf9d27b5be557ac 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:802,ID:00000000000003227aba21d6220b1fb52b69947aa754dfa32689b9336a56d85a 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:803,ID:00000000000003232a40ca070c468a9f1c5adf358ff52ce220b2399d924f58c1 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:804,ID:00000000000003243f9a668337a470288f7827d3f8667fece7e00440c2b7222f 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:805,ID:0000000000000325ed0961810201362c918bfe0a76091c3fbe84b00eb8e75bdf 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:806,ID:0000000000000326d743132a5c4eecc2c00db1fb367a8f72d295db5525e43f57 16:59:45.546 INFO [solid-event] [event](SolidEventService.java:70) Flush solid event Num:807,ID:0000000000000327cff9a9cc4821f9054311a580b7e2f100cb5a8878a3dba4f3 16:59:45.546 INFO [solid-event] [event](BlockEventCache.java:74) Remove solidId Num:807,ID:0000000000000327cff9a9cc4821f9054311a580b7e2f100cb5a8878a3dba4f3, solidNum 786, 40, 40 16:59:45.619 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:826,ID:000000000000033a8d53568814049010c0b9f18550443fb4e41ee792c8b6510e, Num:825,ID:0000000000000339690525eacbd8946afca8b1bac05e94ec96d4a091973e7ab6, Num:809,ID:00000000000003299a0a0c8c77bba1fb3baf58bd0a18b5ba85d971392714bb10 16:59:45.619 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:827,ID:000000000000033b3920f334737d02bb52e77c3d3a1c928ebb0ec10735420244, Num:826,ID:000000000000033a8d53568814049010c0b9f18550443fb4e41ee792c8b6510e, Num:809,ID:00000000000003299a0a0c8c77bba1fb3baf58bd0a18b5ba85d971392714bb10 16:59:45.724 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:828,ID:000000000000033c2eeadd98f07165277c558eda9c1f923302b112e7c26e1dad, Num:827,ID:000000000000033b3920f334737d02bb52e77c3d3a1c928ebb0ec10735420244, Num:811,ID:000000000000032b734b9559989a4314bd89875f68f1aa2621fc17368cca84ec 16:59:45.724 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:829,ID:000000000000033d7693255de7fb116fefaeeee86a3498651df86715199003bd, Num:828,ID:000000000000033c2eeadd98f07165277c558eda9c1f923302b112e7c26e1dad, Num:811,ID:000000000000032b734b9559989a4314bd89875f68f1aa2621fc17368cca84ec 16:59:45.835 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:830,ID:000000000000033e95835dd52b350efb42a622301bde537751196b4fd49a5109, Num:829,ID:000000000000033d7693255de7fb116fefaeeee86a3498651df86715199003bd, Num:813,ID:000000000000032d80783e379172f106565f4aea9c67a61aed0ff68cd9d9c935 16:59:45.835 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:831,ID:000000000000033f0c78d46ec7caeb253a54b7bdf6eb6e71abd574ae0635d1ef, Num:830,ID:000000000000033e95835dd52b350efb42a622301bde537751196b4fd49a5109, Num:813,ID:000000000000032d80783e379172f106565f4aea9c67a61aed0ff68cd9d9c935 16:59:45.956 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:832,ID:0000000000000340426d2d22dbea95e26079a09c588bdc755ecfd400cbed2f8a, Num:831,ID:000000000000033f0c78d46ec7caeb253a54b7bdf6eb6e71abd574ae0635d1ef, Num:815,ID:000000000000032fb2c912b7defdd1a301baa419fdf05f784d2f9d3c11b2155f 16:59:45.956 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:833,ID:000000000000034168e1982ce453c8559962ef45d76d866a693a6366d7cac6e3, Num:832,ID:0000000000000340426d2d22dbea95e26079a09c588bdc755ecfd400cbed2f8a, Num:815,ID:000000000000032fb2c912b7defdd1a301baa419fdf05f784d2f9d3c11b2155f 16:59:46.079 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:834,ID:000000000000034267cb879efa007e8b8bc2e0534f024c3022d94c1a4a6bf2dc, Num:833,ID:000000000000034168e1982ce453c8559962ef45d76d866a693a6366d7cac6e3, Num:817,ID:0000000000000331838cb28f64d0320096a307ac596c7973b17f92ba8f56b1fc 16:59:46.079 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:835,ID:00000000000003432716d3a9d9546d343e924022a3c453b65f6b77844e45abf7, Num:834,ID:000000000000034267cb879efa007e8b8bc2e0534f024c3022d94c1a4a6bf2dc, Num:817,ID:0000000000000331838cb28f64d0320096a307ac596c7973b17f92ba8f56b1fc 16:59:46.190 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:836,ID:000000000000034428b6b092e326d085c37a481dc14cc95df19321a054ad5d41, Num:835,ID:00000000000003432716d3a9d9546d343e924022a3c453b65f6b77844e45abf7, Num:819,ID:00000000000003331ea1e475c35efc8790937ad6a6e060a20cb0182532360add 16:59:46.190 INFO [event-load] [event](BlockEventCache.java:46) Add block event, Num:837,ID:0000000000000345df326f60aeed17b81a0049802ca5c1d4ff2962317181035c, Num:836,ID:000000000000034428b6b092e326d085c37a481dc14cc95df19321a054ad5d41, Num:819,ID:00000000000003331ea1e475c35efc8790937ad6a6e060a20cb0182532360add@zjwei0421 It is recommended that you start two nodes, one to synchronize real-time data and one to synchronize historical data. The node that synchronizes historical data starts synchronizing blocks from 0.
Can two services point to the same database?
Regarding the null pointer exception problem, is there any way to simply modify it so that it can be synchronized from the historical node? I will modify and build the clone code here.Can two services point to the same database? Regarding the null pointer exception problem, is there any way to simply modify it so that it can be synchronized from the historical node? I will modify and build the clone code here.
They can point to the same database.
You could try replacing the getTransactionInfoByBlockNum function used in BlockEventGet with Wallet's getTransactionInfoByBlockNum function and try again. It's unclear if this is the cause of this issue.
4 remaining items
@m08418769-gif If you only configure one SR, there is a possibility of triggering concurrent access issues when processing the last block. You can restart the node and try again, or configure the number of SRs to be greater than 1.
- linked a pull request that will close this issuefet(event): optimize event service to obtain transaction information #6443
on Sep 15, 2025 - addedtopic:event subscribetransaction trigger, block trigger, contract event, contract logtransaction trigger, block trigger, contract event, contract log
on Sep 15, 2025 - added a parent issue
on Sep 15, 2025 the snapshot from [http://35.247.128.170/backup20250822/]
Why did I get no transaction data for block heights before 11015604 when I directly parsed the LevelDB database of a Tron FullNode that I started from a snapshot?
For example, org.iq80.leveldb.DB.get(BigEndian(11015603)) returns null, but get(BigEndian(110156034+) calls for block heights 11015604 and later have data.The previous data is stored in the history database, and we will do compatibility processing in this PR #6453
I also checked the transactionHistoryStore directory, but there was no data.
- linked a pull request that will close this issuefeat(db): optimize the compatibility of obtaining transaction info #6453
on Sep 25, 2025 Hello, How can I solve this problem?
The Problem
I am trying to open a Tron LevelDB database using Java, but it is failing. The application log shows a Corruption error, indicating that one or more files are missing from the database directory, preventing it from opening.[2025-09-25 13:30:17,194] [INFO] [main] [c.z.f.t.etl.db.config.LevelDBConfig] 🔧 Initializing LevelDB lazy-loading configuration... [2025-09-25 13:30:17,196] [INFO] [main] [c.z.f.t.etl.db.config.LevelDBConfig] ✅ LevelDB lazy-loading initialization complete, will open on first access [2025-09-25 13:30:32,162] [ERROR] [main] [c.z.f.t.etl.db.config.LevelDBConfig] ❌ Failed to open LevelDB [block]: Corruption: 1 missing files; e.g.: ./tron/output-directory/database/block/362907.sst [2025-09-25 13:30:32,163] [WARN] [main] [c.z.f.t.etl.db.config.LevelDBConfig] Remaining retries: 2 [2025-09-25 13:30:40,967] [ERROR] [main] [c.z.f.t.etl.db.config.LevelDBConfig] ❌ Failed to open LevelDB [block]: Corruption: 1 missing files; e.g.: ./tron/output-directory/database/block/362907.sst [2025-09-25 13:30:40,967] [WARN] [main] [c.z.f.t.etl.db.config.LevelDBConfig] Remaining retries: 1 [2025-09-25 13:30:49,637] [ERROR] [main] [c.z.f.t.etl.db.config.LevelDBConfig] ❌ Failed to open LevelDB [block]: Corruption: 1 missing files; e.g.: /tron/output-directory/database/block/362907.sst [2025-09-25 13:30:49,645] [WARN] [main] [o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'syncParseService': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to open block DB [2025-09-25 13:30:49,646] [INFO] [main] [c.z.f.t.etl.db.config.LevelDBConfig] 🛑 Shutting down all LevelDB instances...Can this issue be fixed?
Tron LevelDB database using Java@zjwei0421 Tron uses leveldbjni-all for LevelDB . Which version are you using? For offline database reading, you can refer to the plugins module.
Hi @zjwei0421, just checking in — Do you have any remaining questions?
Since this issue has already been fixed in PR #6443 and #6453 and will be included in the upcoming release v4.8.1, we will close the issue if there are no further concerns. Thanks.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Software Versions
OS : Linux
JVM : Oracle Corporation 1.8.0_202 amd64
Git : 72e31d9
Version : 4.8.0
Code : 18631
Expected behaviour
eth_getLogs will return results.
synchronizing events from specific historical blocks
------------start.sh-------------
---------------main_net_config.conf--------------------
-------------------log----------------------
Actual behaviour
eth_getLogs will return results.
Frequency
The problem could not be recovered after 3 attempts.
Steps to reproduce the behaviour
Backtrace
When submitting logs: please submit them as text and not screenshots.