High transaction speed tolerance test

Hi all,

I want to conduct a little experiment and push the limits of the hybrid PoW/PoS system by changing the difficulty to the minimum.

Is it only necessary to change GetDifficulty() in ppcoing/src/bitcoinrpc.cpp? If not, please show me what else needs to be changed.

I’d like to go crazy and put difficulty = 1. Many thanks in advance for helping the madman!

ermm if u want to change the difficulty in the code then you will need to remine the genesis block i believe or the difficulty will not match the nonce on the genesis block for the current timestamp and the network will not accept you as a node so you will not be able to connect.

If you have your code all set and have made the change to difficulty and are going to be starting this coin from scratch as a test for yourself then yes I believe this is the only place you need to change it… I will say that I forked the LTC code and tried to set a higher starting difficulty. It broke the code :frowning: as there was some other hidden way of actually calculating the starting difficulty and its linked in how the genesis block is mined… Forking PPC and playing with difficulty is about 1 off the top on my to do in this project area. So I have not done it personally but this is my experience on the matter.

I’ll hopefully be playing with this over christmas so feel free to discuss with me in this thread any findings we come across

Fuzzybear

Thank-you FuzzyBear!

Thank you for that tip on remining genesis. Will definitely do that.

I also appreciate the confirmation on the function.

I’m going to fork, mod, and pray. If it seems to work, I’ll announce a date to conduct the test.

Since PoS keeps the hogs at bay, I really want to know how it handles high transaction speed…

Interesting. Will be expecting your test outcome.

If it would be useful I’d be happy to help by putting up a testnet node and providing ~150GH/s of hashing power.

Let me know.

Thank you Ben, that will be vital!

Thank you too redlee! I’ll try to PM everyone before we set the date.

I have to admit, I’m anxious to see if PoS throttles the chain enough to prevent the endless orphans that high speed PoW-only suffers.

Hopefully, it will be a success, and I’ll start a new thread for a more complex mod that will govern supply inflation based upon price inflation, but first things first…

OK, I think I might have a problem.

I simply commented everything out in GetDifficulty() except for return 1.0;.

However, I noticed that PoS uses GetDifficulty() on line 295. https://github.com/ppcoin/ppcoin/blob/master/src/bitcoinrpc.cpp#L295

I have this feeling that that shouldn’t always return 1, lol.

Does anyone know what needs to be done so that PoW is always at minimum without conflicting with PoS? I haven’t examined this too closely yet, but if PoS is using PoW difficulty, this may be a bit more involved than I thought. Totally fine with that. Just need a little help if anyone can spare some thoughts.

Thanks so much in advance!

OK, screw it. I’m throwing down the gauntlet: perpetual 1.0 difficulty and that’s it. Have no idea if it works with GetDifficulty() always returning 1.0, but we’ll see.

I have 0% experience with cryptos, so whoever first tells me where to put the address in the source for the initial coins gets them for this test.

After someone responds with this info, I’ll make the change to the source and give out the link.

Do you need a hard coded address value? In theory, a fork of the PPC code base just needs to recreate the genesis block conditions (which anyone can attempt to solve at difficulty X).

Or am I misunderstanding what issue you are running against?

[quote=“Ben, post:9, topic:1198”]Do you need a hard coded address value? In theory, a fork of the PPC code base just needs to recreate the genesis block conditions (which anyone can attempt to solve at difficulty X).

Or am I misunderstanding what issue you are running against?[/quote]

Thank-you Ben!

I’m just trying to get this sucker started. I found some Genesis Block code (which is really cool of the devs, imo, to include it, unlike…youknowwho) https://github.com/ppcoin/ppcoin/blob/master/src/main.cpp#L2236-2258

I’m about a week old at cryptos, lol, but I’ve been programming for decades, so I think I can somewhat hang if someone can give me a kickstart.

So I have to confess that I don’t know what I need so that we can “turn it on”. In other words, in the bitcoin code, the genesis block is a hard coded hash. In this case, I’m not sure exactly what I’m looking at since I just found that code segment above.

Anyways, I’m rambling because it’s late, but I really don’t want to stop until it’s “ready”. Do you know what needs to be changed so that one of us (you it looks like) can have the first coins?

Or can I just send out the modified code, and any of us can start?

Thank you so much Ben! Peercoin devs are the best I’ve met so far! No joke!

Really interesting idea. Keep me in the loop on this too!

[quote=“MoMoneyMonetarism, post:10, topic:1198”][quote=“Ben, post:9, topic:1198”]Do you need a hard coded address value? In theory, a fork of the PPC code base just needs to recreate the genesis block conditions (which anyone can attempt to solve at difficulty X).

Or am I misunderstanding what issue you are running against?[/quote]

Thank-you Ben!

I’m just trying to get this sucker started. I found some Genesis Block code (which is really cool of the devs, imo, to include it, unlike…youknowwho) https://github.com/ppcoin/ppcoin/blob/master/src/main.cpp#L2236-2258

I’m about a week old at cryptos, lol, but I’ve been programming for decades, so I think I can somewhat hang if someone can give me a kickstart.

So I have to confess that I don’t know what I need so that we can “turn it on”. In other words, in the bitcoin code, the genesis block is a hard coded hash. In this case, I’m not sure exactly what I’m looking at since I just found that code segment above.

Anyways, I’m rambling because it’s late, but I really don’t want to stop until it’s “ready”. Do you know what needs to be changed so that one of us (you it looks like) can have the first coins?

Or can I just send out the modified code, and any of us can start?

Thank you so much Ben! Peercoin devs are the best I’ve met so far! No joke![/quote]
Ok I should be able to help you with this.

PM me when you are round, I might get a chance tonight to work with you on this and we should be able to launch, I have done this myself many times before, you just need to do a few things in a set order and your up and running.

Have you set a new EpochTime cos you will want to do that.

Fuzzybear

Thank you FuzzyBear!

Haven’t setup anything except for the GetDifficulty().

PMing now…

Status Update:

FuzzyBear helped me late into this morning with the Genesis Block.

That hurdle is jumped thanks to him!

I will post the solution on stack and here when I’m finished preparing this test.

[hr]

Right now, I have a new issue and any help will be appreciated:

Simply setting GetDifficulty() to always return 1.0 seems to violate GetStakeModifierChecksum. I’m thinking I need to restore the original GetDifficulty for the purposes of getting the stake, but I’m not sure.

Will update this thread whenever I have something to report.

The PPC devs are the best I’ve ever come across! Thanks guys! And thanks especially to FuzzMan!

I’ll poke around my branch of the code this evening. Do you have a public repo that I could clone from so I can pick up your existing changes?

Thank you Ben!

I think the problem was the way I was generating genesis. I think the conflict was when my miner was trying to resolve the real Peercoin against my genesis.

I posted on stack how I got a fully functioning new genesis thanks mainly to FuzzyBear (can’t note enough that he walked me through the vital points into the wee hours of this morning all while he was at work!).

I’ll post the new repo as soon as I clean up the genesis. It’s a mess right now, and most of the substantial changes are on my local hard drive. GitHub - MoMoneyMonetarism/ppcoin: High speed verification block hashing test

Do you or anyone else know how we can isolate ourselves by default from the real Peercoin? It’s great that it tries to connect to the real one, but I think we shouldn’t clog up legitimate traffic with our craziness, lol. My client/miner did eventually give up after the incoming blocks conflicted with the new genesis, labeling all received as orphan.

[hr]

EDIT

It was just revealed to me that posting how to start a new blockchain without the code on how to isolate it might be irresponsible and cause conflicts with the real Peercoin if everyone and their mother started one, so I’ve deleted the stack post and the link here until we can figure out how to isolate.

Sorry, I’m just so new to this, and it’s so damn exciting that I want to shout it from the rooftops! As my motto says, “I’m not in it for the money, just the ideal currency” :smiley:

you should give it its own (unused) port i guess

Update

OK guys, I’ve figured out that the genesis block has to be hashed properly to work. Duh. (Take it easy, I’ve only been doing this for a week . :stuck_out_tongue: )

I’m currently hashing with simple boost threads but am working on moving it to the GPU. The latest it should be ready as long as my CPU doesn’t explode, assuming that it’s correct that GetDifficulty() governs the PoW difficulty, is tomorrow.

Once I get the right nonce, I’ll alter the genesis code and upload the repo.

Is there someone who can monitor all of the blocks, good and bad? I’m hoping we can get a good record of Peercoin’s PoW/PoS system’s resilience at high transaction speeds.

Thanks everyone for all of your help! Thank you especially to FuzzyBear for walking me through the genesis block & to Ben for offering hash power & to irritant for giving me a crash course on ppcoin.conf!

[hr]

Thank you irritant!

Hopefully that’s it, and we can include it in the final instructions.

ARGH!

I tried changing the genesis time to current epoch and nonce to 0. This caused core dumps because the asserts would fail.

I commented out the asserts, and then I got the error described before that Ben offered to help with.

I then decided to “do it right”, by starting the nonce at 0, and incrementing until CheckBlock() (which I modified to not fill up my debug.log) succeeded. I woke up to find that the nonce had started over, so no nonce was correct.

Does anyone know how to send a block to the mining code and get back the right nonce, multithreaded?

Many thanks in advance!

OK, just found out that ALL nonces can fail for a given block timestamp, so the block timestamp has to be incremented too. Explains why the block timestamp on the original Peercoin genesis is about 1k more than the genesis transaction. Jeez, this may take awhile.

Going to make my thread code a little more efficient so that it’ll take ~4 hours per block timestamp. One day, we’ll get a genesis. One day… :stuck_out_tongue:

I’m also looking into using some GPU code so that I can get geneses out faster for future tests/experiments, so there won’t be so much suspense. lol

If someone else knows how to mine a genesis with a GPU, I’m going to reupload a repo, and you can PM me the transaction/block info or suggest a commit, and we’ll finally get rolling. I’ll do that first before I redo my genesis mining code.

I’ll reply to this thread when the repo is ready for a genesis commit.