seredat / karbowanec

Karbo (Karbovanets) - Digital Exchange Medium - cryptocurrency made in Ukraine, CryptoNote protocol implementation.
https://karbo.io/
Other
103 stars 65 forks source link

PaymentGate doesn't sync after update to 1.6.3 #70

Closed g1itch closed 4 years ago

g1itch commented 5 years ago

Hello.

After update to 1.6.3 PaymentGate doesn't sync and stops itself soon after start. Relevant messages in debug.log:

2018-Dec-19 12:54:27.547216 DEBUG   Starting blockchain synchronization...
2018-Dec-19 12:54:27.547230 DEBUG   Shortest chain size 300449
2018-Dec-19 12:54:27.547246 DEBUG   Common history: start block index 0, sparse chain size 29
2018-Dec-19 12:54:27.547389 INFO    Stopping container
2018-Dec-19 12:54:27.547398 DEBUG   Blocks received, start index 300447, count 1
2018-Dec-19 12:54:27.547437 DEBUG   onIdle started
2018-Dec-19 12:54:27.547442 DEBUG   Process blocks, start index 300447, count 1
2018-Dec-19 12:54:27.547459 DEBUG   Selected peer: 13802333634095169194 51.15.203.255:32347 [white=1] last_seen: d16.h11.m23.s26
2018-Dec-19 12:54:27.547483 DEBUG   Connecting to 51.15.203.255:32347 (white=1, last_seen: d16.h11.m23.s26)...
2018-Dec-19 12:54:27.547499 DEBUG   No new blocks received. Consumers not updated
2018-Dec-19 12:54:27.547519 DEBUG   Blockchain updated, resume blockchain synchronization
2018-Dec-19 12:54:27.547522 DEBUG   Refresh is started
2018-Dec-19 12:54:27.547539 ERROR   WalletGreen is already stopped
2018-Dec-19 12:54:27.547577 DEBUG   refresh is stopped: The operation you've requested has been cancelled
2018-Dec-19 12:54:27.547645 DEBUG   Stopping BlockchainSynchronizer
2018-Dec-19 12:54:27.547664 INFO    Stopping...
2018-Dec-19 12:54:27.647663 DEBUG   Last block hash 51124c37d3e6507b3288470971d00e6f3c0e2f37dc78cc6bd02b9bf12c55cfff
2018-Dec-19 12:54:27.647776 WARNING Block processing is interrupted
2018-Dec-19 12:54:27.647887 DEBUG   Working thread stopped
2018-Dec-19 12:54:27.648031 INFO    Stopped
2018-Dec-19 12:54:27.649827 INFO    Consumer removed, consumer 0x55c49ce8e0c0, count 0
2018-Dec-19 12:54:27.695025 TRACE   onSynchronizationProgressUpdated processedBlockCount 300448, totalBlockCount 300448
2018-Dec-19 12:54:27.695072 TRACE   onSynchronizationCompleted
2018-Dec-19 12:54:27.695088 INFO    Container shut down
2018-Dec-19 12:54:27.695187 INFO    Stopping...
2018-Dec-19 12:54:27.695216 INFO    Stopped
2018-Dec-19 12:54:27.695241 INFO    Stopping...
2018-Dec-19 12:54:27.695265 INFO    Stopped

Removing block*.dat and resyncing from scratch isn't working.

aivve commented 5 years ago

You can either run karbowanecd --rollback 300000 or download bootstrap from https://bootstrap.karbo.io/ and resync

g1itch commented 5 years ago

I cannot resync from scratch. It's an issue. If it doesn't sync from scratch (without any specially prepared bootstrap), it's not a blockchain.

aivve commented 5 years ago

then use rollback if you stuck on alt. chain, you can also stick to it

g1itch commented 5 years ago

Fatal error: unrecognised option '--rollback'

aivve commented 5 years ago

Any success? Please try to rebuild, we added few more fixes to sync issues. Sync from scratch should definitely work, bootstrap is for convenience as it is faster than sync. If your node stuck at some point, rollback command will help you out.

aivve commented 5 years ago

If you don't have --rollback are you sure you have latest version?

g1itch commented 5 years ago

1.6.3 latest release log:

2018-Dec-19 18:12:24.045199 INFO    walletd v1.6.3.815 ()
2018-Dec-19 18:12:24.045787 INFO    Starting Payment Gate with local node
2018-Dec-19 18:12:24.046511 DEBUG   Fetching DNS checkpoint records from checkpoints.karbo.org
2018-Dec-19 18:14:54.723446 INFO    initializing p2pNode
2018-Dec-19 18:14:54.752429 TRACE   Added seed node: 45.77.55.161:32347 (seed1.karbowanec.com)
2018-Dec-19 18:14:54.756466 TRACE   Added seed node: 104.31.72.68:32347 (seed2.karbowanec.com)
2018-Dec-19 18:14:54.964708 TRACE   Added seed node: 45.77.55.161:32347 (seed.karbo.cloud)
2018-Dec-19 18:14:55.001765 TRACE   Added seed node: 104.207.130.36:32347 (seed.karbo.org)
2018-Dec-19 18:14:55.047623 TRACE   Added seed node: 108.61.198.115:32347 (seed.karbo.io)
2018-Dec-19 18:14:55.047765 TRACE   Added seed node: 95.46.98.64:32347 (95.46.98.64)
2018-Dec-19 18:14:55.047852 TRACE   Added seed node: 108.61.198.115:32347 (108.61.198.115)
2018-Dec-19 18:14:55.047928 TRACE   Added seed node: 45.32.232.11:32347 (45.32.232.11)
2018-Dec-19 18:14:55.048000 TRACE   Added seed node: 46.149.182.151:32347 (46.149.182.151)
2018-Dec-19 18:14:55.048102 INFO    Generated new peer ID: 8401230855690290309
2018-Dec-19 18:14:55.048204 INFO    Network: d6482c89-bc2d-5b81-aa9a-bdf1d7317dc3
2018-Dec-19 18:14:55.048291 INFO    Binding on 0.0.0.0:32347
2018-Dec-19 18:14:55.048416 INFO    Net service binded on 0.0.0.0:32347
2018-Dec-19 18:14:55.048499 INFO    Attempting to add IGD port mapping.
2018-Dec-19 18:14:56.061283 INFO    Added IGD port mapping.
2018-Dec-19 18:14:56.061458 INFO    initializing core
2018-Dec-19 18:14:56.061786 INFO    Blockchain not loaded, generating genesis block.
2018-Dec-19 18:14:56.062079 DEBUG   +++++ BLOCK SUCCESSFULLY ADDED
2018-Dec-19 18:14:56.062079 DEBUG   id: 3125b79e4a42f8d4d2fc4dffea8442e185ebda940ecd4d3b449056a4ea0efea4
2018-Dec-19 18:14:56.062079 DEBUG   PoW:    0000000000000000000000000000000000000000000000000000000000000000
2018-Dec-19 18:14:56.062079 DEBUG   HEIGHT 0, difficulty:   1
2018-Dec-19 18:14:56.062079 DEBUG   block reward: 38.146972656250, fee = 0.000000000000, coinbase_blob_size: 80, cumulative size: 80, 0(0/0)ms
2018-Dec-19 18:14:56.062333 INFO    Blockchain initialized. last block: 0, d2359.h11.m14.s56 time ago, current difficulty: 1
2018-Dec-19 18:14:56.062583 INFO    node is inited successfully
2018-Dec-19 18:14:56.062873 INFO    Starting core rpc server on 127.0.0.1:32348
2018-Dec-19 18:14:56.063099 INFO    Core rpc server started ok
2018-Dec-19 18:14:56.063195 INFO    Spawning p2p server
2018-Dec-19 18:14:56.063314 INFO    Starting node_server
2018-Dec-19 18:14:56.063514 INFO    Loading wallet
2018-Dec-19 18:14:56.063597 INFO    Loading container...
2018-Dec-19 18:14:56.084560 DEBUG   Container keys were successfully loaded
2018-Dec-19 18:14:56.084600 INFO    Consumer added, consumer 0x5633abda29d0, count 1
2018-Dec-19 18:14:56.270691 INFO    Loading...
2018-Dec-19 18:14:56.270746 INFO    Loaded
2018-Dec-19 18:14:56.290362 DEBUG   Repair finished
2018-Dec-19 18:14:56.290407 DEBUG   Container cache loaded
2018-Dec-19 18:14:56.290516 INFO    Known Transfers 136
2018-Dec-19 18:14:56.345408 DEBUG   Starting BlockchainSynchronizer
2018-Dec-19 18:14:56.345453 INFO    Starting...
2018-Dec-19 18:14:56.345522 INFO    Container loaded, view public key [..snip..]
2018-Dec-19 18:14:56.345683 INFO    Wallet loading is finished.
2018-Dec-19 18:14:56.345574 DEBUG   Working thread started
2018-Dec-19 18:14:56.345746 INFO    Removing outdated pool transactions...
2018-Dec-19 18:14:56.345782 DEBUG   Pool union size 0, intersection size 0
2018-Dec-19 18:14:56.345877 DEBUG   Outdated pool transactions received, 0:{}
2018-Dec-19 18:14:56.345907 INFO    Outdated pool transactions processed
2018-Dec-19 18:14:56.345937 DEBUG   Starting blockchain synchronization...
2018-Dec-19 18:14:56.345950 DEBUG   Shortest chain size 300449
2018-Dec-19 18:14:56.345963 DEBUG   Common history: start block index 0, sparse chain size 1
2018-Dec-19 18:14:56.345990 INFO    Stopping container
2018-Dec-19 18:14:56.346027 DEBUG   onIdle started
2018-Dec-19 18:14:56.346043 DEBUG   Connecting to 45.32.232.11:32347 (white=1, last_seen: never)...
2018-Dec-19 18:14:56.346068 DEBUG   Blocks received, start index 0, count 1
2018-Dec-19 18:14:56.346084 DEBUG   Refresh is started
2018-Dec-19 18:14:56.346102 DEBUG   Process blocks, start index 0, count 1
2018-Dec-19 18:14:56.346121 DEBUG   No new blocks received. Consumers not updated
2018-Dec-19 18:14:56.346116 ERROR   WalletGreen is already stopped
2018-Dec-19 18:14:56.346137 DEBUG   Blockchain updated, resume blockchain synchronization
2018-Dec-19 18:14:56.346165 DEBUG   refresh is stopped: The operation you've requested has been cancelled
2018-Dec-19 18:14:56.346232 DEBUG   Stopping BlockchainSynchronizer
2018-Dec-19 18:14:56.346257 INFO    Stopping...
2018-Dec-19 18:14:56.446326 DEBUG   Last block hash 3125b79e4a42f8d4d2fc4dffea8442e185ebda940ecd4d3b449056a4ea0efea4
2018-Dec-19 18:14:56.446352 WARNING Block processing is interrupted
2018-Dec-19 18:14:56.446378 DEBUG   Working thread stopped
2018-Dec-19 18:14:56.446432 INFO    Stopped
2018-Dec-19 18:14:56.447580 INFO    Consumer removed, consumer 0x5633abda29d0, count 0
2018-Dec-19 18:14:56.454820 TRACE   onSynchronizationProgressUpdated processedBlockCount 1, totalBlockCount 1
2018-Dec-19 18:14:56.454846 TRACE   onSynchronizationCompleted
2018-Dec-19 18:14:56.454857 INFO    Container shut down
2018-Dec-19 18:14:56.454914 INFO    Stopping...
2018-Dec-19 18:14:56.454934 INFO    Stopped
2018-Dec-19 18:14:56.454951 INFO    Stopping...
2018-Dec-19 18:14:56.454968 INFO    Stopped
aivve commented 5 years ago

walletd syncs and refreshes for me from scratch in standalone mode just fine. I'd suggest to first start ./karbowanecd --rollback 300400 when it finishes sync either start walletd without --local or shutdown karbowanecd and run standalone walletd.

g1itch commented 5 years ago

That was a log from walletd syncing from scratch. Not fine. Here is another one, with gdb, hope you'll get some new information:

(gdb) r
Starting program: /usr/bin/karbowanec_walletd --data-dir /home/sandbox/coins/krb --local --log-file /home/sandbox/coins/krb/debug.log --container-file /home/sandbox/coins/krb/wallet.dat --config /etc/coins/karbowanec.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
2018-Dec-20 18:13:56.466260 INFO    walletd v1.6.3.815 ()
2018-Dec-20 18:13:56.466440 INFO    Starting Payment Gate with local node
2018-Dec-20 18:16:27.074124 INFO    initializing p2pNode
2018-Dec-20 18:16:27.306406 INFO    Generated new peer ID: 12700416351214559183
2018-Dec-20 18:16:27.306461 INFO    Network: d6482c89-bc2d-5b81-aa9a-bdf1d7317dc3
2018-Dec-20 18:16:27.306491 INFO    Binding on 0.0.0.0:32347
2018-Dec-20 18:16:27.306554 INFO    Net service binded on 0.0.0.0:32347
2018-Dec-20 18:16:27.306580 INFO    Attempting to add IGD port mapping.
2018-Dec-20 18:16:28.315189 INFO    Added IGD port mapping.
2018-Dec-20 18:16:28.315341 INFO    initializing core
2018-Dec-20 18:16:28.315508 INFO    Blockchain not loaded, generating genesis block.
2018-Dec-20 18:16:28.315757 INFO    Blockchain initialized. last block: 0, d2360.h11.m16.s28 time ago, current difficulty: 1
[New Thread 0x7ffff61fb700 (LWP 386)]
2018-Dec-20 18:16:28.316162 INFO    node is inited successfully
2018-Dec-20 18:16:28.316287 INFO    Starting core rpc server on 127.0.0.1:32348
2018-Dec-20 18:16:28.316383 INFO    Core rpc server started ok
2018-Dec-20 18:16:28.316415 INFO    Spawning p2p server
2018-Dec-20 18:16:28.316456 INFO    Starting node_server
2018-Dec-20 18:16:28.316536 INFO    Loading wallet
2018-Dec-20 18:16:28.316565 INFO    Loading container...
2018-Dec-20 18:16:28.408687 INFO    Consumer added, consumer 0x555555b73690, count 1
2018-Dec-20 18:16:28.408888 INFO    Known Transfers 0
2018-Dec-20 18:16:28.409003 INFO    Starting...
[New Thread 0x7ffff5676700 (LWP 387)]
2018-Dec-20 18:16:28.409365 INFO    Container loaded, view public key 6ff019fe5c5d00f49c0f64d0717946ef2f4b9a8e42badbb8d91e97428fba495d, wallet count 1, actual balance 0.000000000000, pending balance 0.000000000000
2018-Dec-20 18:16:28.409376 INFO    Removing outdated pool transactions...
2018-Dec-20 18:16:28.409547 INFO    Outdated pool transactions processed
2018-Dec-20 18:16:28.409749 INFO    Wallet loading is finished.
2018-Dec-20 18:16:28.409963 INFO    Stopping container
2018-Dec-20 18:16:28.410146 ERROR   WalletGreen is already stopped
2018-Dec-20 18:16:28.410315 INFO    Stopping...
2018-Dec-20 18:16:28.509851 WARNING Block processing is interrupted
[Thread 0x7ffff5676700 (LWP 387) exited]
2018-Dec-20 18:16:28.510105 INFO    Stopped
2018-Dec-20 18:16:28.510262 INFO    Consumer removed, consumer 0x555555b73690, count 0
2018-Dec-20 18:16:28.510372 INFO    Container shut down
2018-Dec-20 18:16:28.510406 INFO    Stopping...
2018-Dec-20 18:16:28.510431 INFO    Stopped
2018-Dec-20 18:16:28.510454 INFO    Stopping...
2018-Dec-20 18:16:28.510476 INFO    Stopped
[Thread 0x7ffff61fb700 (LWP 386) exited]
terminate called after throwing an instance of 'std::runtime_error'
  what():  TcpListener::stop, epoll_ctl failed, result=9, Bad file descriptor

Thread 1 "karbowanec_wall" received signal SIGABRT, Aborted.
0x00007ffff684b82b in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff684b82b in raise () from /lib64/libc.so.6
#1  0x00007ffff684d051 in abort () from /lib64/libc.so.6
#2  0x00007ffff7466fe5 in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libstdc++.so.6
#3  0x00007ffff7464bf6 in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libstdc++.so.6
#4  0x00007ffff7463af9 in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libstdc++.so.6
#5  0x00007ffff74644e8 in __gxx_personality_v0 () from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libstdc++.so.6
#6  0x00007ffff6e11e83 in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libgcc_s.so.1
#7  0x00007ffff6e12390 in _Unwind_RaiseException ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libgcc_s.so.1
#8  0x00007ffff7464e76 in __cxa_throw () from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libstdc++.so.6
#9  0x000055555582b6d3 in ?? ()
#10 0x0000555555826033 in ?? ()
#11 0x000055555582518c in System::ContextGroup::~ContextGroup() ()
#12 0x0000555555666d85 in PaymentGateService::runInProcess(Logging::LoggerRef&) ()
#13 0x00005555556673c1 in PaymentGateService::run() ()
#14 0x0000555555658f24 in main ()

I have installed gcc-7.3.0, glibc-2.27, binutils-2.30

# uname -a
Linux hts 4.17.4-calculate #4 SMP Sat Aug 11 17:23:25 EEST 2018 x86_64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz GenuineIntel GNU/Linux
g1itch commented 5 years ago

a0ae76d is the last commit working on my PC

g1itch commented 4 years ago

Seems fixed before 1.6.6