Coder Social home page Coder Social logo

Testing CryptonightV7 about cryptonote-generator HOT 19 OPEN

2acoin avatar 2acoin commented on September 16, 2024
Testing CryptonightV7

from cryptonote-generator.

Comments (19)

kennetanti avatar kennetanti commented on September 16, 2024 1

Those equality checks look correct. The two variables that start with m_ are the first block for v7 and the last block for v7. And it basically says cn_variant is 1 if firstV7Block <= currentBlock <= lastV7Block. Im looking into this as well as we speak (although im just kind of a guy and not the Official Mr ForkNote )

from cryptonote-generator.

2acoin avatar 2acoin commented on September 16, 2024 1

For my testing I am just trying to invoke V7... However, even with the change in the logic and setting parameters as expected I can't get the V7 (variant=1) to kick in...

Anyone know what I am missing?

I know that V7 is "Not Tested" but that is why I wanted to start playing with it!

from cryptonote-generator.

2acoin avatar 2acoin commented on September 16, 2024

So, I started a new coin and I set these two variables;

POW_CRYPTONIGHT_V7_BLOCK_INDEX=1
POW_CRYPTONIGHT_V7_LAST_BLOCK=9999

I set these defaults in the CryptoNoteConfig.h file and I am also passing these in the conf.json file for the coin. However, the V7 option does not activate. Combing through the code I can't see where it ever reaches the test for the blockindex to activate V7.

I am a little confused in the above qualifications because I would read it as;

if (m_POWCryptoNightV7BlockIndex (**1**) >= block.getBlockIndex() (current block) && m_POWCryptoNightV7LastBlock (**9999**) <= block.getBlockIndex() (currentblock))",
              "    cn_variant = 1;",

I replaced my values in the code above and the qualifier test for the Variant=1 look backwards to me (see 1 & 9999 in the code)... Am I not reading the code right?

from cryptonote-generator.

2acoin avatar 2acoin commented on September 16, 2024

Continuing on with my thread....

If the following are used in the coin;

POW_CRYPTONIGHT_V7_BLOCK_INDEX=1
POW_CRYPTONIGHT_V7_LAST_BLOCK=9999

The code;

if (m_POWCryptoNightV7BlockIndex >= block.getBlockIndex() && m_POWCryptoNightV7LastBlock <= block.getBlockIndex())",
              "    cn_variant = 1;",

Would equate to;

if (1 >= block.getBlockIndex() && 9999 <= block.getBlockIndex())",
              "    cn_variant = 1;",

I would think the equality checks need to be reversed to read;

if (1 <= block.getBlockIndex() && 9999 >= block.getBlockIndex())",
              "    cn_variant = 1;",

Would anyone agree with me...?

BTW - I made this change in the code and the V7 algo still does not engage...

from cryptonote-generator.

kennetanti avatar kennetanti commented on September 16, 2024

Actually you are correct :/ i was very tired when responding the first time... You could just switch the numbers in your config around. Although might i suggest using 4294967294 instead of 9999? If you use 9999 with 2 minute block times you would switch back to v0 at block 10000, or roughly 2 weeks after mining begins. If CryptoNoteConfig.h includes <stdint.h> you could just use UINT32_MAX to make it pretty. Something i found odd when looking into it more, the variables UPGRADE_HEIGHT_V* dont seem to actually do anything. They are just defined and then never referenced anywhere.

Also, i can make a pull request that switches the signs so that the code is more self-documenting because those var names are confusing lol

from cryptonote-generator.

kennetanti avatar kennetanti commented on September 16, 2024

Oh, also you might want to make it start at block 0 if you want the genesis block to also have a v7 hash. Although it is not required and will probably not impact you in any way and is just being OCD but if someone discovers your blockchain on an abandoned hard drive 100000 years from now, what would they think

from cryptonote-generator.

pmitchev avatar pmitchev commented on September 16, 2024

Every *_LAST_BLOCK should have uint32_t(-1) or whatever the max is as default. It will be fixed in the next commit on the parameters where this is not true

Also, *_LAST_BLOCK should be used only when you need to hardfork out of a feature

from cryptonote-generator.

egamecash avatar egamecash commented on September 16, 2024

I'm having the same problem, everything has been configured correctly, but V7 is not enabled.

from cryptonote-generator.

2acoin avatar 2acoin commented on September 16, 2024

@kennetanti thanks for the offer to create a pull request to update the logic... However, I have already sent a request #83 to the dev.

from cryptonote-generator.

egamecash avatar egamecash commented on September 16, 2024

@2acoin with this update done by you, is v7 enabled correctly?

the v7 block index in my test was above block 100 height:
POW_CRYPTONIGHT_V7_BLOCK_INDEX = 100;
with
UPGRADE_HEIGHT_V2 = 100;

(test)

from cryptonote-generator.

2acoin avatar 2acoin commented on September 16, 2024

@egamecash This fixes some of the logic for the execution of the V7 code. However, it still does not enable the code execution. I am still going through the code to see why. @pmitchev may have an swer for us if he has the time.

from cryptonote-generator.

kennetanti avatar kennetanti commented on September 16, 2024

@egamecash upgrade_height_v2 does nothing btw

from cryptonote-generator.

egamecash avatar egamecash commented on September 16, 2024

@2acoin okay, I'll check what I can do for v7 to work on my coin, if I succeed I'll share it for all

from cryptonote-generator.

egamecash avatar egamecash commented on September 16, 2024

@kennetanti Yes, I know : )

from cryptonote-generator.

kennetanti avatar kennetanti commented on September 16, 2024

@egamecash same. Ill also share if i find the thing. I have a day job and a girlfriend so my time to work on such things is limited but yeah

from cryptonote-generator.

egamecash avatar egamecash commented on September 16, 2024

I work at home and I do not have a girlfriend, I think it will make it easier for me, lol

I am looking at v7 now, I can not stand asic mine in my currency, if I continue for another 2 months they will have more coins than I.

from cryptonote-generator.

kennetanti avatar kennetanti commented on September 16, 2024

@egamecash well if they can afford asics and you cant, im guessing they already have more coins than you. Just not ur coin, ones that matter like usd and btc. Why no focus on making a simple payment processor for games to integrate your coin easily for micropayments and then just take 10% as a fee? Instead of focusing on monopolizing a shitcoin, actually build a thing that makes your coin useful. Whitepapers arent just a trophy, the words they contain are serious. Its not a joke.

from cryptonote-generator.

 avatar commented on September 16, 2024

Hello @kennetanti @2acoin and everybody :) If I want to create a completly new coin with premined coin using a Cryptonote V7, what values ​​do these parameters have? I'm very confused about the meaning of these parameters...

POW_CRYPTONIGHT_V7_BLOCK_INDEX=?
POW_CRYPTONIGHT_V7_LAST_BLOCK=?

Thanks!!

from cryptonote-generator.

CobitCoin avatar CobitCoin commented on September 16, 2024

any success with pow v7 ? i tried in several ways and cannot activate

from cryptonote-generator.

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.