Skip to content

Commit 286e415

Browse files
Nelbert442CaptainDeroSlixe8lecrammomahs
authored
Main into Testnet sync (#3)
* Optimizing Inefficient Functions Usecase. * Fixes: Wallet sync issues, certificate negative serial bug, bbolt dependency. * Reproducible builds implemented. Pruning & fastsync fixes. * Several bugs fixes. Thanks to Slixe. * implement gettxkey wallet function * Out of memory error fix. * anti TX spam * Update chain_sync.go * Wallet token support * Wallet token support * arm7 doesn't start syncing * add pull request template * improve pull request template * Fix: typos (deroproject#114) * add misc, explorer, simulator in PR template (deroproject#126) * add misc, explorer, simulator in PR template * explain branch process in template * update README.md & Start.md (deroproject#127) * RingSize Sanity Check Fix by Slixe * prevent leaking path in invalid change set request, verify valid order (deroproject#130) * fix --generate-new-wallet and support --wallet-file (deroproject#136) * search TXID in all tokens history * returns SCID in which it got found * update * improve changeSet topo verification (deroproject#137) * missing variable assignation * add comments, better verification * support asset selection in integrated address (deroproject#138) * support asset selection in integrated address * show all balances available * clean balance cache on rescan, lock * better display, error * support selected SCID integrated address creation * fix rpc payload sender real position (deroproject#147) * Fix broken fastsync (deroproject#149) * fix legacy code invalid error (deroproject#151) * Delete Readme.md --------- Co-authored-by: Captain <[email protected]> Co-authored-by: Slixe <[email protected]> Co-authored-by: 8lecramm <[email protected]> Co-authored-by: omahs <[email protected]> Co-authored-by: CaptainDero <[email protected]>
1 parent 8463b9b commit 286e415

27 files changed

+803
-560
lines changed

.github/pull_request_template.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Description
2+
3+
Please include a summary of the changes and the related issue.
4+
5+
**NOTE**: The process is the following:
6+
- Your pull request should be directed to `dev` branch.
7+
- When it will be merged in `dev`, we will merge it to `testnet` for tests, and then into `main` for final release.
8+
9+
Fixes # (issue)
10+
11+
## Type of change
12+
13+
Please select the right one.
14+
15+
- [ ] Bug fix (non-breaking change which fixes an issue)
16+
- [ ] New feature (non-breaking change which adds functionality)
17+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
18+
- [ ] This change requires a documentation update
19+
- [ ] This will require a HardFork to be enabled
20+
21+
## Which part is impacted ?
22+
23+
- [ ] Wallet
24+
- [ ] Daemon
25+
- [ ] Miner
26+
- [ ] Explorer
27+
- [ ] Simulator
28+
- [ ] Misc (documentation, comments, text...)
29+
30+
## Checklist:
31+
32+
- [ ] I have performed a self-review of my code
33+
- [ ] I have commented my code, particularly in hard-to-understand areas
34+
- [ ] My changes generate no new warnings
35+
36+
## License
37+
38+
Im am contributing & releasing the code under DERO Research License (which can be found [here](https://raw.githubusercontent.com/deroproject/derohe/main/license.txt)).

Changelog.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
### Welcome to the DEROHE Testnet
1+
### DERO HE Changelog
22

3-
[Explorer](https://testnetexplorer.dero.io) [Source](https://github.com/deroproject/derohe) [Twitter](https://twitter.com/DeroProject) [Discord](https://discord.gg/H95TJDp) [Wiki](https://wiki.dero.io) [Github](https://github.com/deroproject/derohe) [DERO CryptoNote Mainnet Stats](http://network.dero.io) [Mainnet WebWallet](https://wallet.dero.io/)
3+
### Release 117
4+
* Out of memory bug fix(Reported by Slixe)
45

5-
### DERO HE Changelog
6+
### Release 116
7+
* Added miniblock spam fix(Bug reported by Slixe)
8+
* Pruned chain can be rewinded till its pruned height only(Bug reported by Slixe)
9+
* Added a wallet crash fix
10+
* Fixed github issue 112
11+
* Fixed github issue 98
612

7-
[From Wikipedia: ](https://en.wikipedia.org/wiki/Homomorphic_encryption)
813

9-
###At this point in time, DERO blockchain has the first mover advantage in the following
14+
### At this point in time, DERO blockchain has the first mover advantage in the following
1015

1116
* Private SCs ( no one knows who owns what tokens and who is transferring to whom and how much is being transferred.)
1217
* Homomorphic protocol
@@ -22,11 +27,10 @@
2227
- Multi-send is now possible. sending to multiple destination per tx
2328
- DERO Simulator for faster development/testing
2429
- Few more ideas implemented and will be tested for review in upcoming technology preview.
25-
-
2630

2731

2832

29-
###3.4
33+
### 3.4
3034

3135
- DAG/MINIDAG with blocks flowing every second
3236
- Mining Decentralization.No more mining pools, daily 100000 reward blocks, no need for pools and thus no attacks
@@ -36,21 +40,21 @@
3640
- Implemented gas estimation
3741
- DVM simulator to test all edge cases for SC dev, see dvm/simulator_test.go to see it in action for lotter SC.
3842

39-
###3.3
43+
### 3.3
4044

4145
* Private SCs are now supported. (90% completed).
4246
* Sample Token contract is available with guide.
4347
* Multi-send is now possible. sending to multiple destination per tx
4448
* Few more ideas implemented and will be tested for review in upcoming technology preview.
4549

46-
###3.2
50+
### 3.2
4751

4852
* Open SCs are now supported
4953
* Private SCs which have their balance encrypted at all times (under implementation)
5054
* SCs can now update themselves. however, new code will only run on next invocation
5155
* Multi Send is under implementation.
5256

53-
###3.1
57+
### 3.1
5458

5559
* TX now have significant savings of around 31 * ringsize bytes for every tx
5660
* Daemon now supports pruned chains.
@@ -69,3 +73,5 @@
6973
###3.0
7074

7175
* DERO HE implemented
76+
77+

README.md

+264
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
# Welcome to DERO
2+
[Twitter](https://twitter.com/DeroProject) [Discord](https://discord.gg/H95TJDp) [GitHub](https://github.com/deroproject/derohe) [Explorer](https://testnetexplorer.dero.io) [Wiki](https://wiki.dero.io) [Web Wallet](https://wallet.dero.io/)
3+
4+
DERO is a blockchain with Smart Contracts preserving your privacy through multiple features while staying fast, secure, and accessible to all people easily.
5+
6+
DERO is running since December 2017 and was previously running on a unique implementation of CryptoNote protocol with blockDAG and as migrated to this unique version for Smart Contracts, Services, better performance, better privacy and more security.
7+
8+
## DERO Homomorphic Encryption
9+
10+
### What is "Homomorphic Encryption" ?
11+
12+
Homomorphic encryption (HE) is a form of encryption allowing one to perform calculations on encrypted data without decrypting it first. The result of the computation is in an encrypted form, when decrypted the output is the same as if the operations had been performed on the unencrypted data.
13+
14+
It can be used for privacy-preserving outsourced storage and computation. This allows data to be encrypted and out-sourced to commercial cloud environments for processing, all while encrypted. In highly regulated industries, such as health care, and can also be used to enable new services by removing privacy barriers inhibiting data sharing. For example, predictive analytics in health care can be hard to apply via a third party service provider due to medical data privacy concerns, but if the predictive analytics service provider can operate on encrypted data instead, these privacy concerns are diminished.
15+
16+
For more details of what is Homomorphic Encryption, please see [Wikipedia](https://en.wikipedia.org/wiki/Homomorphic_encryption).
17+
18+
## Summary
19+
20+
- [Welcome to DERO](#welcome-to-dero)
21+
- [DERO Homomorphic Encryption](#dero-homomorphic-encryption)
22+
- [What is "Homomorphic Encryption" ?](#what-is-homomorphic-encryption-)
23+
- [Summary](#summary)
24+
- [About DERO Project](#about-dero-project)
25+
- [Features](#features)
26+
- [Transactions Sizes](#transactions-sizes)
27+
- [Network Ports](#network-ports)
28+
- [Mainnet](#mainnet)
29+
- [Testnet](#testnet)
30+
- [Technical](#technical)
31+
- [DERO blockchain salient features](#dero-blockchain-salient-features)
32+
- [**Erasure Coded Blocks**](#erasure-coded-blocks)
33+
- [Client Protocol](#client-protocol)
34+
- [Proving DERO Transactions](#proving-dero-transactions)
35+
- [DERO Installation](#dero-installation)
36+
- [Installation From Source](#installation-from-source)
37+
- [Installation From Binary](#installation-from-binary)
38+
- [Running DERO Daemon](#running-dero-daemon)
39+
- [DERO CLI Wallet](#dero-cli-wallet)
40+
- [DERO Explorer](#dero-explorer)
41+
42+
## About DERO Project
43+
44+
DERO is running since December 2017 and was previously running on a unique [implementation](https://github.com/deroproject/derosuite) of CryptoNote protocol with blockDAG and as migrated to this unique version for Smart Contracts, Services, better performance, better privacy and more security.
45+
46+
Consensus algorithm is PoW based on [AstroBWT](https://github.com/deroproject/astrobwt), a ASIC/FPGA/GPU resistant CPU mining algorithm to improve decentralization and lower the barrier of joining the network.
47+
48+
DERO is industry leading and the first blockchain to have Homomorphic Encryption, bulletproofs and a fully TLS encrypted network.
49+
50+
The fully distributed ledger processes transactions with a 16s (sixty-seconds) average block time and is secure against majority hashrate attacks.
51+
52+
DERO is the first Homomorphic Encryption based blockchain to have Smart Contracts contracts on its native chain without any extra layers or secondary blockchains.
53+
54+
At present DERO has implemented Smart Contracts for previous mainnet implementation running on CryptoNote protocol which can be found [here](https://github.com/deroproject/documentation/blob/master/testnet/stargate.md).
55+
56+
#### Features
57+
58+
- **Homomorphic account based model**
59+
Check blockchain/transaction_execute.go line 82-95
60+
61+
- **Instant account balances**
62+
It need only 66 bytes of data from the blockchain.
63+
64+
- **~~DAG/MINIDAG with 1 miniblock every second~~**
65+
**NOTE**: This as been replaced by a mini block system. Each block has 10 mini blocks to rewards up to 10 differents miners at the same time for each block, by splitting the difficulty and the result of the final block.
66+
67+
- **Mining Decentralization**
68+
No more mining pools needed, with a daily ~54000 mini blocks.
69+
Solo Mining is much more available than any others blockchains.
70+
71+
- **Erasure coded blocks**
72+
Worlds first Erasure Coded Propagation protocol, which allows 100x block size without increasing propagation delays, lower bandwidth requirements and provide very low propagation time.
73+
74+
- **Light weight and efficient wallets**
75+
No more chain scanning or wallet scanning the whole chain to detect funds, no key images. By connecting to a synchronized node, you will retrieve your available funds in few seconds.
76+
77+
- **Small disk cost for blockchain account**
78+
Fixed per account cost of 66 bytes in blockchain only which allow a immense scalability.
79+
80+
- **Anonymous Transactions**
81+
Provide completely anonymous transactions and deniability thanks to Many-Out-Of-Many Proofs using Bulletproofs and Sigma Protocol, nobody except you and the receiver account will know the real parties of the transaction.
82+
83+
- **Fixed Transaction Size**
84+
Only ~2.5KB for a transaction using ring size set to 8, or ~3.4 KB with ring size set to 16.
85+
Transactions size have a logarithm growth based on the anonymity set and must be chosen in powers of 2.
86+
87+
- **Homomorphic Assets**
88+
programmable Smart Contracts with fixed overhead per asset.
89+
Your Smart Contract is open source but its data related to balances are completely encrypted like the native coin.
90+
91+
- **Pruning Blockchain**
92+
Allows chain pruning on daemons to control growth of data on daemons and keep a low disk usage. This allows immense scability as you can reduce a blockchain of few hundred GBs to only few GBs while still being secure using merkle proofs.<br>
93+
_Example_: disk requirements of 1 billion accounts (assumming it does not want to keep history of transactions, but keeps proofs to prove that the node is in sync with all other nodes)<br>
94+
Requirement of 1 account is only 66 bytes
95+
Assumming storage overhead per account of 128 bytes (which is constant)
96+
Total requirements = (66 + 128)GB ~ 200GB
97+
Assuming we are off by factor of 4, its only 800GB.<br>
98+
Note that, Even after 1 trillion transactions, 1 billion accounts will consume 800GB only, If history is not maintained, and everything still will be in proved state using merkle roots.
99+
And so, Even Raspberry Pi can host the entire chain.
100+
101+
- **Low Transaction Generation Time**
102+
Generating a transaction takes less than 25 ms.
103+
104+
- **Low Transaction Verification Time**
105+
Transaction verification takes even less than 25ms.
106+
107+
- **No trusted setup, no hidden parameters**
108+
Everything is open-source, available, to anyone to provide trustless and fully decentralized blockchain.
109+
110+
- **Provability**
111+
Senders of a transaction can prove to receivers what amount they have send without revealing themselves.
112+
113+
114+
## Transactions Sizes
115+
116+
| Ring Size | Transaction Size (in bytes) |
117+
|:---------:|:---------------------------:|
118+
| 2 | 1553 |
119+
| 4 | 2013 |
120+
| 8 | 2605 |
121+
| 16 | 3461 |
122+
| 32 | 4825 |
123+
| 64 | 7285 |
124+
| 128 | 11839 |
125+
| 512 | ~35000 |
126+
127+
**NOTE:** Plan to reduce TX sizes further.
128+
129+
## Network Ports
130+
131+
### Mainnet
132+
133+
- **P2P Default Port**: 10101
134+
- **RPC Default Port**: 10102
135+
- **Wallet RPC Default Port**: 10103
136+
137+
### Testnet
138+
139+
- **P2P Default Port**: 40401
140+
- **RPC Default Port**: 40402
141+
- **Wallet RPC Default Port**: 40403
142+
143+
## Technical
144+
145+
For specific details of current DERO core (daemon) implementation and capabilities, see below:
146+
147+
- ~~**DAG**: No orphan blocks, No soft-forks.~~
148+
**NOTE**: This feature has been disabled for mainnet to reduce load for small devices.
149+
150+
- **BulletProofs**: Non Interactive Zero-Knowledge Range-Proofs (NIZK)
151+
152+
- **AstroBWT**: This is memory-bound algorithm. This provides assurance that all miners are equal. ( No miner has any advantage over common miners).
153+
154+
- **P2P Protocol**: This layers controls exchange of blocks, transactions and blockchain itself.
155+
156+
- **Pederson Commitment**: (Part of ring confidential transactions): Pederson commitment algorithm is a cryptographic primitive that allows user to commit to a chosen value while keeping it hidden to others. Pederson commitment is used to hide all amounts without revealing the actual amount. It is a homomorphic commitment scheme.
157+
158+
- **Homomorphic Encryption**: Homomorphic Encryption is used to to do operations such as addition/substraction to settle balances with data being always encrypted (Balances are never decrypted before/during/after operations in any form.).
159+
160+
- **Homomorphic Ring Confidential Transactions**: Gives untraceability, privacy and fungibility while making sure that the system is stable and secure.
161+
162+
- **Core-Consensus Protocol implemented**: Consensus protocol serves 2 major purpose:
163+
- Protects the system from adversaries and protects it from forking and tampering.
164+
- Next block in the chain is the one and only correct version of truth (balances).
165+
166+
- **Proof-of-Work(PoW) algorithm**: PoW part of core consensus protocol which is used to cryptographically prove that X amount of work has been done to successfully find a block.
167+
168+
- **Difficulty algorithm**: Difficulty algorithm controls the system so as blocks are found roughly at the same speed, irrespective of the number and amount of mining power deployed.
169+
170+
- **Serialization/De-serialization of blocks**: Capability to encode/decode/process blocks.
171+
172+
- **Serialization/De-serialization of transactions**: Capability to encode/decode/process transactions.
173+
174+
- **Transaction validity and verification**: Any transactions flowing within the DERO network are validated, verified.
175+
176+
- **Socks proxy**: Socks proxy has been implemented and integrated within the daemon to decrease user identifiability and improve user anonymity.
177+
178+
- **Interactive daemon**: can print blocks, txs, even entire blockchain from within the daemon
179+
- `version`, `peer_list` `status`, `diff`, `print_bc`, `print_block`, `print_tx` and several other commands implemented
180+
181+
- **Networks**: DERO Daemon has both mainnet and testnet support.
182+
183+
- **Enhanced Reliability, Privacy, Security, Useability, Portabilty assured.**
184+
185+
## DERO blockchain salient features
186+
187+
- 16 Second Block time.
188+
- Extremely fast transactions with one minute/block confirmation time.
189+
- SSL/TLS P2P Network.
190+
- Homomorphic: Fully Encrypted Blockchain
191+
- Ring signatures.
192+
- Fully Auditable Supply.
193+
- DERO blockchain is written from scratch in Golang.
194+
- Developed and maintained by original developers.
195+
196+
#### **Erasure Coded Blocks**
197+
198+
Traditional Blockchains process blocks as single unit of computation(if a double-spend tx occurs within the block, entire block is rejected). As soon as a block is found, it is sent to all its peers.DERO blockchain erasure codes the block into 48 chunks, dispersing and chunks are dispersed to peers randomly.Any peer receiving any 16 chunks( from 48 chunks) can regerate the block and thus lower overheads and lower propagation time.
199+
200+
#### Client Protocol
201+
202+
Traditional Blockchains process blocks as single unit of computation(if a double-spend tx occurs within the block, entire block is rejected). However DERO network accepts such blocks since DERO blockchain considers transaction as a single unit of computation.DERO blocks may contain duplicate or double-spend transactions which are filtered by client protocol and ignored by the network. DERO DAG processes transactions atomically one transaction at a time.
203+
204+
#### Proving DERO Transactions
205+
206+
DERO blockchain is completely private, so anyone cannot view, confirm, verify any other's wallet balance or any transactions.
207+
208+
So to prove any transaction you require *TXID* and *deroproof*.
209+
deroproof can be obtained using `get_tx_key` command in dero-wallet-cli.
210+
211+
Enter the *TXID* and *deroproof* in [DERO Explorer](https://testnetexplorer.dero.io)
212+
![DERO Explorer Proving Transaction](https://github.com/deroproject/documentation/raw/master/images/explorer-prove-tx.png)
213+
214+
## DERO Installation
215+
216+
DERO is written in golang and very easy to install both from source and binary.
217+
218+
### Installation From Source
219+
220+
First you need to install Golang if not already, minimum version required for Golang is 1.17.
221+
222+
In go workspace, execute:
223+
`go get -u github.com/deroproject/derohe/...`
224+
225+
When the command has finished, check go workspace bin folder for binaries.
226+
For example, on Linux machine the following binaries will be created:
227+
- `derod-linux-amd64`: DERO Daemon
228+
- `dero-wallet-cli-linux-amd64`: DERO CLI Wallet
229+
- `explorer-linux-amd64`: DERO Explorer (Yes, DERO has prebuilt personal explorer also for advance privacy users)
230+
231+
### Installation From Binary
232+
233+
Download [DERO binaries](https://github.com/deroproject/derohe/releases) for ARM, INTEL, MAC platform and Windows, Mac, FreeBSD, OpenBSD, Linux (or any others availables platforms) operating systems.
234+
235+
### Running DERO Daemon
236+
237+
Run derod.exe or derod-linux-amd64 depending on your operating system. It will start syncing.
238+
239+
- DERO daemon core cryptography is highly optimized and fast.
240+
- Use dedicated machine and SSD for best results.
241+
- VPS with 2-4 Cores, 4GB RAM,15GB disk is recommended.
242+
243+
![DERO Daemon](https://raw.githubusercontent.com/deroproject/documentation/master/images/derod1.png)
244+
245+
### DERO CLI Wallet
246+
DERO cmdline wallet is menu based and very easy to operate.
247+
248+
Use various options to create, recover, transfer balance etc.
249+
250+
**NOTE:** DERO cmdline wallet by default connects DERO daemon running on local machine on port 20206.
251+
252+
If DERO daemon is not running start DERO wallet with --remote option like following:
253+
254+
**./dero-wallet-cli-linux-amd64 --remote**
255+
256+
![DERO Wallet](https://raw.githubusercontent.com/deroproject/documentation/master/images/wallet-recover2.png)
257+
258+
### DERO Explorer
259+
260+
[DERO Explorer](https://explorer.dero.io/) is used to check and confirm transaction on DERO Network.
261+
262+
DERO users can run their own explorer on local machine and can [browse](http://127.0.0.1:8080) on local machine port 8080.
263+
264+
![DERO Explorer](https://github.com/deroproject/documentation/raw/master/images/dero_explorer.png)

0 commit comments

Comments
 (0)