Giter Club home page Giter Club logo

Comments (10)

khalahan avatar khalahan commented on July 20, 2024

The changes has been added in the following commit : a1ccce8

name_firstupdate (line 741 of namecoin.cpp) are refused by the GetTxOfName function (line 456 of namecoin.cpp), which uses pindexBest->nHeight as you said.

Validity of blocks are checked at line 1492, which uses pindexBlock->nHeight too. So, i guess everybody need to change that at the same time to really correct the bug...

from namecoin-legacy.

midnightmagic avatar midnightmagic commented on July 20, 2024

Well, then until we come out of the 12000-block limbo, I guess all those domains are stuck in a netherworld! :-) hah.. The Eternal Grace Period. Speaking of which, we need to find one of those people and find out whether they can name_update their names or not. That would suck even worse..

from namecoin-legacy.

khalahan avatar khalahan commented on July 20, 2024

One solution could be to remove GetDisplayExpirationDepth and use only GetExpirationDepth. Then correct pindexBlock->nHeight with nHeight if there is some mistakes.
Result would be that current names displayed as expired would become not expired yet (due to the additional step of GetExpirationDepth before block 48k) as they are currently considered by the network blockchain validation rules.

this would avoid an incompatible changes between old and new clients.

from namecoin-legacy.

midnightmagic avatar midnightmagic commented on July 20, 2024

I have done this already in my fork; this won't solve the issue because the expires_in calculation passes the correct origin block to the expiration depth function. So, the result of your suggestion is that there's only a few blocks difference between the old expires_in (which is incorrect) and the new expires_in, but the domain itself still technically expires past the 12000 blocks.

As far as I can tell, no domains registered now will exit the expires_in negative limbo until the end of the 12000 block gradual increase we're in. As far as I can tell, the mechanism is broken and in a sort of registration eternal grace period.

from namecoin-legacy.

midnightmagic avatar midnightmagic commented on July 20, 2024

Is Vince waiting for me to commit a fix and request a pull up..? Is this the only place where discussion of it is going on?

from namecoin-legacy.

khalahan avatar khalahan commented on July 20, 2024

This could be solved in two ways :

  • allow registration of names displayed as expired (requires an update of every miner as soon as possible, to avoid waiting too long to register expired names)
  • report the expiration of those names to 12k later (requires an update before block 36k, which could be in about 1 or 2 months)

Which one should we choose ?

from namecoin-legacy.

midnightmagic avatar midnightmagic commented on July 20, 2024

Effectively we have expiration dates past the end of the gradual 12k scale-up. I think your original inclination is correct: just fix the displayed expiration and just excise the non-functional code. That shouldn't break any compatibility nor cause anything other than make non-upgraded people scratch their heads.

If the patch doesn't exist I'll write it when I get to an actual terminal for a couple hours next.

from namecoin-legacy.

khalahan avatar khalahan commented on July 20, 2024

Here is a piece of code : khalahan@1f7b7c2

  • Displayed expires_in values stay the same
  • Validation rules by the network are updated to follow the same rules

Things are simplified with one GetExpirationDepth that always use the block number of last name_operation.

Miners should update before end users if possible, otherwise, people using the patch could register expired domains but their transactions won't be accepted until miners apply the patch.

Please, deeply check the code for mistakes !

from namecoin-legacy.

khalahan avatar khalahan commented on July 20, 2024

A new patch has been writen : khalahan@d82837c

This is another way of fixing the bug :

  • change the display expiration values to what the network really accepts/knows
  • expiration depth is now 36k since we reach block 24k (that was the original intent of vinced' patch)
  • avoid an urgent update of everybody, no incompatible change between old and new version
  • old version shows bad expiration times for names registered after block 12k, the new one corrects this

from namecoin-legacy.

khalahan avatar khalahan commented on July 20, 2024

The issue seems fixed in khalahan@4b7c92d
Will be integrated in trunk soon.

from namecoin-legacy.

Related Issues (20)

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.