Giter Club home page Giter Club logo

Comments (4)

marpme avatar marpme commented on August 16, 2024

do you have old data inside your electrum folder? if so can you still reproduce with everything disabled

I was not able to reproduce with the latest master. Could you please try again

from electrum.

swat69 avatar swat69 commented on August 16, 2024

no old data in folder .electrum-xvg.

new test with master branch:
2 seperate computer (ubuntu18 and debian10), one connected to electrum.marpmedev.xyz, one to node1.verge-electrum.com:
Error after 60 min, next try (after deleting blockchain_header) it takes only 2 minutes up to the error, then 90 minutes.
It looks like the error occur on both computers/wallets at the same time.
I attach an invalid blockchain_header
_blockchain_headers.gz

from electrum.

swat69 avatar swat69 commented on August 16, 2024

File "/home/ben/electrum2/electrum/blockchain.py", line 544, in chainwork_of_header_at_height
work = ((2 ** 256 - target - 1) // (target + 1)) + 1
TypeError: unsupported operand type(s) for -: 'int' and 'str'

reason crash: variable target is str/undefined

540 def chainwork_of_header_at_height(self, height: int) -> int:
........"""work done by single header at given height"""
........ chunk_idx = height // 2016 - 1
........ target = self.get_target(chunk_idx)
........ work = ((2 ** 256 - target - 1) // (target + 1)) + 1
........ return work

494 def get_target(self, index: int) -> int:
........ # compute target from chunk x, used in chunk x+1
........ if constants.net.TESTNET:
................ return 0
........ if index == -1:
................ return MAX_TARGET
........ if index < len(self.checkpoints):
................ h, t = self.checkpoints[index]
................ return t

h,t ---> t = undefined, because of file checkpoints.json (index[0])

[
["00000000007a5b03d0cde55844032c8c890c9e6bac0d7836aad53c9e251f301d", ""],
["0000000009076a32f65518d94c76fd3d281b86dc3185030800ea07ff8ffba559", ""],

from electrum.

marpme avatar marpme commented on August 16, 2024

Well we have to somehow adjust targeting for sure. Right now I've disabled the target checks in electrum since bitcoin got a quite easy approach to check em but we have a huge calculcation for upcoming targets and also do we have retargeting each and every block instead of once every 2016 Blocks.

Seems like a huge task to get this all done, but it's also quite necessary in order to ensure a solid working product.

from electrum.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.