Skip to content

Fixed commit to db every few blocks#25

Open
imperx wants to merge 1 commit intojacklevin74:mainfrom
imperx:commit-db
Open

Fixed commit to db every few blocks#25
imperx wants to merge 1 commit intojacklevin74:mainfrom
imperx:commit-db

Conversation

@imperx
Copy link

@imperx imperx commented Oct 4, 2023

While running syncnode.py I realised it is not committing fetched blocks to blockchain.db. Eventually it caused crashes if done on remote server.

@imperx
Copy link
Author

imperx commented Oct 4, 2023

lol no

I love the technical comment. If you start fetching db from block 0, eventually it crashes (memory issue? I don't know). The problem I encountered is easy to recreate. Just git clone the repo, and run syncnode. I did that on Amazon cloud and every time it crashed, needing to reboot the instance. Not saying, that locally, if it fetched 14 000 blocks, and crash, you have to start over from block 1. Look at Jack's earlier commit: 992c339 . I still think counter%1 == 3 makes no sense, unless you want the equation never be reached

@jacklevin74
Copy link
Owner

jacklevin74 commented Oct 4, 2023 via email

@nukee86
Copy link

nukee86 commented Oct 4, 2023

Well, it crashed my EC2 instance few times. I realized the problem is only if you have to start over with downloading whole db - if there will be any interruption, you have to start over. It's not only me, someone in telegram group mentioned the problem aswell, I guided him with the solution and it worked. Hence I thought I'll mention it in case someone encounters the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants