HelixNetwork / pendulum

Pendulum is a distributed messaging protocol that enables globally available tamper proof timestamps :hourglass_flowing_sand:
https://dev.hlx.ai
Other
10 stars 6 forks source link

Entry point failed consistency check exception at node start-up #143

Closed dzhelezov closed 4 years ago

dzhelezov commented 4 years ago

To reproduce: run a fresh node, v 0.6.2

Observe the following exception in the logs:

java.lang.IllegalStateException: entry point failed consistency check: 0000000000000000000000000000000000000000000000000000000000000000
backend_1  |  at net.helix.hlx.service.tipselection.impl.WalkerAlpha.walk(WalkerAlpha.java:69) ~[helix-0.6.2.jar:na]
backend_1  |  at net.helix.hlx.service.tipselection.impl.TipSelectorImpl.getTransactionsToApprove(TipSelectorImpl.java:97) ~[helix-0.6.2.jar:na]
backend_1  |  at net.helix.hlx.service.stats.TransactionStatsPublisher.getSuperTip(TransactionStatsPublisher.java:89) ~[helix-0.6.2.jar:na]
backend_1  |  at net.helix.hlx.service.stats.TransactionStatsPublisher.getConfirmedTransactionsCount(TransactionStatsPublisher.java:96) ~[helix-0.6.2.jar:na]
backend_1  |  at net.helix.hlx.service.stats.TransactionStatsPublisher.lambda$getRunnable$0(TransactionStatsPublisher.java:69) ~[helix-0.6.2.jar:na]
backend_1  |  at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
cristina-vasiu commented 4 years ago

I could reproduced it only if the zmq is enabled, when the network has just started, the tangle does not contain transactions, because of this if tips are needed walker can not travers a null tree, I have modified so if there are not any saved rounds into tangle then NULL_HASH transaction will be returned

oracle58 commented 4 years ago

Yeah, as Cristina says, the transaction stats publisher in which the error is thrown, gets only launched with ZMQ (as its only task is to publish tps/ctps to message queue). As soon as the first milestone is solidified and accepted, the stats publisher works without exception, but nevertheless it is not expected behavior that an error is thrown on startup, so thank you very much for the fix.