* New! Latest stable version of OK wallet v7-SpaceMonkey *

[Solved] Mining OKcash question

Started by mvid, December 19, 2016, 01:10:09 PM

Previous topic - Next topic

mvid

Does the mining/staking of OKCash only require that our client/wallet is connected to the network and there is no actual PoW process that happens after the PoS?
Somebody please just explain the tech behind how the staking happens and blocks are added to the OKCash blockchain.  :P

OKupdates

More info about OK: http://bitcoindood.com/bitcoin-blog/2016/11/25/interview-with-oktoshi-lead-dev-of-okcash/

Below info relayed from: http://okcash.co/faq.html

01
If I understand correctly, you have to leave this wallet open on your computer to stake (earn). What exactly is it connected to, and do these connections make it/me more susceptible to being hacked or the contents of my wallet compromised? Is that why I should encrypt my wallet?


First assumption is correct, Okcash is a Proof of Stake cryptocurrency which is more sustainable long term, more fair with the coin holders and way more Eco-friendly than Proof of work.

-To stake: You need to have coins in your wallet and leave it running, this wallet is a "node" in the network, The Okcash network is created by a lot of this nodes scattered around the world, anywhere where people download and start staking their coins, That is why it is Decentralized and free from middle men, as the users are the real power behind the network, so this nodes connect to each other and there is no Central authority or single points of failure like with masternodes or other way of distribution.  After leaving your wallet open, around 24 hrs later you should start getting your first stakes (coins) and this coins get mature and ready for use after 69 confirmations in the network which you can check in the wallet under the transactions tab.

-Security: The connections to the wallet are normal as they are other nodes connecting to yours and vice versa, your wallet automatically blocks unofficial or malicious nodes it detects, even so you could download and use malwarebytes to increase the security as it blocks malicious ip addresses extending even more the security of your connections, to have maximum security you should always download official clients and only from official sources.

-Wallet encryption: You should encrypt your wallet so in case anyone else gets access to your computer (Via physical or internet access) they can not use or spend your coins as they would require the password to send any transaction as well, and the information inside its encrypted.

To Stake you can unlock only the staking process by selecting the small box "stake only" when unlocking your wallet, that way will still require your password to send coins out of your wallet but it will be able to do the stake process. (A fully encrypted and locked wallet does not stake)

02
If I want to back up the wallet, it prompts me to save a .dat file. I'm assuming that's in case my computer goes belly up and I lose my hard drive. How would I restore and point the new wallet install to that old .dat file if that happens?


More properly speaking that wallet.dat file is your real personal wallet (the program people normally call a wallet is in fact a Client or Daemon if is used under its graphical or command line interface).  So your real "Wallet" and the file you should always keep secure backups of it is that .dat file.

-Wallet.dat: This file contains your private keys, in easier terms  it holds your addresses and all the coins in them, that is why only you can use those coins, because only you have this private keys, if someone else get access to the private keys they could spend the coins, hence why encryption and security is important, and having a backup of it on a secure usb device just in case of anything happens to that computer.

To restore a wallet you just need to place the wallet.dat file into the Data folder, For example:

On Windows you can find that folder at: %appdata%/roaming/okcash and then just start the okcash client and let it Sync.

03
How long does it take for coins to be considered "mature" and start earning?


The coins are able to start getting stake (earning) after the first 8 hours in your open wallet, depending on the people staking in the network you could start earning your first stakes after 24 hrs or more before you start watching a constant influx as they are gaining weight in the network.

-Maturity: a coin is mature when you are able to use it, on Okcash your coins mature after 69 confirmations.

04
Speaking of backing up the wallet, should you only back it up and keep the latest copy, or can you back it up again and again at different points in time? I guess I'm wondering if it's like a snapshot or not.


This works a bit different from that perception we have of files.

As we just saw, our wallet stores private keys (addresses) and we have to remember that there is a blockchain (where all the transactions are stored), the blockchain is stored across all the Okcash network nodes hence is decentralized and always available.

So. If you create a backup of your wallet when it has only 3 addresses, you could consider that backup valid and all your coins safe no matter when on time, as long as you dont create another address, as that backup only has 3 saved, so if you create more addresses then you would require to make a new backup, so you really have a full backup of all of your private keys (addresses).

As the Blockchain or in this case OKChain stores the transactions, as long as you have your private keys, the coins in those addresses are safe. So if you lose your hard drive with 600 coins in it, as long as your backup holds the private key for that address, you will have the full balance, no matter if someone send you more coins to that address and you had the computer off, you would still have the 600 coins and the new ones people send you as the transactions  are stored on the Chain so are never lost, and as you hold the keys for your address, then only you can access them..

05
What is your weight and network weight in the wallet mean? Does it affect how long it takes to get rewarded via staking? I've seen it say anywhere from 200 days to over a thousand days to earn reward. Just curious.


In easy terms, You could think in your weight as "age and quality" of the coins in your wallet for stake.

In more technical terms:

The weight of every address starts at 0.
When an address provides a signature, its weight increases so that after several signatures,
the weight approaches the number of coins in the address as of the last signature block:

New weight = 0.9 * Old weight + 0.1 * Balance

If a signature is not provided by the address in a signature block, its weight decreases:

New weight = 0.9 * Old weight

This way, addresses whose owners do not wish to participate in signing do not hamper the ability to reach a majority.

If an address signs two conflicting blocks, its weight is reset to 0. This is to limit the power of malicious stakeholders.
Okcash is self sustainable and is fully supported by voluntaries (Just like Bitcoin)

mvid

Thanks for the reply OKtoshi, but I had read that interview and the FAQ before I posted my question.  I was just wondering if there was more going on that what those say.  Since the code is open-source and know some c++, I will figure it out myself.

OKupdates

Quote from: mvid on December 19, 2016, 01:10:09 PM
Does the mining/staking of OKCash only require that our client/wallet is connected to the network and there is no actual PoW process that happens after the PoS?
Somebody please just explain the tech behind how the staking happens and blocks are added to the OKCash blockchain.   :P

Perfect, I thought those answer your question, in a direct manner to your questions we can say:

mining/staking: Only requirement is to have coins in the wallet, wallet must be unlocked for staking and online (hence connected to the other nodes in the network)

PoW - PoS: the coin started with PoW and PoS Hybrid distribution with Scrypt Algo until block 33,186 . After that block OK became full PoS, meaning the only way to mine/stake Okcash is now with the Proof of Stake process (having coins in your wallet with previous step requirements) and the Algo changed to Sha256 (to become inline with Bitcoin code and for the fact that Sha256 is the most tested algo for security and efficacy.

Sounds great and that is correct, the code is OpenSource and anyone can participate, feel free to DM me over Discord if there's anything I can help with.

Okcash is self sustainable and is fully supported by voluntaries (Just like Bitcoin)