ZeroCoinOrganization / Zerocoin-wallet

1 stars 0 forks source link

Genesis block (500m ZNC generated) #4

Closed danimesq closed 2 years ago

danimesq commented 5 years ago
danimesq commented 5 years ago

@imachug

purplesyringa commented 5 years ago

Oh. My. God. Are you building a blockchain in ZeroNet?

If you are, I replace you with we and ask: Are we building a blockchain in ZeroNet?

danimesq commented 5 years ago

@imachug

Are we building a blockchain in ZeroNet?

Yes, because of it I mentioned you. As created a PeerMessage plugin, you have some knowledge about how implement a basic blockchain on ZeroNet. Basic, and centralized, but while we don't make it beta/stable.

The genesis block haves no sender, just registering that the OF (Open Fund, that haves a privatekey) haves 500m ZNC (Zerocoins).

purplesyringa commented 5 years ago

Personally, I don't know much about blockchains, but I think I know how they work.

So, are we making Etherium or BitCoin? I.e. will we have some logic or just money?

danimesq commented 5 years ago

@imachug I invited you as admin: https://github.com/ZeroNetPlus/Zerocoin/invitations

So, are we making Etherium or BitCoin?

For now, something like Bitcoin, but more like Ripple, since it is centralized because we have no enough knowledge to make it decentralized. But after some implementations, we need to make it full-decentralized and scalable unlike some other blockchains.

I.e. will we have some logic or just money?

Beginning, just a cryptocurrency to fund ZeroNet and other related projects.

After some works, we will make an crowdsale (another 500m available, but as Ethereum placeholder tokens), and rename/rebrand it as Zerum blockchain, supporting smart contracts on scalable sidechains.

purplesyringa commented 5 years ago

I invited you as admin: https://github.com/ZeroNetPlus/Zerocoin/invitations

Thank you.

danimesq commented 5 years ago

A blockchain (merkle three), maybe using some of Git features. You can make a Git plugin, that also works as archive for zites.

danimesq commented 5 years ago

@imachug This repo is of the wallet (cointaining the blockchain), that is a merged site of the main site.

As ZeroNet uses Bitcoin cryptography, Zerocoin will use Bitcoin address. Maybe we can import transactions of Bitcoin, like BCH did? (it will attract Bitcoin users, like a fork) The block 0 will contain the data telling that the Open Fund (a privatekey managed by me, you and any other developer we trust) haves 500,000,000 ZNC. This genesis block can contain data based on Bitcoin, such as coin name, symbol, etc.

The next block (issue #5) will be about our transactions (as we manage the OF's privatekey) to developer's address, to help them fund their projects.

danimesq commented 5 years ago

To remember, it is not a mineable currency, but centralized, as test, while we can't make it more reliable.

purplesyringa commented 5 years ago

By the way, I'm not sure whether Git is what we can use. First, if we add a Git plugin, we have to make it secure, because size limits won't apply there. We'll also have git to be installed. Though this may not be a problem when there aren't miners, if we're going to scale, that's going to be a huge problem.

My solution is to simulate how BitCoin works.

  1. Anyone can create a transaction he's going to make in his data/users/.../data.dat, where data.dat is a binary file. The data file is published, and the transaction is also sent via PeerMessage.
  2. The miners (in the simpliest case, the Open Fund) check all the transactions the way they want (see below) and mine them. In the Open Fund case, mining looks like signing the block with Open Fund's private key. In case anyone can mine, it looks like adding a nonce till the block starts with 00000 or something like that -- we'll have to make some experiments here or use BitCoin's code.
  3. The mined blocks are saved to data/users/.../blocks.dat (in binary format) and published via PeerMessage.
  4. The users can now handle the new block.

Mining algorithm

The mining algorithm could looks like this:

  1. If there are at least 10 transactions, go to 6.
  2. Wait for 10 seconds.
  3. If there are at least 10 transactions, go to 6.
  4. Mine all the transactions that exist.
  5. Go to 1.
  6. Mine some 10 transactions.

Transaction format

The transaction format should looks like this:

+-----------+----------------------+
| 4b length |         data         |
+-----------+----------------------+

In data.dat, the transactions are just joined one-after-one.

This format can be used in several ways. In case we have BitCoin, we can use:

+--------+-------------------------+-----------+
| 1b 'T' | 64b destination address | 4b amount |
+--------+-------------------------+-----------+

The real destination address is generated as [0x04] + destination_address (see https://en.bitcoin.it/w/images/en/4/48/Address_map.jpg).

Block format

There will be two kinds of blocks, the first one for Open Fund and another one for miners.

Open Fund:

+--------+---------------+--------------+---------------+---------------+-----+---------------+
| 1b 'F' | 72b signature | 4b tr. count | transaction 1 | transaction 2 | ... | transaction N |
+--------+---------------+--------------+---------------+---------------+-----+---------------+

Miners:

+--------+-------------------+----------+--------------+---------------+---------------+-----+---------------+
| 1b 'M' | 64b miner pub key | 8b nonce | 4b tr. count | transaction 1 | transaction 2 | ... | transaction N |
+--------+-------------------+----------+--------------+---------------+---------------+-----+---------------+

...Where transaction is defined as follows:

+--------------------+---------------------+
| 64b sender address | ?b user transaction |
+--------------------+---------------------+

The miner pub key field is where some amount of money is given if the block is valid. Again, it's generated like [0x04] + miner_pub_key.

Admin rights for Open Fund

This is under discussion.

In fact, there will be 4 types of transactions.

Transfer

+--------+-------------------------+-----------+
| 1b 'T' | 64b destination address | 4b amount |
+--------+-------------------------+-----------+

This kind of transactions means that we transfer amount money from sender (see Block format section) to destination.

These transactions can be created by all users.

Add

+--------+-------------------------+-----------+
| 1b 'A' | 64b destination address | 4b amount |
+--------+-------------------------+-----------+

This adds amount money to destination. This command can only be issued by the Open Fund.

Subtract

+--------+-------------------------+-----------+
| 1b 'U' | 64b destination address | 4b amount |
+--------+-------------------------+-----------+

This subtracts amount money from destination. This command can only be issued by the Open Fund.

Set

+--------+-------------------------+-----------+
| 1b 'S' | 64b destination address | 4b amount |
+--------+-------------------------+-----------+

This gives destination exactly amount money. This command can only be issued by the Open Fund.

danimesq commented 5 years ago

@imachug Personally I don't liked the Add/Substract/Set transaction format, since it makes Zerocoin too much centralized, like a bank. Not good to can create new coins, it will make Zerocoin worthless. The better is to generate all available amounts in genesis block, where Open Funds haves 500 million ZNC that can distribute to developers/projects.

danimesq commented 5 years ago

"Miners" you mean the nodes/peers? There will really have mining?

purplesyringa commented 5 years ago

Okay. It was just an example of different transactions, so ee can remove T probably.

danimesq commented 5 years ago

Admin rights for Open Fund This is under discussion.

The admin rights for Open Fund is just for now, but after the launch of Zerum (ZBC), it will be fully decentralized. Maybe in care of miners/master nodes.

danimesq commented 5 years ago

We should make it Proof-of-Stack, but not for now, since it is proof-of-concept. For now, just create the genesis block, and distribute transactions for developers (they are common nodes, but is nodes we choose to fund), and they can spent it to other nodes, for sample, to buy a .com domain in the forum's marketplace.

danimesq commented 5 years ago

I don't think pushing all Bitcoin's code is good, since it will require more efforts, but it is just a initial proof-of-concept, and we can make it simply work in some months or less.

danimesq commented 5 years ago

Mining algorithm If there are at least 10 transactions, go to 6. Wait for 10 seconds. If there are at least 10 transactions, go to 6. Mine all the transactions that exist. Go to 1. Mine some 10 transactions.

Go to 6? What 6? I didn't understood this.

What is the estimated number of transactions per second at this form? Ripple can achieve 1,500 transactions per second, even more faster than Bitcoin.

danimesq commented 5 years ago

@imachug

purplesyringa commented 5 years ago

Go to 6? What 6?

That algorithm is to mine at least 10 transactions. If there're less, wait for more. We can increase that to 1500, like in Ripple, and it'll be that fast.

danimesq commented 5 years ago

We can increase that to 1500, like in Ripple, and it'll be that fast.

But what are the security implications of this increase?

danimesq commented 5 years ago

Do you think 1500 transactions is really possible? Reference: #1

purplesyringa commented 5 years ago

We need about 5 machines in case we want the transactions to propogate at most 1 second. In case we just mean that it's okay that all the transactions wait 5 seconds till they're published, that's defenitely possible even with 1 machine.

danimesq commented 5 years ago

We need about 5 machines in case we want the transactions to propogate at most 1 second. In case we just mean that it's okay that all the transactions wait 5 seconds till they're published, that's defenitely possible even with 1 machine.

@krixano @d14na

Do you want to be nodes?

danimesq commented 5 years ago

If they accept, then Zerocoin haves 4 machines.

purplesyringa commented 5 years ago

Hm... @shortcutme and @AnthyG?

danimesq commented 5 years ago

We need about 5 machines in case we want the transactions to propogate at most 1 second. In case we just mean that it's okay that all the transactions wait 5 seconds till they're published, that's defenitely possible even with 1 machine.

@blurHY @tangdou1 @BenMcLean @rllola @slrslr @trenta3 @misses-robot @anoadragon453

purplesyringa commented 5 years ago

lol

danimesq commented 5 years ago

@imachug

What are the next things you think about it?

slrslr commented 5 years ago

@DaniellMesquita my Linux VPS can also be used to host an application (node?) if needed, just contact me once it is needed. But i have like 512MB RAM and like 10GB disk space and i would not guarantee 100% uptime. Btw. when reading this thread, i do not like the Bitcoin's proof of work concept because it is not eco friendly (too much electricity needed to confirm one stupid transaction). Though if this crypto will be low used project maybe not so big issue. Cloning and managing new crypto currency seems to me like full time task, i do not see any big reason to create it as a non developer/programmer. You think it is doable to make it popular and being useful/have some value? Though i am probably not a person that should be addressed in this project, as i am only a user, not a dev.

danimesq commented 5 years ago

Though if this crypto will be low used project maybe not so big issue.

For while it is centralized, then not worry about it, in ZBC we can think in a eco friendly mining (proof-of-stack).

Cloning and managing new crypto currency seems to me like full time task, i do not see any big reason to create it as a non developer/programmer. You think it is doable to make it popular and being useful/have some value? Though i am probably not a person that should be addressed in this project, as i am only a user, not a dev.

If you don't want, don't do it. I was thinking that you would quickly/magically change your mind, and it happened. liar

AnthyG commented 5 years ago

Hmm, I only have my main computer, and I can't and don't want to keep it on all the time, but if there's a way I can help, I'll try my best to do so (keep in mind that I am currently in my final year of school, so I don't have that much time on hand).

rllola commented 5 years ago

Why do you want to create another coin ?

danimesq commented 5 years ago

@rllola

Why do you want to create another coin ?

Why do they want to boycott it?

danimesq commented 5 years ago

@slrslr

If you don't want, don't do it. I was thinking that you would quickly/magically change your mind, and it happened. liar

Oh, its you slrslr! I throught was @imachug commenting that doesn't will develop it anymore (I had lots of partnered projects boycotted), because your avatars are very similar (Identicons). But I well supose Imachug will not want to work on Zerocoin, creating some reason. It happened once with other devs.

Sorry @slrslr @imachug @rllola .

I'm off to sleep and didn't throught well on reading.

danimesq commented 5 years ago

@slrslr

my Linux VPS can also be used to host an application (node?)

@imachug can answer how do it after, but yes, you can be a node with your VPS.

if needed, just contact me once it is needed. But i have like 512MB RAM and like 10GB disk space and i would not guarantee 100% uptime.

Thanks, already helpful.

Btw. when reading this thread, i do not like the Bitcoin's proof of work concept because it is not eco friendly (too much electricity needed to confirm one stupid transaction).

It will not use proof-of-work, and will be eco friendly since it doesn't haves mining.

Though if this crypto will be low used project maybe not so big issue.

Not good if low used, then ZeroNet will also be low used.

Cloning and managing new crypto currency seems to me like full time task, i do not see any big reason to create it as a non developer/programmer.

I didn't invited you to create it, but to help reach good transaction-per-second speed.

You think it is doable to make it popular and being useful/have some value?

Yes, since in block 3 all Bitcoin's balances will be imported, acting like a hard fork. If it gets popular, it will have worth (because it is scarce and fungible), then ZeroNet developers will can exchange coins to physical money, and be incentived to build ZeroNet better.

@AnthyG

Hmm, I only have my main computer, and I can't and don't want to keep it on all the time, but if there's a way I can help, I'll try my best to do so

Thank you. When launched the block 1, I'll tell you. You will earn some ZNC, since you're a developer.

@rllola

Why do you want to create another coin ?

Another?

purplesyringa commented 5 years ago

Well... I guess a coin is just a step. Come on, who needs another coin if we already have Bitcoin? But we have so many cryptocurrencies now... Using ZeroNet will help making blockchains easier. It'll be a great tool. So, it's like Etherium but very customizable. Do you remember that you can build Bitcoin in a few lines of Solidity? You'll be able to build Etherium with a few lines of JavaScript now.

purplesyringa commented 5 years ago

I throught was @imachug commenting that doesn't will develop it anymore (I had lots of partnered projects boycotted), because your avatars are very similar (Identicons). But I well supose Imachug will not want to work on Zerocoin, creating some reason. It happened once, with @mkg20001 and other devs.

Well... Blockchain is an interesting thing I've always wanted to develop. It's awesome, in fact. ZeroNet is awesome as well. So why not merge two awesome things?.. Why would I create a reason not do something twice-awesome?!

blurHY commented 5 years ago

So there is a real ZeroCoin now. Does it use proof-of-work ? If it does,it will be waste of resource. I would not like to join the global warming

purplesyringa commented 5 years ago

Our Zerocoin will be a tool to build a blockchain. You can set any rules which define whether a block is correct. It can be a signature check in Open Fund case, or proof of work, or anything else you can imagine.

trenta3 commented 5 years ago

@imachug Can you be more specific? The idea really attracts me, since I've also always wanted to create a new cryptocurrency. How do you intend to build a tool to build a blockchain? I've tried reading the organization repositories and site but I got lost.

mkg20001 commented 5 years ago

@DaniellMesquita

But I well supose Imachug will not want to work on Zerocoin, creating some reason. It happened once, with @mkg20001 and other devs.

I'd appreceiate it if you wouldn't mention me as an example. I didn't "create" a reason. This wasn't the first project I dropped because it got boring and didn't seem like it was worth it.

With that said I'd still like to contribute towards this project. I could host a node, too.

trenta3 commented 5 years ago

@DaniellMesquita Also is there any wiki page set up with some ideas or to start writing ideas about technical details?

I could also host a node

purplesyringa commented 5 years ago

I think we should use GitHub wiki for documentation. I'll put some ideas here now.

trenta3 commented 5 years ago

@imachug I can't see in which wiki are you writing. All the wikis of the repositories of this organization redirect back to the repository code... Could you please insert link here to the wiki?

purplesyringa commented 5 years ago

Err... I haven't started writing it yet, maybe in a few hours. It'll be here: https://github.com/ZeroCoinOrganization/Documentation/wiki

danimesq commented 5 years ago

@imachug

I guess a coin is just a step

It is the first step.

who needs another coin if we already have Bitcoin?

Bitcoin doesn't directly funds ZeroNet.

But we have so many cryptocurrencies now...

Lots of cryptocurrencies for promoting/funding projects, then ZeroNet also needs this.

Using ZeroNet will help making blockchains easier.

Yes, remember Ethereum's CryptoKitties needed to rely on the slow IPFS to store images.

It'll be a great tool.

If it is fast and very scalable, yes. But we shouldn't think about the blockchain platform now, but after we rebrand Zerocoin to Zerum blockchain platform.

You'll be able to build Etherium with a few lines of JavaScript now.

Lisk already supports blockchains (side-chains) written on JavaScript, but I don't know if smart contract is supported.

Blockchain is an interesting thing I've always wanted to develop. It's awesome, in fact. ZeroNet is awesome as well. So why not merge two awesome things?.. Why would I create a reason not do something twice-awesome?!

Yes, both cryptocurrency/blockchain platform (ZNC) free distributed hosting/reliable Internet network (ZN). Exchanges can install ZeroNet and list ZNC, but it will need RPC API.

@blurHY

So there is a real ZeroCoin now. Does it use proof-of-work ? If it does,it will be waste of resource. I would not like to join the global warming

It is not mineable yet, but centralized by Open Fund. But when it turns into blockchain platform, maybe it can be proof-of-stack, or a web-friendly algorithm like what Monero uses.

@imachug

Our Zerocoin will be a tool to build a blockchain. You can set any rules which define whether a block is correct. It can be a signature check in Open Fund case, or proof of work, or anything else you can imagine.

Open Fund managing independent blockchains? I think we need to make it centralized but just for now, then rebrand it as Zerum and make it decentralized.

@trenta3

Can you be more specific? The idea really attracts me, since I've also always wanted to create a new cryptocurrency. How do you intend to build a tool to build a blockchain?

We can have inspiration on Lisk, to turn it into a platform for side-chains.

@mkg20001

I'd appreceiate it if you wouldn't mention me as an example.

Sorry, I removed it.

I didn't "create" a reason. This wasn't the first project I dropped because it got boring and didn't seem like it was worth it.

Sure.

With that said I'd still like to contribute towards this project. I could host a node, too.

Pull requests fixing bugs/vulnerabilities or improving something you want is very welcome. Thanks for offer node hosting, it will secure the network and make it faster, thanks.

@trenta3

@DaniellMesquita Also is there any wiki page set up with some ideas or to start writing ideas about technical details?

I'm writing a bit and creating titles.

I could also host a node

Thanks! @imachug what do you think about ZNC coins for nodes? Maybe detecting lots of content publishings as proof-of-work, for sample, the transactions stored on nodes. It can also spawn new programmed blocks automatically and verifiable, without relying on Open Fund to generate new blocks. (but block 0-2 will need to be created by Open Fund, becase block 0 is the initial, block 1 is test transactions for ZeroNet developers/contributors, and block 2 is importing from Bitcoin balances)

@imachug

I think we should use GitHub wiki for documentation. I'll put some ideas here now.

Err... I haven't started writing it yet, maybe in a few hours. It'll be here: https://github.com/ZeroCoinOrganization/Documentation/wiki

Thanks, me too, I need to create templates/titles on the wiki, for fill.

danimesq commented 5 years ago

Zerocoin's zite: http://127.0.0.1:43110/1ZCoinP3651Ecq8mgJtuQ7wAHpnG7v34v

d14na commented 5 years ago

@DaniellMesquita hey, been OTG for a bit, working on getting the first Demo for SUPeer up and running asap.

But, absolutely I love the idea of integrating Zeronet with crypto! I have VPS resources available and would be very very happy to support your project. I have very extensive experience with Blockchains (been in that game since '12) and I could definitely provide technical support.

However, as you may already be aware, I'm already working on a token called ZeroGold. So I wouldn't be able to join your team, "officially", but I believe that ALL cryptos are welcome and will support any and all efforts to expand the Zeronet ecosystem.

TL;DR

  1. 0GOLD is a standard ERC-20 Ethereum token.
  2. 0GOLD is a NEW type of mineable token (see here)
  3. Most of the "Core" projects of Zer0net will integrate ZeroGold smart contracts in some way.

Creating a new blockchain is NOT a bad idea, as long as you have the community support to provide sufficient mining power to secure the chain. This is NOT easy. I think you're on the right track modeling after Ripple and keeping it relatively centralized (ie very efficient), but I'd say also take a look at Stellar, as I believe their tech AND their team are much more user-friendly (as they came from the same place).

I've kinda of been over Bitcoin since the drama started in '16 with the block size wars. It really hurt (read. destroyed) one of my businesses and I well I'm still pretty bitter about the whole thing lol. I have several project coming out that will heavily rely on the Ethereum Virtual Machine (EVM) and smart contracts. And this is where my current focus is...

I see a problem with scalability on Zeronet, due to the FULL dataset of each zite being required to be downloaded, stored and updated for each peer. Using smart contracts, MUCH of that data can be stored in the EVM and simply accessed by the peers that need the data to interact with the zites. CAVEAT IS, YOU NEED CRYPTO TO MAKE CHANGES So, whereas anyone can READ from the contracts, you have to PAY TO WRITE. Ethereum is very cheap now, so txs are like US$0.01 or so, but if that were to change, then it could become a problem for users that were heavy on community engagement.

Anyway, feel free to ask me anything about crypto and/or blockchains. If I don't have the answer, I certainly know the people who do. I wish you good luck!

danimesq commented 5 years ago

@d14na zGold and ZNC are different projects with different purposes, and I agree that more than one cryptocurrency is good for the ecosystem.

YOU NEED CRYPTO TO MAKE CHANGES ** So, whereas anyone can READ from the contracts, you have to PAY TO WRITE.

@april93 I don't think so, ZeroNet can really be scalable without need to pay even a little fraction of cent. Telegram would be usable if users needed to pay 0.00001 cent for every message? Or Twitter charging 0.000000001 cent for every post?

Zerocoin need to be a blockchain that doesn't looks like a blockchain.

mkg20001 commented 5 years ago

@DaniellMesquita

I don't think so, ZeroNet can really be scalable without need to pay even a little fraction of cent. Telegram would be usable if users needed to pay 0.00001 cent for every message? Or Twitter charging 0.000000001 cent for every post?

(Note: I'm talking about the blockchain, not zeronet itself which already has such limits and protections in place)

Then there need to be strict rules to prevent people from just filling up everyones hard drives with garbage. Because if everyone can write an unlimited amount this is going to get abused. (And - unless accounts are somehow verified - anyone can create an unlimited number of accounts so per-account limits are somewhat useless in that case)

And even if the only thing that can be written into the blockchain are transcation: Without fees anyone can just take a non-zero amount of coins, split them to fractions accross hundreds of addresses and transfer them back-and-forth 24/7. That generates enough valid garbage to make the blockchain huge in a week.

(Just wanted to mention all ways this can go bad - not critising)