forked from such-gitea/wownero
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
785942478b | ||
|
|
adfcdfef02 | ||
|
|
7d928031f6 | ||
|
|
a571be96f4 | ||
|
|
cd0076c68c | ||
|
|
4882e3e0e1 | ||
|
|
e8bb8f4984 | ||
|
|
78f1e84139 | ||
|
|
16feef0522 | ||
|
|
e4c76da69c | ||
|
|
6f9d70b246 | ||
|
|
3ed6bf8518 | ||
|
|
66d8024b43 | ||
|
|
43a6abcd10 | ||
|
|
8303962716 | ||
|
|
3162f5bcd6 | ||
|
|
52572e9b21 | ||
|
|
89edbb27b5 | ||
|
|
019c9b0f56 | ||
|
|
0b26e58497 | ||
|
|
da7337e623 | ||
|
|
0ac4b8e63e | ||
|
|
a47d1a3d75 | ||
|
|
efe03eb037 | ||
|
|
427de2986f | ||
|
|
c0f5f8994b | ||
|
|
a801517396 | ||
|
|
ff29cd248d |
4
Makefile
4
Makefile
@@ -62,7 +62,7 @@ release-test:
|
||||
|
||||
release-all:
|
||||
mkdir -p build/release
|
||||
cd build/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE)
|
||||
cd build/release && cmake -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE)
|
||||
|
||||
release-static:
|
||||
mkdir -p build/release
|
||||
@@ -92,7 +92,7 @@ release-static-linux-armv8:
|
||||
|
||||
release-static-linux-x86_64:
|
||||
mkdir -p build/release
|
||||
cd build/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-x64" ../.. && $(MAKE)
|
||||
cd build/release && cmake -D BUILD_TESTS=OFF STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="linux-x64" ../.. && $(MAKE)
|
||||
|
||||
release-static-freebsd-x86_64:
|
||||
mkdir -p build/release
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Monero daemon internationalization
|
||||
Wownero daemon internationalization
|
||||
==================================
|
||||
|
||||
The Monero command line tools can be translated in various languages. If you wish to contribute and need help/support, contact the [Monero Localization Workgroup on Taiga](https://taiga.getmonero.org/project/erciccione-monero-localization/) or come chat on `#monero-translations` (Freenode/IRC, riot/matrix, MatterMost)
|
||||
The Wownero command line tools can be translated in various languages. If you wish to contribute and need help/support, come chat on `#wownero` (Freenode/IRC)
|
||||
|
||||
In order to use the same translation workflow as the [Monero Core GUI](https://github.com/monero-project/monero-core), they use Qt Linguist translation files. However, to avoid the dependencies on Qt this normally implies, they use a custom loader to read those files at runtime.
|
||||
In order to use the same translation workflow as the [Wownero GUI](https://github.com/wownero/wownero-gui), they use Qt Linguist translation files. However, to avoid the dependencies on Qt this normally implies, they use a custom loader to read those files at runtime.
|
||||
|
||||
### Tools for translators
|
||||
|
||||
@@ -19,11 +19,11 @@ To update ts files after changing source code:
|
||||
|
||||
To add a new language, eg Spanish (ISO code es):
|
||||
|
||||
cp translations/monero.ts translations/monero_es.ts
|
||||
cp translations/wownero.ts translations/wownero_es.ts
|
||||
|
||||
To edit translations for Spanish:
|
||||
|
||||
linguist translations/monero_es.ts
|
||||
linguist translations/wownero_es.ts
|
||||
|
||||
To build translations after modifying them:
|
||||
|
||||
@@ -31,7 +31,7 @@ To build translations after modifying them:
|
||||
|
||||
To test a translation:
|
||||
|
||||
LANG=es ./build/release/bin/monero-wallet-cli
|
||||
LANG=es ./build/release/bin/wownero-wallet-cli
|
||||
|
||||
To add new translatable strings in the source code:
|
||||
|
||||
|
||||
269
README.md
269
README.md
@@ -3,80 +3,73 @@
|
||||
Copyright (c) 2014-2018 The Monero Project.
|
||||
Portions Copyright (c) 2012-2013 The Cryptonote developers.
|
||||
|
||||
## Development resources
|
||||
## Resources
|
||||
|
||||
- Web: [getmonero.org](https://getmonero.org)
|
||||
- Forum: [forum.getmonero.org](https://forum.getmonero.org)
|
||||
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
|
||||
- GitHub: [https://github.com/monero-project/monero](https://github.com/monero-project/monero)
|
||||
- IRC: [#monero-dev on Freenode](http://webchat.freenode.net/?randomnick=1&channels=%23monero-dev&prompt=1&uio=d4)
|
||||
- Web: [wownero.org](http://wownero.org)
|
||||
- Twitter: [@w0wn3r0](https://twitter.com/w0wn3r0)
|
||||
- Discord: [discord.gg/sQt74ep](https://discord.gg/sQt74ep)
|
||||
- Reddit: [/r/wownero](https://www.reddit.com/r/wownero)
|
||||
- Mail: [wownero@protonmail.com](mailto:wownero@protonmail.com)
|
||||
- GitHub: [https://github.com/wownero/wownero](https://github.com/wownero/wownero)
|
||||
- IRC: [#wownero on Freenode](https://kiwiirc.com/client/irc.freenode.net/?nick=suchchatter|?#wownero)
|
||||
|
||||
## Vulnerability response
|
||||
|
||||
- Our [Vulnerability Response Process](https://github.com/monero-project/meta/blob/master/VULNERABILITY_RESPONSE_PROCESS.md) encourages responsible disclosure
|
||||
- We are also available via [HackerOne](https://hackerone.com/monero)
|
||||
- TODO
|
||||
|
||||
## Build
|
||||
|
||||
| Operating System | Processor | Status |
|
||||
| --------------------- | -------- |--------|
|
||||
| Ubuntu 16.04 | i686 | [](https://build.getmonero.org/builders/monero-static-ubuntu-i686)
|
||||
| Ubuntu 16.04 | amd64 | [](https://build.getmonero.org/builders/monero-static-ubuntu-amd64)
|
||||
| Ubuntu 16.04 | armv7 | [](https://build.getmonero.org/builders/monero-static-ubuntu-arm7)
|
||||
| Debian Stable | armv8 | [](https://build.getmonero.org/builders/monero-static-debian-armv8)
|
||||
| OSX 10.10 | amd64 | [](https://build.getmonero.org/builders/monero-static-osx-10.10)
|
||||
| OSX 10.11 | amd64 | [](https://build.getmonero.org/builders/monero-static-osx-10.11)
|
||||
| OSX 10.12 | amd64 | [](https://build.getmonero.org/builders/monero-static-osx-10.12)
|
||||
| FreeBSD 11 | amd64 | [](https://build.getmonero.org/builders/monero-static-freebsd64)
|
||||
| DragonFly BSD 4.6 | amd64 | [](https://build.getmonero.org/builders/monero-static-dragonflybsd-amd64)
|
||||
| Windows (MSYS2/MinGW) | i686 | [](https://build.getmonero.org/builders/monero-static-win32)
|
||||
| Windows (MSYS2/MinGW) | amd64 | [](https://build.getmonero.org/builders/monero-static-win64)
|
||||
| Ubuntu 16.04 | i686 | TODO
|
||||
| Ubuntu 16.04 | amd64 | TODO
|
||||
| Ubuntu 16.04 | armv7 | TODO
|
||||
| Debian Stable | armv8 | TODO
|
||||
| OSX 10.10 | amd64 | TODO
|
||||
| OSX 10.11 | amd64 | TODO
|
||||
| OSX 10.12 | amd64 | TODO
|
||||
| FreeBSD 11 | amd64 | TODO
|
||||
| DragonFly BSD 4.6 | amd64 | TODO
|
||||
| Windows (MSYS2/MinGW) | i686 | TODO
|
||||
| Windows (MSYS2/MinGW) | amd64 | TODO
|
||||
|
||||
## Coverage
|
||||
|
||||
| Type | Status |
|
||||
|-----------|--------|
|
||||
| Coverity | [](https://scan.coverity.com/projects/9657/)
|
||||
| Coveralls | [](https://coveralls.io/github/monero-project/monero?branch=master)
|
||||
| License | [](https://opensource.org/licenses/BSD-3-Clause)
|
||||
|
||||
## Introduction
|
||||
|
||||
Monero is a private, secure, untraceable, decentralised digital currency. You are your bank, you control your funds, and nobody can trace your transfers unless you allow them to do so.
|
||||
Wownero is a fork of the private cryptocurrenty Monero with two major changes: A capped emmision that disallows infinite coin creation 10x the coin for 10x the W0W; Wownero is a fairly launched coin with no premine. It's not a fork of another blockchain. With its own genesis block there is no degradation of privacy due to ring signatures using different participants for the same tx outputs on opposing forks.
|
||||
|
||||
**Privacy:** Monero uses a cryptographically sound system to allow you to send and receive funds without your transactions being easily revealed on the blockchain (the ledger of transactions that everyone has). This ensures that your purchases, receipts, and all transfers remain absolutely private by default.
|
||||
**Privacy:** Wownero uses a cryptographically sound system to allow you to send and receive funds without your transactions being easily revealed on the blockchain (the ledger of transactions that everyone has). This ensures that your purchases, receipts, and all transfers remain absolutely private by default.
|
||||
|
||||
**Security:** Using the power of a distributed peer-to-peer consensus network, every transaction on the network is cryptographically secured. Individual wallets have a 25 word mnemonic seed that is only displayed once, and can be written down to backup the wallet. Wallet files are encrypted with a passphrase to ensure they are useless if stolen.
|
||||
|
||||
**Untraceability:** By taking advantage of ring signatures, a special property of a certain type of cryptography, Monero is able to ensure that transactions are not only untraceable, but have an optional measure of ambiguity that ensures that transactions cannot easily be tied back to an individual user or computer.
|
||||
**Untraceability:** By taking advantage of ring signatures, a special property of a certain type of cryptography, Wownero is able to ensure that transactions are not only untraceable, but have an optional measure of ambiguity that ensures that transactions cannot easily be tied back to an individual user or computer.
|
||||
|
||||
## About this project
|
||||
|
||||
This is the core implementation of Monero. It is open source and completely free to use without restrictions, except for those specified in the license agreement below. There are no restrictions on anyone creating an alternative implementation of Monero that uses the protocol and network in a compatible manner.
|
||||
This is the core implementation of Wownero. It is open source and completely free to use without restrictions, except for those specified in the license agreement below. There are no restrictions on anyone creating an alternative implementation of Wownero that uses the protocol and network in a compatible manner.
|
||||
|
||||
As with many development projects, the repository on Github is considered to be the "staging" area for the latest changes. Before changes are merged into that branch on the main repository, they are tested by individual developers in their own branches, submitted as a pull request, and then subsequently tested by contributors who focus on testing and code reviews. That having been said, the repository should be carefully considered before using it in a production environment, unless there is a patch in the repository for a particular show-stopping issue you are experiencing. It is generally a better idea to use a tagged release for stability.
|
||||
|
||||
**Anyone is welcome to contribute to Monero's codebase!** If you have a fix or code change, feel free to submit it as a pull request directly to the "master" branch. In cases where the change is relatively small or does not affect other parts of the codebase it may be merged in immediately by any one of the collaborators. On the other hand, if the change is particularly large or complex, it is expected that it will be discussed at length either well in advance of the pull request being submitted, or even directly on the pull request.
|
||||
**Anyone is welcome to contribute to Wownero's codebase!** If you have a fix or code change, feel free to submit it as a pull request directly to the "master" branch. In cases where the change is relatively small or does not affect other parts of the codebase it may be merged in immediately by any one of the collaborators. On the other hand, if the change is particularly large or complex, it is expected that it will be discussed at length either well in advance of the pull request being submitted, or even directly on the pull request.
|
||||
|
||||
## Supporting the project
|
||||
|
||||
Monero is a 100% community-sponsored endeavor. If you want to join our efforts, the easiest thing you can do is support the project financially. Both Monero and Bitcoin donations can be made to **donate.getmonero.org** if using a client that supports the [OpenAlias](https://openalias.org) standard. Alternatively you can send XMR to the Monero donation address via the `donate` command (type `help` in the command-line wallet for details).
|
||||
Wownero is a 100% community-sponsored endeavor. If you want to join our efforts, the easiest thing you can do is support the project financially.
|
||||
|
||||
The Wownero donation address (mostly reserved for hookers and blow) is: `Wo3MWeKwtA918DU4c69hVSNgejdWFCRCuWjShRY66mJkU2Hv58eygJWDJS1MNa2Ge5M1WjUkGHuLqHkweDxwZZU42d16v94mP`
|
||||
|
||||
The Monero donation address is: `44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A` (viewkey: `f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501`)
|
||||
|
||||
The Bitcoin donation address is: `1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H`
|
||||
The Monero Bitcoin donation address is: `1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H`
|
||||
|
||||
Core development funding and/or some supporting services are also graciously provided by sponsors:
|
||||
|
||||
[<img width="80" src="https://static.getmonero.org/images/sponsors/mymonero.png"/>](https://mymonero.com)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/kitware.png?1"/>](http://kitware.com)
|
||||
[<img width="100" src="https://static.getmonero.org/images/sponsors/dome9.png"/>](http://dome9.com)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/araxis.png"/>](http://araxis.com)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/jetbrains.png"/>](http://www.jetbrains.com/)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/navicat.png"/>](http://www.navicat.com/)
|
||||
[<img width="150" src="https://static.getmonero.org/images/sponsors/symas.png"/>](http://www.symas.com/)
|
||||
|
||||
There are also several mining pools that kindly donate a portion of their fees, [a list of them can be found on our Bitcointalk post](https://bitcointalk.org/index.php?topic=583449.0).
|
||||
<img width="100" src="https://botw-pd.s3.amazonaws.com/styles/logo-thumbnail/s3/0024/1083/brand.gif"/><img width="100" src="https://blogvecindad.com/imagenes/2007/02/brawndo.jpg"/><img width="100" src="https://www.subscribepro.com/wp-content/uploads/2016/04/logo-depend-250x130.png"/>
|
||||
|
||||
## License
|
||||
|
||||
@@ -88,13 +81,14 @@ If you want to help out, see [CONTRIBUTING](CONTRIBUTING.md) for a set of guidel
|
||||
|
||||
## Scheduled mandatory software upgrades
|
||||
|
||||
Monero uses a fixed-schedule mandatory software upgrade (hard fork) mechanism to implement new features. This means that users of Monero (end users and service providers) need to run current versions and upgrade their software on a regular schedule. Mandatory software upgrades occur during the months of March and September. The required software for these upgrades will be available prior to the scheduled date. Please check the repository prior to this date for the proper Monero software version. Below is the historical schedule and the projected schedule for the next upgrade.
|
||||
Wownero uses a fixed-schedule mandatory software upgrade (hard fork) mechanism to implement new features. This means that users of Wownero (end users and service providers) need to run current versions and upgrade their software on a regular schedule.The required software for these upgrades will be available prior to the scheduled date. Please check the repository prior to this date for the proper Wownero software version. Below is the historical schedule and the projected schedule for the next upgrade.
|
||||
Dates are provided in the format YYYY-MM-DD.
|
||||
|
||||
|
||||
| Software upgrade block height | Date | Fork version | Minimum Monero version | Recommended Monero version | Details |
|
||||
| Software upgrade block height | Date | Fork version | Minimum Wownero version | Recommended Wownero version | Details |
|
||||
| ------------------------------ | -----------| ----------------- | ---------------------- | -------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| 1 | 2018-04-01 | v7 | v0.1.0.0 | v0.1.0.0 | Cryptonight variant 1, ringsize >= 8, sorted inputs
|
||||
| 6969 | 2018-04-24 | v8 | v0.2.0.0 | v0.2.0.0 | Bulletproofs, LWMA difficulty algorithm, ringsize >= 10, reduce unlock to 4
|
||||
|
||||
X's indicate that these details have not been determined as of commit date.
|
||||
|
||||
@@ -102,50 +96,7 @@ X's indicate that these details have not been determined as of commit date.
|
||||
|
||||
Approximately three months prior to a scheduled mandatory software upgrade, a branch from Master will be created with the new release version tag. Pull requests that address bugs should then be made to both Master and the new release branch. Pull requests that require extensive review and testing (generally, optimizations and new features) should *not* be made to the release branch.
|
||||
|
||||
## Installing Monero from a package
|
||||
|
||||
Packages are available for
|
||||
|
||||
* Ubuntu and [snap supported](https://snapcraft.io/docs/core/install) systems, via a community contributed build.
|
||||
|
||||
snap install monero --beta
|
||||
|
||||
Installing a snap is very quick. Snaps are secure. They are isolated with all of their dependencies. Snaps also auto update when a new version is released.
|
||||
|
||||
* Arch Linux (via [AUR](https://aur.archlinux.org/)):
|
||||
- Stable release: [`monero`](https://aur.archlinux.org/packages/monero)
|
||||
- Bleeding edge: [`monero-git`](https://aur.archlinux.org/packages/monero-git)
|
||||
|
||||
* Void Linux:
|
||||
|
||||
xbps-install -S monero
|
||||
|
||||
* GuixSD
|
||||
|
||||
guix package -i monero
|
||||
|
||||
* OS X via [Homebrew](http://brew.sh)
|
||||
|
||||
brew tap sammy007/cryptonight
|
||||
brew install monero --build-from-source
|
||||
|
||||
* Docker
|
||||
|
||||
# Build using all available cores
|
||||
docker build -t monero .
|
||||
|
||||
# or build using a specific number of cores (reduce RAM requirement)
|
||||
docker build --build-arg NPROC=1 -t monero .
|
||||
|
||||
# either run in foreground
|
||||
docker run -it -v /monero/chain:/root/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero
|
||||
|
||||
# or in background
|
||||
docker run -it -d -v /monero/chain:/root/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero
|
||||
|
||||
Packaging for your favorite distribution would be a welcome contribution!
|
||||
|
||||
## Compiling Monero from source
|
||||
## Compiling Wownero from source
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -186,15 +137,15 @@ build the library binary manually. This can be done with the following command `
|
||||
|
||||
Clone recursively to pull-in needed submodule(s):
|
||||
|
||||
`$ git clone --recursive https://github.com/monero-project/monero`
|
||||
`$ git clone --recursive https://github.com/wownero/wownero`
|
||||
|
||||
If you already have a repo cloned, initialize and update:
|
||||
|
||||
`$ cd monero && git submodule init && git submodule update`
|
||||
`$ cd wownero && git submodule init && git submodule update`
|
||||
|
||||
### Build instructions
|
||||
|
||||
Monero uses the CMake build system and a top-level [Makefile](Makefile) that
|
||||
Wownero uses the CMake build system and a top-level [Makefile](Makefile) that
|
||||
invokes cmake commands as needed.
|
||||
|
||||
#### On Linux and OS X
|
||||
@@ -202,7 +153,7 @@ invokes cmake commands as needed.
|
||||
* Install the dependencies
|
||||
* Change to the root of the source code directory and build:
|
||||
|
||||
cd monero
|
||||
cd wownero
|
||||
make
|
||||
|
||||
*Optional*: If your machine has several cores and enough memory, enable
|
||||
@@ -215,9 +166,9 @@ invokes cmake commands as needed.
|
||||
|
||||
* The resulting executables can be found in `build/release/bin`
|
||||
|
||||
* Add `PATH="$PATH:$HOME/monero/build/release/bin"` to `.profile`
|
||||
* Add `PATH="$PATH:$HOME/wownero/build/release/bin"` to `.profile`
|
||||
|
||||
* Run Monero with `monerod --detach`
|
||||
* Run Wownero with `wownerod --detach`
|
||||
|
||||
* **Optional**: build and run the test suite to verify the binaries:
|
||||
|
||||
@@ -237,73 +188,6 @@ invokes cmake commands as needed.
|
||||
|
||||
HAVE_DOT=YES doxygen Doxyfile
|
||||
|
||||
#### On the Raspberry Pi
|
||||
|
||||
Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch (2017-09-07 or later) from https://www.raspberrypi.org/downloads/raspbian/. If you are using Raspian Jessie, [please see note in the following section](#note-for-raspbian-jessie-users).
|
||||
|
||||
* `apt-get update && apt-get upgrade` to install all of the latest software
|
||||
|
||||
* Install the dependencies for Monero from the 'Debian' column in the table above.
|
||||
|
||||
* Increase the system swap size:
|
||||
```
|
||||
sudo /etc/init.d/dphys-swapfile stop
|
||||
sudo nano /etc/dphys-swapfile
|
||||
CONF_SWAPSIZE=1024
|
||||
sudo /etc/init.d/dphys-swapfile start
|
||||
```
|
||||
* Clone monero and checkout most recent release version:
|
||||
```
|
||||
git clone https://github.com/monero-project/monero.git
|
||||
cd monero
|
||||
git checkout tags/v0.11.1.0
|
||||
```
|
||||
* Build:
|
||||
```
|
||||
make release
|
||||
```
|
||||
* Wait 4-6 hours
|
||||
|
||||
* The resulting executables can be found in `build/release/bin`
|
||||
|
||||
* Add `PATH="$PATH:$HOME/monero/build/release/bin"` to `.profile`
|
||||
|
||||
* Run Monero with `monerod --detach`
|
||||
|
||||
* You may wish to reduce the size of the swap file after the build has finished, and delete the boost directory from your home directory
|
||||
|
||||
#### *Note for Raspbian Jessie users:*
|
||||
|
||||
If you are using the older Raspbian Jessie image, compiling Monero is a bit more complicated. The version of Boost available in the Debian Jessie repositories is too old to use with Monero, and thus you must compile a newer version yourself. The following explains the extra steps, and has been tested on a Raspberry Pi 2 with a clean install of minimal Raspbian Jessie.
|
||||
|
||||
* As before, `apt-get update && apt-get upgrade` to install all of the latest software, and increase the system swap size
|
||||
|
||||
```
|
||||
sudo /etc/init.d/dphys-swapfile stop
|
||||
sudo nano /etc/dphys-swapfile
|
||||
CONF_SWAPSIZE=1024
|
||||
sudo /etc/init.d/dphys-swapfile start
|
||||
```
|
||||
|
||||
* Then, install the dependencies for Monero except `libunwind` and `libboost-all-dev`
|
||||
|
||||
* Install the latest version of boost (this may first require invoking `apt-get remove --purge libboost*` to remove a previous version if you're not using a clean install):
|
||||
```
|
||||
cd
|
||||
wget https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2
|
||||
tar xvfo boost_1_64_0.tar.bz2
|
||||
cd boost_1_64_0
|
||||
./bootstrap.sh
|
||||
sudo ./b2
|
||||
```
|
||||
* Wait ~8 hours
|
||||
```
|
||||
sudo ./bjam install
|
||||
```
|
||||
* Wait ~4 hours
|
||||
|
||||
* From here, follow the [general Raspberry Pi instructions](#on-the-raspberry-pi) from the "Clone monero and checkout most recent release version" step.
|
||||
|
||||
#### On Windows:
|
||||
|
||||
Binaries for Windows are built on Windows using the MinGW toolchain within
|
||||
@@ -355,9 +239,7 @@ application.
|
||||
|
||||
### On FreeBSD:
|
||||
|
||||
The project can be built from scratch by following instructions for Linux above. If you are running monero in a jail you need to add the flag: `allow.sysvipc=1` to your jail configuration, otherwise lmdb will throw the error message: `Failed to open lmdb environment: Function not implemented`.
|
||||
|
||||
We expect to add Monero into the ports tree in the near future, which will aid in managing installations using ports or packages.
|
||||
The project can be built from scratch by following instructions for Linux above. If you are running wownero in a jail you need to add the flag: `allow.sysvipc=1` to your jail configuration, otherwise lmdb will throw the error message: `Failed to open lmdb environment: Function not implemented`.
|
||||
|
||||
### On OpenBSD:
|
||||
|
||||
@@ -372,7 +254,7 @@ The doxygen and graphviz packages are optional and require the xbase set.
|
||||
The Boost package has a bug that will prevent librpc.a from building correctly. In order to fix this, you will have to Build boost yourself from scratch. Follow the directions here (under "Building Boost"):
|
||||
https://github.com/bitcoin/bitcoin/blob/master/doc/build-openbsd.md
|
||||
|
||||
You will have to add the serialization, date_time, and regex modules to Boost when building as they are needed by Monero.
|
||||
You will have to add the serialization, date_time, and regex modules to Boost when building as they are needed by Wownero.
|
||||
|
||||
To build: `env CC=egcc CXX=eg++ CPP=ecpp DEVELOPER_LOCAL_TOOLS=1 BOOST_ROOT=/path/to/the/boost/you/built make release-static-64`
|
||||
|
||||
@@ -447,7 +329,7 @@ cmake ..
|
||||
doas make install
|
||||
```
|
||||
|
||||
Build monero: `env DEVELOPER_LOCAL_TOOLS=1 BOOST_ROOT=/usr/local make release-static`
|
||||
Build wownero: `env DEVELOPER_LOCAL_TOOLS=1 BOOST_ROOT=/usr/local make release-static`
|
||||
|
||||
### On Solaris:
|
||||
|
||||
@@ -460,15 +342,6 @@ The default Solaris linker can't be used, you have to install GNU ld, then run c
|
||||
|
||||
Then you can run make as usual.
|
||||
|
||||
### On Linux for Android (using docker):
|
||||
|
||||
# Build image (select android64.Dockerfile for aarch64)
|
||||
cd utils/build_scripts/ && docker build -f android32.Dockerfile -t monero-android .
|
||||
# Create container
|
||||
docker create -it --name monero-android monero-android bash
|
||||
# Get binaries
|
||||
docker cp monero-android:/opt/android/monero/build/release/bin .
|
||||
|
||||
### Building portable statically linked binaries
|
||||
|
||||
By default, in either dynamically or statically linked builds, binaries target the specific host processor on which the build happens and are not portable to other processors. Portable binaries can be built using the following targets:
|
||||
@@ -481,15 +354,15 @@ By default, in either dynamically or statically linked builds, binaries target t
|
||||
* ```make release-static-win64``` builds binaries on 64-bit Windows portable across 64-bit Windows systems
|
||||
* ```make release-static-win32``` builds binaries on 64-bit or 32-bit Windows portable across 32-bit Windows systems
|
||||
|
||||
## Running monerod
|
||||
## Running wownerod
|
||||
|
||||
The build places the binary in `bin/` sub-directory within the build directory
|
||||
from which cmake was invoked (repository root by default). To run in
|
||||
foreground:
|
||||
|
||||
./bin/monerod
|
||||
./bin/wownerod
|
||||
|
||||
To list all available options, run `./bin/monerod --help`. Options can be
|
||||
To list all available options, run `./bin/wownerod --help`. Options can be
|
||||
specified either on the command line or in a configuration file passed by the
|
||||
`--config-file` argument. To specify an option in the configuration file, add
|
||||
a line with the syntax `argumentname=value`, where `argumentname` is the name
|
||||
@@ -497,17 +370,17 @@ of the argument without the leading dashes, for example `log-level=1`.
|
||||
|
||||
To run in background:
|
||||
|
||||
./bin/monerod --log-file monerod.log --detach
|
||||
./bin/wownerod --log-file wownerod.log --detach
|
||||
|
||||
To run as a systemd service, copy
|
||||
[monerod.service](utils/systemd/monerod.service) to `/etc/systemd/system/` and
|
||||
[monerod.conf](utils/conf/monerod.conf) to `/etc/`. The [example
|
||||
service](utils/systemd/monerod.service) assumes that the user `monero` exists
|
||||
[wownerod.service](utils/systemd/wownerod.service) to `/etc/systemd/system/` and
|
||||
[wownerod.conf](utils/conf/wownerod.conf) to `/etc/`. The [example
|
||||
service](utils/systemd/wownerod.service) assumes that the user `wownero` exists
|
||||
and its home is the data directory specified in the [example
|
||||
config](utils/conf/monerod.conf).
|
||||
config](utils/conf/wownerod.conf).
|
||||
|
||||
If you're on Mac, you may need to add the `--max-concurrency 1` option to
|
||||
monero-wallet-cli, and possibly monerod, if you get crashes refreshing.
|
||||
wownero-wallet-cli, and possibly wownerod, if you get crashes refreshing.
|
||||
|
||||
## Internationalization
|
||||
|
||||
@@ -515,29 +388,29 @@ See [README.i18n.md](README.i18n.md).
|
||||
|
||||
## Using Tor
|
||||
|
||||
While Monero isn't made to integrate with Tor, it can be used wrapped with torsocks, by
|
||||
While Wownero isn't made to integrate with Tor, it can be used wrapped with torsocks, by
|
||||
setting the following configuration parameters and environment variables:
|
||||
|
||||
* `--p2p-bind-ip 127.0.0.1` on the command line or `p2p-bind-ip=127.0.0.1` in
|
||||
monerod.conf to disable listening for connections on external interfaces.
|
||||
* `--no-igd` on the command line or `no-igd=1` in monerod.conf to disable IGD
|
||||
wownerod.conf to disable listening for connections on external interfaces.
|
||||
* `--no-igd` on the command line or `no-igd=1` in wownerod.conf to disable IGD
|
||||
(UPnP port forwarding negotiation), which is pointless with Tor.
|
||||
* `DNS_PUBLIC=tcp` or `DNS_PUBLIC=tcp://x.x.x.x` where x.x.x.x is the IP of the
|
||||
desired DNS server, for DNS requests to go over TCP, so that they are routed
|
||||
through Tor. When IP is not specified, monerod uses the default list of
|
||||
through Tor. When IP is not specified, wownerod uses the default list of
|
||||
servers defined in [src/common/dns_utils.cpp](src/common/dns_utils.cpp).
|
||||
* `TORSOCKS_ALLOW_INBOUND=1` to tell torsocks to allow monerod to bind to interfaces
|
||||
* `TORSOCKS_ALLOW_INBOUND=1` to tell torsocks to allow wownerod to bind to interfaces
|
||||
to accept connections from the wallet. On some Linux systems, torsocks
|
||||
allows binding to localhost by default, so setting this variable is only
|
||||
necessary to allow binding to local LAN/VPN interfaces to allow wallets to
|
||||
connect from remote hosts. On other systems, it may be needed for local wallets
|
||||
as well.
|
||||
* Do NOT pass `--detach` when running through torsocks with systemd, (see
|
||||
[utils/systemd/monerod.service](utils/systemd/monerod.service) for details).
|
||||
[utils/systemd/wownerod.service](utils/systemd/wownerod.service) for details).
|
||||
|
||||
Example command line to start monerod through Tor:
|
||||
Example command line to start wownerod through Tor:
|
||||
|
||||
DNS_PUBLIC=tcp torsocks monerod --p2p-bind-ip 127.0.0.1 --no-igd
|
||||
DNS_PUBLIC=tcp torsocks wownerod --p2p-bind-ip 127.0.0.1 --no-igd
|
||||
|
||||
### Using Tor on Tails
|
||||
|
||||
@@ -545,13 +418,13 @@ TAILS ships with a very restrictive set of firewall rules. Therefore, you need
|
||||
to add a rule to allow this connection too, in addition to telling torsocks to
|
||||
allow inbound connections. Full example:
|
||||
|
||||
sudo iptables -I OUTPUT 2 -p tcp -d 127.0.0.1 -m tcp --dport 18081 -j ACCEPT
|
||||
DNS_PUBLIC=tcp torsocks ./monerod --p2p-bind-ip 127.0.0.1 --no-igd --rpc-bind-ip 127.0.0.1 \
|
||||
sudo iptables -I OUTPUT 2 -p tcp -d 127.0.0.1 -m tcp --dport 34568 -j ACCEPT
|
||||
DNS_PUBLIC=tcp torsocks ./wownerod --p2p-bind-ip 127.0.0.1 --no-igd --rpc-bind-ip 127.0.0.1 \
|
||||
--data-dir /home/amnesia/Persistent/your/directory/to/the/blockchain
|
||||
|
||||
## Debugging
|
||||
|
||||
This section contains general instructions for debugging failed installs or problems encountered with Monero. First ensure you are running the latest version built from the Github repo.
|
||||
This section contains general instructions for debugging failed installs or problems encountered with Wownero. First ensure you are running the latest version built from the Github repo.
|
||||
|
||||
### Obtaining stack traces and core dumps on Unix systems
|
||||
|
||||
@@ -564,7 +437,7 @@ Run the build.
|
||||
Once it stalls, enter the following command:
|
||||
|
||||
```
|
||||
gdb /path/to/monerod `pidof monerod`
|
||||
gdb /path/to/wownerod `pidof wownerod`
|
||||
```
|
||||
|
||||
Type `thread apply all bt` within gdb in order to obtain the stack trace
|
||||
@@ -577,27 +450,27 @@ Enter `echo core | sudo tee /proc/sys/kernel/core_pattern` to stop cores from be
|
||||
|
||||
Run the build.
|
||||
|
||||
When it terminates with an output along the lines of "Segmentation fault (core dumped)", there should be a core dump file in the same directory as monerod. It may be named just `core`, or `core.xxxx` with numbers appended.
|
||||
When it terminates with an output along the lines of "Segmentation fault (core dumped)", there should be a core dump file in the same directory as wownerod. It may be named just `core`, or `core.xxxx` with numbers appended.
|
||||
|
||||
You can now analyse this core dump with `gdb` as follows:
|
||||
|
||||
`gdb /path/to/monerod /path/to/dumpfile`
|
||||
`gdb /path/to/wownerod /path/to/dumpfile`
|
||||
|
||||
Print the stack trace with `bt`
|
||||
|
||||
* To run monero within gdb:
|
||||
* To run wownero within gdb:
|
||||
|
||||
Type `gdb /path/to/monerod`
|
||||
Type `gdb /path/to/wownerod`
|
||||
|
||||
Pass command-line options with `--args` followed by the relevant arguments
|
||||
|
||||
Type `run` to run monerod
|
||||
Type `run` to run wownerod
|
||||
|
||||
### Analysing memory corruption
|
||||
|
||||
We use the tool `valgrind` for this.
|
||||
|
||||
Run with `valgrind /path/to/monerod`. It will be slow.
|
||||
Run with `valgrind /path/to/wownerod`. It will be slow.
|
||||
|
||||
### LMDB
|
||||
|
||||
@@ -605,7 +478,7 @@ Instructions for debugging suspected blockchain corruption as per @HYC
|
||||
|
||||
There is an `mdb_stat` command in the LMDB source that can print statistics about the database but it's not routinely built. This can be built with the following command:
|
||||
|
||||
`cd ~/monero/external/db_drivers/liblmdb && make`
|
||||
`cd ~/wownero/external/db_drivers/liblmdb && make`
|
||||
|
||||
The output of `mdb_stat -ea <path to blockchain dir>` will indicate inconsistencies in the blocks, block_heights and block_info table.
|
||||
|
||||
|
||||
@@ -903,7 +903,7 @@ void BlockchainDB::fixup()
|
||||
"633cdedeb3b96ec4f234c670254c6f721e0b368d00b48c6b26759db7d62cf52d",
|
||||
};
|
||||
|
||||
if (height() > 202612)
|
||||
if (height() > 202612 && strcmp(CRYPTONOTE_NAME, "monero")==0)
|
||||
{
|
||||
for (const auto &kis: key_images_202612)
|
||||
{
|
||||
@@ -916,7 +916,7 @@ void BlockchainDB::fixup()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (height() > 685498)
|
||||
if (height() > 685498 && strcmp(CRYPTONOTE_NAME, "monero")==0)
|
||||
{
|
||||
for (const auto &kis: key_images_685498)
|
||||
{
|
||||
|
||||
@@ -208,7 +208,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (command_line::get_arg(vm, command_line::arg_help))
|
||||
{
|
||||
std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << desc_options << std::endl;
|
||||
return 1;
|
||||
}
|
||||
@@ -253,7 +253,8 @@ int main(int argc, char* argv[])
|
||||
return 1;
|
||||
}
|
||||
std::vector<std::unique_ptr<Blockchain>> core_storage(inputs.size());
|
||||
tx_memory_pool m_mempool(*(Blockchain*)NULL);
|
||||
Blockchain *blockchain = NULL;
|
||||
tx_memory_pool m_mempool(*blockchain);
|
||||
for (size_t n = 0; n < inputs.size(); ++n)
|
||||
{
|
||||
core_storage[n].reset(new Blockchain(m_mempool));
|
||||
|
||||
@@ -97,7 +97,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (command_line::get_arg(vm, command_line::arg_help))
|
||||
{
|
||||
std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << desc_options << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (command_line::get_arg(vm, command_line::arg_help))
|
||||
{
|
||||
std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << desc_options << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (command_line::get_arg(vm, command_line::arg_help))
|
||||
{
|
||||
std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << desc_options << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -160,17 +160,29 @@ namespace cryptonote
|
||||
}
|
||||
|
||||
bool checkpoints::init_default_checkpoints(network_type nettype)
|
||||
{
|
||||
if (nettype == TESTNET) {
|
||||
return true;
|
||||
}
|
||||
if (nettype == STAGENET) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
{
|
||||
if (nettype == TESTNET)
|
||||
{
|
||||
ADD_CHECKPOINT(1, "4acea72fb2e9cb1a697930ebebf67d63c62c4dc711cc0764ba31f9437f908564");
|
||||
ADD_CHECKPOINT(10, "91f126cd60861f1801eeedbe6068ac997f09644bc7a3527fbc7457aa254ef399");
|
||||
ADD_CHECKPOINT(100, "6b9d737d08707f3361d095a31f78bbb9f828088c92699b0326cde4ea59cd82ac");
|
||||
ADD_CHECKPOINT(1000, "c9bed1b23c3c5a5c7cfac3cff786173b65e2cea8005d8ef686b56708281c60cf");
|
||||
return true;
|
||||
}
|
||||
if (nettype == STAGENET)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
ADD_CHECKPOINT(1, "97f4ce4d7879b3bea54dcec738cd2ebb7952b4e9bb9743262310cd5fec749340");
|
||||
ADD_CHECKPOINT(10, "305472c87ff86d8afb3ec42634828462b0ed3d929fc05fa1ae668c3bee04837a");
|
||||
ADD_CHECKPOINT(100, "a92b9deae26e19322041cbc2f850fa905748ae1e5bf69b35ca90b247c5cbfc04");
|
||||
ADD_CHECKPOINT(1000, "62921e13030b29264439cafaf8320cf8aa039ee6ba7ba29c72f11b50a079269a");
|
||||
ADD_CHECKPOINT(2000, "b3e1d73e3d0243239481aa76cb075cf2428556f5dc4f2e30428ea2ba36693e97");
|
||||
ADD_CHECKPOINT(3000, "83a6e1ab394e80b8442b7b70b0e4c3a9fa0143e0ca51a33e829537ef5dd1bf13");
|
||||
ADD_CHECKPOINT(4000, "7c70722d8cb8106b4bec67e1790614cc6e98db7afd0843b96cdff6960a0e0073");
|
||||
ADD_CHECKPOINT(5000, "331ee74008e174e5fd1956f64c52793961b321a1366f7c6f7d324e8265df34f6");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool checkpoints::load_checkpoints_from_json(const std::string &json_hashfile_fullpath)
|
||||
|
||||
@@ -222,10 +234,7 @@ bool checkpoints::load_checkpoints_from_json(const std::string &json_hashfile_fu
|
||||
};
|
||||
|
||||
|
||||
static const std::vector<std::string> stagenet_dns_urls = { "stagenetpoints.moneropulse.se"
|
||||
, "stagenetpoints.moneropulse.org"
|
||||
, "stagenetpoints.moneropulse.net"
|
||||
, "stagenetpoints.moneropulse.co"
|
||||
static const std::vector<std::string> stagenet_dns_urls = {
|
||||
};
|
||||
|
||||
if (!tools::dns_utils::load_txt_records_from_dns(records, nettype == TESTNET ? testnet_dns_urls : nettype == STAGENET ? stagenet_dns_urls : dns_urls))
|
||||
|
||||
@@ -505,7 +505,7 @@ bool load_txt_records_from_dns(std::vector<std::string> &good_records, const std
|
||||
|
||||
if (num_valid_records < 2)
|
||||
{
|
||||
LOG_PRINT_L0("WARNING: no two valid MoneroPulse DNS checkpoint records were received");
|
||||
LOG_PRINT_L2("WARNING: no two valid Wownero DNS checkpoint records were received");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ bool load_txt_records_from_dns(std::vector<std::string> &good_records, const std
|
||||
|
||||
if (good_records_index < 0)
|
||||
{
|
||||
LOG_PRINT_L0("WARNING: no two MoneroPulse DNS checkpoint records matched");
|
||||
LOG_PRINT_L2("WARNING: no two Wownero DNS checkpoint records matched");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,12 +44,8 @@ namespace tools
|
||||
|
||||
MDEBUG("Checking updates for " << buildtag << " " << software);
|
||||
|
||||
// All four MoneroPulse domains have DNSSEC on and valid
|
||||
// All four Wownero domains have DNSSEC on and valid
|
||||
static const std::vector<std::string> dns_urls = {
|
||||
"updates.moneropulse.org",
|
||||
"updates.moneropulse.net",
|
||||
"updates.moneropulse.co",
|
||||
"updates.moneropulse.se"
|
||||
};
|
||||
|
||||
if (!tools::dns_utils::load_txt_records_from_dns(records, dns_urls))
|
||||
|
||||
@@ -852,7 +852,7 @@ namespace cryptonote
|
||||
const std::string existing_block_id_202612 = "bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698";
|
||||
crypto::hash block_blob_hash = get_blob_hash(block_to_blob(b));
|
||||
|
||||
if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612)
|
||||
if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612 && strcmp(CRYPTONOTE_NAME, "monero")==0)
|
||||
{
|
||||
string_tools::hex_to_pod(existing_block_id_202612, res);
|
||||
return true;
|
||||
@@ -862,7 +862,7 @@ namespace cryptonote
|
||||
if (hash_result)
|
||||
{
|
||||
// make sure that we aren't looking at a block with the 202612 block id but not the correct blobdata
|
||||
if (string_tools::pod_to_hex(res) == existing_block_id_202612)
|
||||
if (string_tools::pod_to_hex(res) == existing_block_id_202612 && strcmp(CRYPTONOTE_NAME, "monero")==0)
|
||||
{
|
||||
LOG_ERROR("Block with block id for 202612 but incorrect block blob hash found!");
|
||||
res = null_hash;
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
|
||||
#include "common/int-util.h"
|
||||
#include "crypto/hash.h"
|
||||
@@ -162,4 +163,81 @@ namespace cryptonote {
|
||||
return (low + time_span - 1) / time_span;
|
||||
}
|
||||
|
||||
// LWMA difficulty algorithm
|
||||
// Background: https://github.com/zawy12/difficulty-algorithms/issues/3
|
||||
// Copyright (c) 2017-2018 Zawy (pseudocode)
|
||||
// MIT license http://www.opensource.org/licenses/mit-license.php
|
||||
// Copyright (c) 2018 Wownero Inc., a Monero Enterprise Alliance partner company
|
||||
// Copyright (c) 2018 The Karbowanec developers (initial code)
|
||||
// Copyright (c) 2018 Haven Protocol (refinements)
|
||||
// Degnr8, Karbowanec, Masari, Bitcoin Gold, Bitcoin Candy, and Haven have contributed.
|
||||
|
||||
// This algorithm is: next_difficulty = harmonic_mean(Difficulties) * T / LWMA(Solvetimes)
|
||||
// The harmonic_mean(Difficulties) = 1/average(Targets) so it is also:
|
||||
// next_target = avg(Targets) * LWMA(Solvetimes) / T.
|
||||
// This is "the best algorithm" because it has lowest root-mean-square error between
|
||||
// needed & actual difficulty during hash attacks while having the lowest standard
|
||||
// deviation during stable hashrate. That is, it's the fastest for a given stability and vice versa.
|
||||
// Do not use "if solvetime < 1 then solvetime = 1" which allows a catastrophic exploit.
|
||||
// Do not sort timestamps. "Solvetimes" and "LWMA" variables must allow negatives.
|
||||
// Do not use MTP as most recent block. Do not use (POW)Limits, filtering, or tempering.
|
||||
// Do not forget to set N (aka DIFFICULTY_WINDOW in Cryptonote) to recommendation below.
|
||||
// The nodes' future time limit (FTL) aka CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT needs to
|
||||
// be reduced from 60*60*2 to 500 seconds to prevent timestamp manipulation from miner's with
|
||||
// > 50% hash power. If this is too small, it can be increased to 1000 at a cost in protection.
|
||||
|
||||
// Cryptonote clones: #define DIFFICULTY_BLOCKS_COUNT_V2 DIFFICULTY_WINDOW_V2 + 1
|
||||
|
||||
|
||||
difficulty_type next_difficulty_v2(std::vector<std::uint64_t> timestamps, std::vector<difficulty_type> cumulative_difficulties, size_t target_seconds) {
|
||||
|
||||
const int64_t T = static_cast<int64_t>(target_seconds);
|
||||
|
||||
size_t N = DIFFICULTY_WINDOW_V2;
|
||||
|
||||
// Return a difficulty of 1 for first 3 blocks if it's the start of the chain.
|
||||
if (timestamps.size() < 4) {
|
||||
return 1;
|
||||
}
|
||||
// Otherwise, use a smaller N if the start of the chain is less than N+1.
|
||||
else if ( timestamps.size() < N+1 ) {
|
||||
N = timestamps.size() - 1;
|
||||
}
|
||||
// Otherwise make sure timestamps and cumulative_difficulties are correct size.
|
||||
else {
|
||||
timestamps.resize(N+1);
|
||||
cumulative_difficulties.resize(N+1);
|
||||
}
|
||||
// To get an average solvetime to within +/- ~0.1%, use an adjustment factor.
|
||||
// adjust=0.999 for 80 < N < 120(?)
|
||||
const double adjust = 0.998;
|
||||
// The divisor k normalizes the LWMA sum to a standard LWMA.
|
||||
const double k = N * (N + 1) / 2;
|
||||
|
||||
double LWMA(0), sum_inverse_D(0), harmonic_mean_D(0), nextDifficulty(0);
|
||||
int64_t solveTime(0);
|
||||
uint64_t difficulty(0), next_difficulty(0);
|
||||
|
||||
// Loop through N most recent blocks. N is most recently solved block.
|
||||
for (size_t i = 1; i <= N; i++) {
|
||||
solveTime = static_cast<int64_t>(timestamps[i]) - static_cast<int64_t>(timestamps[i - 1]);
|
||||
solveTime = std::min<int64_t>((T * 7), std::max<int64_t>(solveTime, (-7 * T)));
|
||||
difficulty = cumulative_difficulties[i] - cumulative_difficulties[i - 1];
|
||||
LWMA += (int64_t)(solveTime * i) / k;
|
||||
sum_inverse_D += 1 / static_cast<double>(difficulty);
|
||||
}
|
||||
|
||||
harmonic_mean_D = N / sum_inverse_D;
|
||||
|
||||
// Keep LWMA sane in case something unforeseen occurs.
|
||||
if (static_cast<int64_t>(boost::math::round(LWMA)) < T / 20)
|
||||
LWMA = static_cast<double>(T / 20);
|
||||
|
||||
nextDifficulty = harmonic_mean_D * T / LWMA * adjust;
|
||||
|
||||
// No limits should be employed, but this is correct way to employ a 20% symmetrical limit:
|
||||
// nextDifficulty=max(previous_Difficulty*0.8,min(previous_Difficulty/0.8, next_Difficulty));
|
||||
next_difficulty = static_cast<uint64_t>(nextDifficulty);
|
||||
return next_difficulty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,4 +53,5 @@ namespace cryptonote
|
||||
*/
|
||||
bool check_hash(const crypto::hash &hash, difficulty_type difficulty);
|
||||
difficulty_type next_difficulty(std::vector<std::uint64_t> timestamps, std::vector<difficulty_type> cumulative_difficulties, size_t target_seconds);
|
||||
difficulty_type next_difficulty_v2(std::vector<std::uint64_t> timestamps, std::vector<difficulty_type> cumulative_difficulties, size_t target_seconds);
|
||||
}
|
||||
|
||||
@@ -44,8 +44,9 @@
|
||||
#define CURRENT_TRANSACTION_VERSION 2
|
||||
#define CURRENT_BLOCK_MAJOR_VERSION 7
|
||||
#define CURRENT_BLOCK_MINOR_VERSION 7
|
||||
#define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT_V2 300*2
|
||||
#define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT 60*60*2
|
||||
#define CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE 10
|
||||
#define CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE 4
|
||||
|
||||
#define BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW 60
|
||||
|
||||
@@ -74,9 +75,11 @@
|
||||
|
||||
#define DIFFICULTY_TARGET_V2 300
|
||||
#define DIFFICULTY_TARGET_V1 300
|
||||
#define DIFFICULTY_WINDOW_V2 60
|
||||
#define DIFFICULTY_WINDOW 720 // blocks
|
||||
#define DIFFICULTY_LAG 15 // !!!
|
||||
#define DIFFICULTY_CUT 60 // timestamps to cut after sorting
|
||||
#define DIFFICULTY_BLOCKS_COUNT_V2 DIFFICULTY_WINDOW_V2 + 1 // added +1 to make N=N
|
||||
#define DIFFICULTY_BLOCKS_COUNT DIFFICULTY_WINDOW + DIFFICULTY_LAG
|
||||
|
||||
|
||||
@@ -133,6 +136,7 @@
|
||||
#define HF_VERSION_DYNAMIC_FEE 4
|
||||
#define HF_VERSION_MIN_MIXIN_4 6
|
||||
#define HF_VERSION_MIN_MIXIN_7 7
|
||||
#define HF_VERSION_MIN_MIXIN_9 10
|
||||
#define HF_VERSION_ENFORCE_RCT 6
|
||||
|
||||
#define PER_KB_FEE_QUANTIZATION_DECIMALS 8
|
||||
|
||||
@@ -90,7 +90,8 @@ static const struct {
|
||||
time_t time;
|
||||
} mainnet_hard_forks[] = {
|
||||
//{ 1, 1, 0, 1341378000 },
|
||||
{ 7, 1, 0, 1519605000 }
|
||||
{ 7, 1, 0, 1519605000 },
|
||||
{ 8, 6969, 0, 1524214739 },
|
||||
};
|
||||
|
||||
static const uint64_t mainnet_hard_fork_version_1_till = ((uint64_t)(0));
|
||||
@@ -102,7 +103,8 @@ static const struct {
|
||||
time_t time;
|
||||
} testnet_hard_forks[] = {
|
||||
//{ 1, 1, 0, 1341378000 },
|
||||
{ 7, 1, 0, 1519605000 }
|
||||
{ 7, 1, 0, 1519605000 },
|
||||
{ 8, 10, 0, 1523255371 },
|
||||
};
|
||||
|
||||
static const uint64_t testnet_hard_fork_version_1_till = ((uint64_t)(1));
|
||||
@@ -727,20 +729,29 @@ difficulty_type Blockchain::get_difficulty_for_next_block()
|
||||
std::vector<uint64_t> timestamps;
|
||||
std::vector<difficulty_type> difficulties;
|
||||
auto height = m_db->height();
|
||||
|
||||
uint8_t version = get_current_hard_fork_version();
|
||||
size_t difficulty_blocks_count;
|
||||
if (version == 7) {
|
||||
difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT;
|
||||
} else {
|
||||
difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT_V2;
|
||||
}
|
||||
|
||||
// ND: Speedup
|
||||
// 1. Keep a list of the last 735 (or less) blocks that is used to compute difficulty,
|
||||
// then when the next block difficulty is queried, push the latest height data and
|
||||
// pop the oldest one from the list. This only requires 1x read per height instead
|
||||
// of doing 735 (DIFFICULTY_BLOCKS_COUNT).
|
||||
if (m_timestamps_and_difficulties_height != 0 && ((height - m_timestamps_and_difficulties_height) == 1))
|
||||
if (m_timestamps_and_difficulties_height != 0 && ((height - m_timestamps_and_difficulties_height) == 1) && m_timestamps.size() >= difficulty_blocks_count)
|
||||
{
|
||||
uint64_t index = height - 1;
|
||||
m_timestamps.push_back(m_db->get_block_timestamp(index));
|
||||
m_difficulties.push_back(m_db->get_block_cumulative_difficulty(index));
|
||||
|
||||
while (m_timestamps.size() > DIFFICULTY_BLOCKS_COUNT)
|
||||
while (m_timestamps.size() > difficulty_blocks_count)
|
||||
m_timestamps.erase(m_timestamps.begin());
|
||||
while (m_difficulties.size() > DIFFICULTY_BLOCKS_COUNT)
|
||||
while (m_difficulties.size() > difficulty_blocks_count)
|
||||
m_difficulties.erase(m_difficulties.begin());
|
||||
|
||||
m_timestamps_and_difficulties_height = height;
|
||||
@@ -749,7 +760,7 @@ difficulty_type Blockchain::get_difficulty_for_next_block()
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t offset = height - std::min < size_t > (height, static_cast<size_t>(DIFFICULTY_BLOCKS_COUNT));
|
||||
size_t offset = height - std::min < size_t > (height, static_cast<size_t>(difficulty_blocks_count));
|
||||
if (offset == 0)
|
||||
++offset;
|
||||
|
||||
@@ -765,8 +776,12 @@ difficulty_type Blockchain::get_difficulty_for_next_block()
|
||||
m_timestamps = timestamps;
|
||||
m_difficulties = difficulties;
|
||||
}
|
||||
size_t target = get_difficulty_target();
|
||||
return next_difficulty(timestamps, difficulties, target);
|
||||
size_t target = DIFFICULTY_TARGET_V2;
|
||||
if (version == 7) {
|
||||
return next_difficulty(timestamps, difficulties, target);
|
||||
} else {
|
||||
return next_difficulty_v2(timestamps, difficulties, target);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
// This function removes blocks from the blockchain until it gets to the
|
||||
@@ -914,16 +929,23 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std:
|
||||
LOG_PRINT_L3("Blockchain::" << __func__);
|
||||
std::vector<uint64_t> timestamps;
|
||||
std::vector<difficulty_type> cumulative_difficulties;
|
||||
uint8_t version = get_current_hard_fork_version();
|
||||
size_t difficulty_blocks_count;
|
||||
if (version == 7) {
|
||||
difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT;
|
||||
} else {
|
||||
difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT_V2;
|
||||
}
|
||||
|
||||
// if the alt chain isn't long enough to calculate the difficulty target
|
||||
// based on its blocks alone, need to get more blocks from the main chain
|
||||
if(alt_chain.size()< DIFFICULTY_BLOCKS_COUNT)
|
||||
if(alt_chain.size()< difficulty_blocks_count)
|
||||
{
|
||||
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
||||
|
||||
// Figure out start and stop offsets for main chain blocks
|
||||
size_t main_chain_stop_offset = alt_chain.size() ? alt_chain.front()->second.height : bei.height;
|
||||
size_t main_chain_count = DIFFICULTY_BLOCKS_COUNT - std::min(static_cast<size_t>(DIFFICULTY_BLOCKS_COUNT), alt_chain.size());
|
||||
size_t main_chain_count = difficulty_blocks_count - std::min(static_cast<size_t>(difficulty_blocks_count), alt_chain.size());
|
||||
main_chain_count = std::min(main_chain_count, main_chain_stop_offset);
|
||||
size_t main_chain_start_offset = main_chain_stop_offset - main_chain_count;
|
||||
|
||||
@@ -938,7 +960,7 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std:
|
||||
}
|
||||
|
||||
// make sure we haven't accidentally grabbed too many blocks...maybe don't need this check?
|
||||
CHECK_AND_ASSERT_MES((alt_chain.size() + timestamps.size()) <= DIFFICULTY_BLOCKS_COUNT, false, "Internal error, alt_chain.size()[" << alt_chain.size() << "] + vtimestampsec.size()[" << timestamps.size() << "] NOT <= DIFFICULTY_WINDOW[]" << DIFFICULTY_BLOCKS_COUNT);
|
||||
CHECK_AND_ASSERT_MES((alt_chain.size() + timestamps.size()) <= difficulty_blocks_count, false, "Internal error, alt_chain.size()[" << alt_chain.size() << "] + vtimestampsec.size()[" << timestamps.size() << "] NOT <= DIFFICULTY_WINDOW[]" << DIFFICULTY_BLOCKS_COUNT);
|
||||
|
||||
for (auto it : alt_chain)
|
||||
{
|
||||
@@ -950,8 +972,8 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std:
|
||||
// and timestamps from it alone
|
||||
else
|
||||
{
|
||||
timestamps.resize(static_cast<size_t>(DIFFICULTY_BLOCKS_COUNT));
|
||||
cumulative_difficulties.resize(static_cast<size_t>(DIFFICULTY_BLOCKS_COUNT));
|
||||
timestamps.resize(static_cast<size_t>(difficulty_blocks_count));
|
||||
cumulative_difficulties.resize(static_cast<size_t>(difficulty_blocks_count));
|
||||
size_t count = 0;
|
||||
size_t max_i = timestamps.size()-1;
|
||||
// get difficulties and timestamps from most recent blocks in alt chain
|
||||
@@ -960,7 +982,7 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std:
|
||||
timestamps[max_i - count] = it->second.bl.timestamp;
|
||||
cumulative_difficulties[max_i - count] = it->second.cumulative_difficulty;
|
||||
count++;
|
||||
if(count >= DIFFICULTY_BLOCKS_COUNT)
|
||||
if(count >= difficulty_blocks_count)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -969,8 +991,13 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std:
|
||||
size_t target = get_ideal_hard_fork_version(bei.height) < 2 ? DIFFICULTY_TARGET_V1 : DIFFICULTY_TARGET_V2;
|
||||
|
||||
// calculate the difficulty target for the block and return it
|
||||
return next_difficulty(timestamps, cumulative_difficulties, target);
|
||||
if (version == 7) {
|
||||
return next_difficulty(timestamps, cumulative_difficulties, target);
|
||||
} else {
|
||||
return next_difficulty_v2(timestamps, cumulative_difficulties, target);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// This function does a sanity check on basic things that all miner
|
||||
// transactions have in common, such as:
|
||||
@@ -2535,7 +2562,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
|
||||
{
|
||||
size_t n_unmixable = 0, n_mixable = 0;
|
||||
size_t mixin = std::numeric_limits<size_t>::max();
|
||||
const size_t min_mixin = hf_version >= HF_VERSION_MIN_MIXIN_7 ? 7 : hf_version >= HF_VERSION_MIN_MIXIN_4 ? 4 : 2;
|
||||
const size_t min_mixin = hf_version >= HF_VERSION_MIN_MIXIN_9 ? 9 : hf_version >= HF_VERSION_MIN_MIXIN_7 ? 7 : hf_version >= HF_VERSION_MIN_MIXIN_4 ? 4 : 2;
|
||||
for (const auto& txin : tx.vin)
|
||||
{
|
||||
// non txin_to_key inputs will be rejected below
|
||||
@@ -3123,7 +3150,8 @@ bool Blockchain::check_block_timestamp(std::vector<uint64_t>& timestamps, const
|
||||
bool Blockchain::check_block_timestamp(const block& b) const
|
||||
{
|
||||
LOG_PRINT_L3("Blockchain::" << __func__);
|
||||
if(b.timestamp > get_adjusted_time() + CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT)
|
||||
uint64_t cryptonote_block_future_time_limit = get_current_hard_fork_version() < 7 ? CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT : CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT_V2;
|
||||
if(b.timestamp > get_adjusted_time() + cryptonote_block_future_time_limit)
|
||||
{
|
||||
MERROR_VER("Timestamp of block with id: " << get_block_hash(b) << ", " << b.timestamp << ", bigger than adjusted time + 2 hours");
|
||||
return false;
|
||||
|
||||
@@ -1573,7 +1573,7 @@ skip:
|
||||
if(m_synchronized.compare_exchange_strong(val_expected, true))
|
||||
{
|
||||
MGINFO_YELLOW(ENDL << "**********************************************************************" << ENDL
|
||||
<< "You are now synchronized with the network. You may now start monero-wallet-cli." << ENDL
|
||||
<< "You are now synchronized with the network. You may now start wownero-wallet-cli." << ENDL
|
||||
<< ENDL
|
||||
<< "Use the \"help\" command to see the list of available commands." << ENDL
|
||||
<< "**********************************************************************");
|
||||
|
||||
@@ -329,7 +329,7 @@ bool t_command_server::help(const std::vector<std::string>& args)
|
||||
std::string t_command_server::get_commands_str()
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << std::endl;
|
||||
ss << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << std::endl;
|
||||
ss << "Commands: " << std::endl;
|
||||
std::string usage = m_command_lookup.get_usage();
|
||||
boost::replace_all(usage, "\n", "\n ");
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
namespace daemonize
|
||||
{
|
||||
std::string const t_executor::NAME = "Monero Daemon";
|
||||
std::string const t_executor::NAME = "Wownero Daemon";
|
||||
|
||||
void t_executor::init_options(
|
||||
boost::program_options::options_description & configurable_options
|
||||
@@ -58,7 +58,7 @@ namespace daemonize
|
||||
boost::program_options::variables_map const & vm
|
||||
)
|
||||
{
|
||||
LOG_PRINT_L0("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ") Daemonised");
|
||||
LOG_PRINT_L0("Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ") Daemonised");
|
||||
return t_daemon{vm};
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ int main(int argc, char const * argv[])
|
||||
|
||||
if (command_line::get_arg(vm, command_line::arg_help))
|
||||
{
|
||||
std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << "Usage: " + std::string{argv[0]} + " [options|settings] [daemon_command...]" << std::endl << std::endl;
|
||||
std::cout << visible_options << std::endl;
|
||||
return 0;
|
||||
@@ -127,7 +127,7 @@ int main(int argc, char const * argv[])
|
||||
// Monero Version
|
||||
if (command_line::get_arg(vm, command_line::arg_version))
|
||||
{
|
||||
std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL;
|
||||
std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ int main(int argc, char const * argv[])
|
||||
tools::set_max_concurrency(command_line::get_arg(vm, daemon_args::arg_max_concurrency));
|
||||
|
||||
// logging is now set up
|
||||
MGINFO("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")");
|
||||
MGINFO("Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")");
|
||||
|
||||
MINFO("Moving from main() into the daemonize now.");
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (command_line::get_arg(vm, command_line::arg_help))
|
||||
{
|
||||
std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
|
||||
std::cout << desc_options << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -50,5 +50,5 @@ add_dependencies(gen_multisig
|
||||
version)
|
||||
set_property(TARGET gen_multisig
|
||||
PROPERTY
|
||||
OUTPUT_NAME "monero-gen-trusted-multisig")
|
||||
OUTPUT_NAME "wownero-gen-trusted-multisig")
|
||||
install(TARGETS gen_multisig DESTINATION bin)
|
||||
|
||||
@@ -377,6 +377,8 @@ namespace nodetool
|
||||
{
|
||||
std::set<std::string> full_addrs;
|
||||
if (nettype == cryptonote::TESTNET) {
|
||||
full_addrs.insert("167.160.87.144:11180");
|
||||
full_addrs.insert("5.255.86.129:11180");
|
||||
} else {
|
||||
full_addrs.insert("66.70.218.230:34567");
|
||||
full_addrs.insert("34.209.48.213:34567");
|
||||
|
||||
@@ -85,9 +85,9 @@ typedef cryptonote::simple_wallet sw;
|
||||
|
||||
#define EXTENDED_LOGS_FILE "wallet_details.log"
|
||||
|
||||
#define DEFAULT_MIX 6
|
||||
#define DEFAULT_MIX 9
|
||||
|
||||
#define MIN_RING_SIZE 7 // Used to inform user about min ring size -- does not track actual protocol
|
||||
#define MIN_RING_SIZE 10 // Used to inform user about min ring size -- does not track actual protocol
|
||||
|
||||
#define OUTPUT_EXPORT_FILE_MAGIC "Monero output export\003"
|
||||
|
||||
@@ -2136,7 +2136,7 @@ simple_wallet::simple_wallet()
|
||||
"store-tx-info <1|0>\n "
|
||||
" Whether to store outgoing tx info (destination address, payment ID, tx secret key) for future reference.\n "
|
||||
"default-ring-size <n>\n "
|
||||
" Set the default ring size (default and minimum is 5).\n "
|
||||
" Set the default ring size (default and minimum is 10).\n "
|
||||
"auto-refresh <1|0>\n "
|
||||
" Whether to automatically synchronize new blocks from the daemon.\n "
|
||||
"refresh-type <full|optimize-coinbase|no-coinbase|default>\n "
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define DEF_MONERO_VERSION_TAG "@VERSIONTAG@"
|
||||
#define DEF_MONERO_VERSION "0.1.0.0-master"
|
||||
#define DEF_MONERO_RELEASE_NAME "Awesome Akita"
|
||||
#define DEF_MONERO_VERSION "0.2.0.0-master"
|
||||
#define DEF_MONERO_RELEASE_NAME "Busty Brazzers"
|
||||
#define DEF_MONERO_VERSION_FULL DEF_MONERO_VERSION "-" DEF_MONERO_VERSION_TAG
|
||||
|
||||
#include "version.h"
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Monero {
|
||||
|
||||
namespace {
|
||||
// copy-pasted from simplewallet
|
||||
static const size_t DEFAULT_MIXIN = 4;
|
||||
static const size_t DEFAULT_MIXIN = 9;
|
||||
static const int DEFAULT_REFRESH_INTERVAL_MILLIS = 1000 * 10;
|
||||
// limit maximum refresh interval as one minute
|
||||
static const int MAX_REFRESH_INTERVAL_MILLIS = 1000 * 60 * 1;
|
||||
|
||||
@@ -5265,10 +5265,14 @@ int wallet2::get_fee_algorithm() const
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
uint64_t wallet2::adjust_mixin(uint64_t mixin) const
|
||||
{
|
||||
if (mixin < 7 && use_fork_rules(7, 10)) {
|
||||
if (mixin < 9 && use_fork_rules(8, 10)) {
|
||||
MWARNING("Requested ring size " << (mixin + 1) << " too low for hard fork 8, using 10");
|
||||
mixin = 9;
|
||||
}
|
||||
else if (mixin < 7 && use_fork_rules(7, 10)) {
|
||||
MWARNING("Requested ring size " << (mixin + 1) << " too low for hard fork 7, using 7");
|
||||
mixin = 7;
|
||||
}
|
||||
}
|
||||
else if (mixin < 4 && use_fork_rules(6, 10)) {
|
||||
MWARNING("Requested ring size " << (mixin + 1) << " too low for hard fork 6, using 5");
|
||||
mixin = 4;
|
||||
@@ -8092,14 +8096,14 @@ const wallet2::transfer_details &wallet2::get_transfer_details(size_t idx) const
|
||||
std::vector<size_t> wallet2::select_available_unmixable_outputs(bool trusted_daemon)
|
||||
{
|
||||
// request all outputs with less than 3 instances
|
||||
const size_t min_mixin = use_fork_rules(7, 10) ? 7 : 2; // v6 increases min mixin from 2 to 4
|
||||
const size_t min_mixin = use_fork_rules(8, 10) ? 9 : 2; // v8 increases min mixin from 7 to 9
|
||||
return select_available_outputs_from_histogram(min_mixin + 1, false, true, false, trusted_daemon);
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
std::vector<size_t> wallet2::select_available_mixable_outputs(bool trusted_daemon)
|
||||
{
|
||||
// request all outputs with at least 3 instances, so we can use mixin 2 with
|
||||
const size_t min_mixin = use_fork_rules(7, 10) ? 7 : 2; // v6 increases min mixin from 2 to 4
|
||||
const size_t min_mixin = use_fork_rules(8, 10) ? 9 : 2; // v8 increases min mixin from 7 to 9
|
||||
return select_available_outputs_from_histogram(min_mixin + 1, true, true, true, trusted_daemon);
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@@ -10336,7 +10340,7 @@ uint64_t wallet2::get_segregation_fork_height() const
|
||||
static const bool use_dns = true;
|
||||
if (use_dns)
|
||||
{
|
||||
// All four MoneroPulse domains have DNSSEC on and valid
|
||||
// All four Wownero domains have DNSSEC on and valid
|
||||
static const std::vector<std::string> dns_urls = {
|
||||
|
||||
};
|
||||
|
||||
@@ -134,8 +134,8 @@ namespace wallet_args
|
||||
|
||||
if (command_line::get_arg(vm, command_line::arg_help))
|
||||
{
|
||||
Print(print) << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL;
|
||||
Print(print) << wallet_args::tr("This is the command line monero wallet. It needs to connect to a monero\n"
|
||||
Print(print) << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL;
|
||||
Print(print) << wallet_args::tr("This is the command line wownero wallet. It needs to connect to a wownero\n"
|
||||
"daemon to work correctly.") << ENDL;
|
||||
Print(print) << wallet_args::tr("Usage:") << ENDL << " " << usage;
|
||||
Print(print) << desc_all;
|
||||
@@ -143,7 +143,7 @@ namespace wallet_args
|
||||
}
|
||||
else if (command_line::get_arg(vm, command_line::arg_version))
|
||||
{
|
||||
Print(print) << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")";
|
||||
Print(print) << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace wallet_args
|
||||
if (!command_line::is_arg_defaulted(vm, arg_max_concurrency))
|
||||
tools::set_max_concurrency(command_line::get_arg(vm, arg_max_concurrency));
|
||||
|
||||
Print(print) << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")";
|
||||
Print(print) << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")";
|
||||
|
||||
if (!command_line::is_arg_defaulted(vm, arg_log_level))
|
||||
MINFO("Setting log level = " << command_line::get_arg(vm, arg_log_level));
|
||||
|
||||
Reference in New Issue
Block a user