Bitcoin Forum
June 17, 2024, 03:37:13 PM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Slimcoin | First Proof of Burn currency | Decentralized Web on: January 14, 2019, 02:12:46 AM
I fixed the bug that caused tx generation and PoS minting to fail: https://github.com/slimcoin-project/Slimcoin/pull/18
2  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Slimcoin | First Proof of Burn currency | Decentralized Web on: January 12, 2019, 04:35:31 PM
On this new version of wallet, I didn't get any rewards from staking - does it have to wait more than on older version?
Because on older version I get staking rewards everytime I connect to the network.
The new version computes the data required for staking for all utxos in your wallet before starting to stake - which will take a while (a few minutes) if your wallet has many of them.
Also, it stops staking when you have less than 3 connections. I put that in because staking on a node with just a single connection often resulted in me mining my own fork.
Perhaps we should make that one configurable...

weirder...
Cannot send coins anymore...

ERROR: CTransaction::CheckTransaction() : vin empty
ERROR: CTxMemPool::accept() : CheckTransaction failed
CommitTransaction() : Error: Transaction not valid

Now this one is weird. I can send coins normally from my wallet. Does this happen with the previous version of the walltet too?
Scratch that, I was using an older version... Using the newest develop version, I get this exact error too. Staking doesn't appear to work either.


I extended it for 2 months (until 2019-03-09)
3  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Slimcoin | First Proof of Burn currency | Decentralized Web on: August 15, 2018, 03:00:55 PM
Quote
Interesting observation... but that last sentence is not quite correct. The two reductions will not be combined to 1/9 because the bnNewTrust/3 is returned right away. This kind of makes this problem more serious because PoS blocks will typically have 1/3 the trust of a PoW block.
Oh, you're probably totally right. Thanks. It's true - it's even clearer so that this is probably the reason for the temporary "PoS takeovers".

Quote
I don't know if setting trust values to zero would be the best solution to this. Someone who can dominate PoS and is capable of producing at least a single PoW block could just prepare a long chain of PoS block and then mine a PoW block on top of it. Since the PoW block has nonzero trust, the network should accept it regardless of how many PoS blocks there are (unless I'm missing something). I think it would be more clean to just put a hard cap on the number of consecutive PoS blocks ("if the last N blocks were PoS and this block is PoS too, reject it"). This should be doable in a soft fork.
So I interpret it's possible to mine on a zero-trust block without other clients rejecting that, right? In this case, the "hard" cap obviously is a better idea. I would set the limit pretty low (lower than 10) because some services accept confirmation times of 10 blocks, and a large PoS minter could try to double-spend attack them otherwise.
I think so. Not entirely sure though.
Quote
So, in order to decrease the influence of PoS on the network, it would probably make sense to decrease nTargetSpacingWorkMax from 10*STAKE_TARGET_SPACING (15min) to something more sane.

Would this require a hard fork? If not, I would support the combination of this measure with a "hard cap" of e.g. 8 PoS blocks in a row.
Yes, this would require a hard fork since it decreases the difficulty of blocks that are accepted.

The "hard cap" alone might be beneficial already though, especially if we go even lower than 8. If we set the limit to 3 PoS blocks in a row, we should get at least one PoW block every 4 minutes and a PoB block every 12 minutes.
If we do set a small hard cap, we need to increase the PoS target spacing however. Otherwise, the PoS diff would keep dropping since the hard cap prevents the network from ever generating more than 3 PoS blocks per 4 minutes (=1 PoS block every 80 seconds).
Doing this in a soft fork would be more complicated - we would need to add a new mandatory nBits field in the coinbase and ignore the old one in the blockheader. Attacking non-upgraded nodes would be even easier in this case as they will accept minimum-diff PoS blocks.

A hard cap significantly larger than 10 blocks could be done without fiddling around with the spacing and difficulties but that would also not help as much.
 
Quote
Or we could get rid of the mechanism that increases the PoW target spacing based on the PoS interval entirely (equivalent to setting nTargetSpacingWorkMax to 1*STAKE_TARGET_SPACING)  This would require a hard fork however.
A hard fork is complicated in the current situation. So one perhaps could find an alternative solution, for example with a gradual reduction of trust of blocks in a row (for example: Block 1 full trust,  Block 2-3 1/3 (like now), Block 4 and 5 1/6, block 6-8 1/9).

This idea sounds good but some problems may arise from the fact that most services (and users) work with a specific number of confirmations instead of trust. If we set the trust per PoS block too low, a minority PoW miner could build on top of the beginning of a long PoS chain and then revert that entire chain if he finds a PoW block.
Sybil and MITM attacks would also work just as well as they do right now.
If we can get services to use trust or rather some kind of "virtual confirmations" number based on trust instead of the number of confirmations, that would be optimal.
4  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Slimcoin | First Proof of Burn currency | Decentralized Web on: August 14, 2018, 08:05:56 PM
@iguano - I dont know, if you are on telegram/discord group, but I welcome you.
Thanks! I'm gonna check out the discord group sometime soon.

What's interesting for us is the calculation of PoS block trust:
Code:
CBigNum bnNewTrust = (CBigNum(1)<<256) / (bnTarget + 1);
This line is called every time when a PoS block is detected. It sets the "block trust" for PoS blocks basically to a value correlated directly with PoW difficulty. The higher the difficulty, the higher the "trust" of the block.

After that line, there are some mechanisms in place meant to ensure that there are not too many PoS blocks in a row. So the block trust is reduced to a third if:
  • the parent block of the PoS block is not a PoW block
  • there are less than 3 PoW blocks in the last 12 PoS blocks
If both conditions are met, chain trust gets reduced to 1/9 of the value of the first PoW block in the row.
Interesting observation... but that last sentence is not quite correct. The two reductions will not be combined to 1/9 because the bnNewTrust/3 is returned right away. This kind of makes this problem more serious because PoS blocks will typically have 1/3 the trust of a PoW block.

I don't know if setting trust values to zero would be the best solution to this. Someone who can dominate PoS and is capable of producing at least a single PoW block could just prepare a long chain of PoS block and then mine a PoW block on top of it. Since the PoW block has nonzero trust, the network should accept it regardless of how many PoS blocks there are (unless I'm missing something). I think it would be more clean to just put a hard cap on the number of consecutive PoS blocks ("if the last N blocks were PoS and this block is PoS too, reject it"). This should be doable in a soft fork.

I have looked at 5000 blocks starting at 1467845 and gathered some data:
PoS blocks make up two thirds of the total trust score and 80% of the total number of blocks.
PoW has 27.5% trust and 15.4% blocks
PoB has 5.8% trust and 4.8% blocks

The main reason for this is that the target spacings massively favor PoS over everything else:
Code:
int64 nTargetSpacing = fProofOfStake ? STAKE_TARGET_SPACING : 
min(nTargetSpacingWorkMax, (int64) STAKE_TARGET_SPACING * (1 + pindexLast->nHeight - pindexPrev->nHeight));
This piece of code (function GetNextTargetRequired in main.cpp) increases the PoW block spacing to 15 minutes if there are enough PoS blocks. (one PoW block per 10 PoS blocks)
For PoB, there is a target spacing of one block per 3 PoW blocks (see GetNextBurnTargetRequired in main.cpp)

This also explains why there were periods during which PoS was not dominating: There simply weren't enough coins being staked to make one minimum-difficulty block every 90 seconds so this PoW-difficulty-increase mechanism didn't kick in back then.

So, in order to decrease the influence of PoS on the network, it would probably make sense to decrease nTargetSpacingWorkMax from 10*STAKE_TARGET_SPACING (15min) to something more sane. Or we could get rid of the mechanism that increases the PoW target spacing based on the PoS interval entirely (equivalent to setting nTargetSpacingWorkMax to 1*STAKE_TARGET_SPACING)  This would require a hard fork however.
 
P.S.: I'm gonna restart staking now but I'll do it more gently for now  Smiley
5  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Slimcoin | First Proof of Burn currency | Decentralized Web on: August 10, 2018, 10:07:09 AM
Building stuff on windows is such a pain Sad I'm gonna have to set up the build environment first and get all the dependencies. I'm actually using a Linux VM to get around this.
It probably wouldn't help you with the orphans though. The last couple days, I've been getting orphan rates of 30-40% too. I think this happens because processing new blocks is too slow and needs to be optimized as well.

Quote
Besides if it's only optimizing the PoS code in the way of speed I could think of it like in PoW - built-in miner vs slimminer - normally nobody is using built-in miner anymore, cause it's too slow, and can't produce a block in a reasonable time.
Yeah, it's similar to PoW aside from the fact that once the PoS miner is fast enough, further speed improvements won't have an effect on your block-generating ability.
Also, in PoS, the number of blocks you generate should only slightly affect the rewards you get.
6  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Slimcoin | First Proof of Burn currency | Decentralized Web on: August 10, 2018, 09:18:54 AM
I just took a closer look at my transaction history and it looks like my node actually stopped dominating around 2018-08-06 UTC.
It did produce quite a few orphans since that date though so the increased orphan count could be related to this.

Right now, https://chainz.cryptoid.info/slm/address.dws?SXYaGkxKjHGw96cMaHxjWGFDvyYvfoC87M.htm is getting most PoS blocks. (not me) They are spending a lot of old (>90d) txouts which gives them a lot of stake weight right now. I don't know if they are running an optimized version too or not. (This would be interesting to know though).

I did not restart staking on my node yet.

Quote
Developers work in their own forks, then submit pull requests when they think their feature or bug fix is ready.
I did not submit a pull request because I don't think that my code is ready in its current state:
Quote
It's probably not quite suitable for general use currently as I hardcoded some constants that should probably be set dynamically based on the amount of SLM in your wallet, the number of UTXOs in your wallet and the current and minimum staking difficulty: https://github.com/iguanodon1/Slimcoin/blob/optimized-pos/src/wallet.cpp#L1627

Also, I've been too lazy to properly test the code.

7  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Slimcoin | First Proof of Burn currency | Decentralized Web on: August 10, 2018, 04:08:40 AM
I've been running some kind of optimized PoS code for months. Back then, it didn't occur to me that the impact on the network would be this large...
The modifications I made are just performance improvements. There are no exploits in there and my blocks conform to the normal consensus rules. (The combine/split changes I made actually reduce the possible "PoS block production power" by creating txouts larger than what would be optimal if it weren't for the performance problems.)

Every node doing PoS staking needs to compute one PoS hash per second per wallet UTXO. Also, in order to maximize the blocks produced, the staking balance needs to be split into lots of small txouts so that each individual txout accumulate significant weight before being used in minting a block.
I believe that right now, many (most? all?) Slimcoin nodes on the network can't keep up with computing this many hashes each second due to the slow PoS code.
If this is true, most staking nodes are using a tiny fraction of the staking power their wallets would allow them to have. Thus, when my node actually manages to stake close to full capacity, it can generate more blocks than the other nodes. The fix would be to upgrade those slower nodes' PoS code so they can use their full staking capacity too.

I've turned off staking on my node for now so we can see how large the impact is going to be.
8  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Slimcoin | First Proof of Burn currency | Decentralized Web on: August 09, 2018, 04:34:55 PM
Yep that's really strange. I think there are more PoS blocks than it should be, shortening avg block time.

Perhaps part of the reason is that I have been monkeying around with the PoS code. The old PoS code is slow and has been choking up pretty much all the time. It also created more and more txouts, causing it to choke up even more. Thus, I optimized the code for better performance and changed the utxo splitting/consolidation logic to create fewer txouts.

The result is that my computer can now actually keep up with computing all those PoS hashes Smiley
Since I'm running this code on a fairly sizable stack of SLM, this caused significant block interval fluctuations. I haven't looked at the difficulty adjustment algorithm but I suspect that those large fluctuations made it set the average PoS difficulty below what would be required for a 90s block time during those fluctuations. Perhaps the adjustment algo decreases the difficulty more eagerly than increasing it...

My modified PoS code is available at https://github.com/iguanodon1/Slimcoin/tree/optimized-pos
It's probably not quite suitable for general use currently as I hardcoded some constants that should probably be set dynamically based on the amount of SLM in your wallet, the number of UTXOs in your wallet and the current and minimum staking difficulty: https://github.com/iguanodon1/Slimcoin/blob/optimized-pos/src/wallet.cpp#L1627

Also, I've been too lazy to properly test the code Smiley It didn't blow up in my face yet though.
9  Alternate cryptocurrencies / Announcements (Altcoins) / Re: Slimcoin | First Proof of Burn currency | 0.5.1 binaries | Redesigned Website on: December 29, 2017, 05:49:35 PM
Hi Everyone,

A couple of months ago I bought some Slim, and today, I started staking them.  However, there seems to be two problems.
One is that I am getting huge  amounts of minted coins, generally around 16670 or 7490 per block.  Is this a bug, or is it because I bought coins that had not been staked for ages?
The second issue is that they all, so far, have become orphaned. Sometimes I will get 3 confirmations on one of them before it becomes unconfirmed.

Some more information:
I have about 40000 Slim, and am staking with 0 reserve balance.
I am running from the latest source from github on Ubuntu 17.10.

Any idea what is going here?


I just had the same problem when I was trying to stake: my client was minting blocks with huge rewards and none of them were accepted by the network.
Switching to the older SLMv0.5.0 version (commit 8382d7f) resolved that problem for me.

Looking at the code, I think the change to GetProofOfStakeReward(int64 nCoinAge, u32int nTime) in commit 7d4cacc is responsible for this and should probably be reverted.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!