question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[2.6][T4] Round saving error in 2.6.0-next.6

See original GitHub issue

After a while we receive the following error message in the console, running testnet (1 node) locally. After restarting the node, everything works fine again.

Notes:

  • We added our custom plugin which handles custom transactions, but it’s independent from this problem.
  • We pached applyBlock and revertBlock method in packages/core-database/src/database-service.ts with this line (before emitting block applied events): block.data.transactions = block.transactions.map(tx => tx.data);. For more detail, please see your discord’s #techincal channel, I wrote more detailed explanation there.

Expected Behavior

No errors.

Current Behavior

I receive these errors:

[2019-12-06 14:22:50.072] INFO : Starting Round 17
[2019-12-06 14:22:50.076] DEBUG: Loaded 53 active delegates
[2019-12-06 14:22:50.077] INFO : Saving round 17
[2019-12-06 14:22:50.087] WARN : Refused new block {"version":0,"timestamp":10995768,"height":848,"previousBlockHex":"e01061b57cdb9b862239e5b2ebf8b099c28d1e37541f87b6b469c8803d5ab0c2","previousBlock":"e01061b57cdb9b862239e5b2ebf8b099c28d1e37541f87b6b469c8803d5ab0c2","numberOfTransactions":0,"totalAmount":"0","totalFee":"0","reward":"0","payloadLength":0,"payloadHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","generatorPublicKey":"03020e45d745402121c2d7bece1a1cea2e23763834f0f7abaab0924e4872e55b62","blockSignature":"30450221008ef7723d77aeacd6071462bfa3c400e97b89a7ce399d2c2a921a88354f04a61c02200f6bd3ba3ab8612670860e8acb2e4bffa32c22fdb8ce608d72b9012eaf227d64","idHex":"3cf537398e5bbf59643a374ae43c8020e9531325914cdf44437c4e0f1cb35480","id":"3cf537398e5bbf59643a374ae43c8020e9531325914cdf44437c4e0f1cb35480"}
[2019-12-06 14:22:50.087] DEBUG: TypeError: Cannot set property 'length' of undefined
    at DatabaseService.applyRound (/home/mudlee/Projects/iop/hydra-core/packages/core-database/dist/database-service.js:87:54)
[2019-12-06 14:22:50.087] DEBUG: event 'PROCESSFINISHED': "newBlock" -> "idle" -> actions: [checkLater, blockchainReady]
[2019-12-06 14:23:00.106] ERROR: TypeError: Cannot read property 'publicKey' of undefined
    at ForgerManager.checkSlot (/home/mudlee/Projects/iop/hydra-core/packages/core-forger/dist/manager.js:67:77)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
[2019-12-06 14:23:00.107] INFO : Round: 16, height: 847
[2019-12-06 14:23:02.120] ERROR: TypeError: Cannot read property 'publicKey' of undefined
    at ForgerManager.checkSlot (/home/mudlee/Projects/iop/hydra-core/packages/core-forger/dist/manager.js:67:77)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)

Possible Solution

?

Your Environment

  • Version used: 2.6.0-next.6
  • Environment name and version. Node: 12.13.1, Typescript: 3.7.2
  • Server type and version: normal desktop PC
  • Operating System and version: Ubuntu 19.04
  • Link to your project: updates are not yet published to github, but we can share our gitlab privately

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
deanpresscommented, Dec 11, 2019

Can confirm: just ran into the exact same issue on our testnet.

I’ll also apply your patch and see if I experience this after.

0reactions
mudleecommented, Jan 9, 2020

@boldninja APFuSJWZvGLzofb1Ety7bRFD1vtDNdMajQ thx!

Read more comments on GitHub >

github_iconTop Results From Across the Web

(PDF) Design for Vehicle Structural Crashworthiness Via Crash ...
DESIGN FOR VEHICLE STRUCTURAL CRASHWORTHINESS VIA CRASH MODE MATCHING by Karim T. Hamza A dissertation submitted in partial fulfillment of the requirements ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found