protocol ready
This commit is contained in:
parent
1f385328de
commit
8e1c629abd
3 changed files with 13 additions and 206 deletions
93
README.md
93
README.md
|
@ -1,90 +1,7 @@
|
||||||
<div align="center">
|
Patched Branch for App
|
||||||
<img src="https://raw.githubusercontent.com/haveno-dex/haveno-meta/721e52919b28b44d12b6e1e5dac57265f1c05cda/logo/haveno_logo_landscape.svg" alt="Haveno logo">
|
Any changes must be made to the patched_changes (this) branch only if something is less of a patch, and more of a core functionality you can request this from the haveno core team.
|
||||||
|
|
||||||

|
Explaination of changes
|
||||||
[](https://github.com/haveno-dex/haveno/issues?q=is%3Aopen+is%3Aissue+label%3A%F0%9F%92%B0bounty)
|
|
||||||
[](https://twitter.com/havenodex)
|
|
||||||
[](https://matrix.to/#/#haveno:monero.social) [](https://github.com/haveno-dex/.github/blob/master/CODE_OF_CONDUCT.md)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## What is Haveno?
|
Changed protocol serialization from 'A' to 'X' to indicate a clear significant change in structure
|
||||||
|
Changes the daemon to be a shadowJar instead
|
||||||
Haveno (pronounced ha‧ve‧no) is an open source platform to exchange [Monero](https://getmonero.org) for fiat currencies like USD, EUR, and GBP or other cryptocurrencies like BTC, ETH, and BCH.
|
|
||||||
|
|
||||||
Main features:
|
|
||||||
|
|
||||||
- Communications are routed through **Tor**, to preserve your privacy.
|
|
||||||
|
|
||||||
- Trades are **peer-to-peer**: trades on Haveno happen between people only, there is no central authority.
|
|
||||||
|
|
||||||
- Trades are **non-custodial**: Haveno supports arbitration in case something goes wrong during the trade, but arbitrators never have access to your funds.
|
|
||||||
|
|
||||||
- There is **No token**, because it's not needed. Transactions between traders are secured by non-custodial multisignature transactions on the Monero network.
|
|
||||||
|
|
||||||
See the [FAQ on our website](https://haveno.exchange/faq/) for more information.
|
|
||||||
|
|
||||||
## Installing Haveno
|
|
||||||
|
|
||||||
Haveno can be installed on Linux, macOS, and Windows by using a third party installer and network.
|
|
||||||
|
|
||||||
> [!note]
|
|
||||||
> The official Haveno repository does not support making real trades directly.
|
|
||||||
>
|
|
||||||
> To make real trades with Haveno, first find a third party network, and then use their installer or build their repository. We do not endorse any networks at this time.
|
|
||||||
|
|
||||||
A test network is also available for users to make test trades using Monero's stagenet. See the [instructions](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md) to build Haveno and connect to the test network.
|
|
||||||
|
|
||||||
Alternatively, you can [create your own mainnet network](create-mainnet.md).
|
|
||||||
|
|
||||||
Note that Haveno is being actively developed. If you find issues or bugs, please let us know.
|
|
||||||
|
|
||||||
## Main repositories
|
|
||||||
|
|
||||||
- **[haveno](https://github.com/haveno-dex/haveno)** - This repository. The core of Haveno.
|
|
||||||
- **[haveno-ts](https://github.com/haveno-dex/haveno-ts)** - TypeScript library for using Haveno.
|
|
||||||
- **[haveno-ui](https://github.com/haveno-dex/haveno-ui)** - A new user interface (WIP).
|
|
||||||
- **[haveno-meta](https://github.com/haveno-dex/haveno-meta)** - For project-wide discussions and proposals.
|
|
||||||
|
|
||||||
If you wish to help, take a look at the repositories above and look for open issues. We run a bounty program to incentivize development. See [Bounties](#bounties).
|
|
||||||
|
|
||||||
## Keep in touch and help out!
|
|
||||||
|
|
||||||
Haveno is a community-driven project. For it to be successful it's fundamental to have the support and help of the community. Join the community rooms on our Matrix server:
|
|
||||||
|
|
||||||
- General discussions: **Haveno** ([#haveno:monero.social](https://matrix.to/#/#haveno:monero.social)) relayed on IRC/Libera (`#haveno`)
|
|
||||||
- Development discussions: **Haveno Development** ([#haveno-development:monero.social](https://matrix.to/#/#haveno-development:monero.social)) relayed on IRC/Libera (`#haveno-development`)
|
|
||||||
|
|
||||||
Email: contact@haveno.exchange
|
|
||||||
Website: [haveno.exchange](https://haveno.exchange)
|
|
||||||
|
|
||||||
## Contributing to Haveno
|
|
||||||
|
|
||||||
See the [developer guide](docs/developer-guide.md) to get started developing for Haveno.
|
|
||||||
|
|
||||||
See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for our styling guides.
|
|
||||||
|
|
||||||
If you are not able to contribute code and want to contribute development resources, [donations](#support) fund development bounties.
|
|
||||||
|
|
||||||
## Bounties
|
|
||||||
|
|
||||||
To incentivize development and reward contributors, we adopt a simple bounty system. Contributors may be awarded bounties after completing a task (resolving an issue). Take a look at the [issues labeled '💰bounty'](https://github.com/haveno-dex/haveno/issues?q=is%3Aopen+is%3Aissue+label%3A%F0%9F%92%B0bounty) in the main `haveno` repository. [Details and conditions for receiving a bounty](docs/bounties.md).
|
|
||||||
|
|
||||||
## Support and sponsorships
|
|
||||||
|
|
||||||
To bring Haveno to life, we need resources. If you have the possibility, please consider [becoming a sponsor](https://haveno.exchange/sponsors/) or donating to the project:
|
|
||||||
|
|
||||||
### Monero
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<img src="https://raw.githubusercontent.com/haveno-dex/haveno/master/media/donate_monero.png" alt="Donate Monero" width="115" height="115"><br>
|
|
||||||
<code>42sjokkT9FmiWPqVzrWPFE5NCJXwt96bkBozHf4vgLR9hXyJDqKHEHKVscAARuD7in5wV1meEcSTJTanCTDzidTe2cFXS1F</code>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
If you are using a wallet that supports OpenAlias (like the 'official' CLI and GUI wallets), you can simply put `fund@haveno.exchange` as the "receiver" address.
|
|
||||||
|
|
||||||
### Bitcoin
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<img src="https://raw.githubusercontent.com/haveno-dex/haveno/master/media/donate_bitcoin.png" alt="Donate Bitcoin" width="115" height="115"><br>
|
|
||||||
<code>1AKq3CE1yBAnxGmHXbNFfNYStcByNDc5gQ</code>
|
|
||||||
</p>
|
|
124
build.gradle
124
build.gradle
|
@ -453,122 +453,6 @@ configure(project(':core')) {
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
}
|
}
|
||||||
|
|
||||||
task havenoDeps {
|
|
||||||
doLast {
|
|
||||||
// get monero binaries download url
|
|
||||||
Map moneroBinaries = [
|
|
||||||
'linux-x86_64' : 'https://github.com/haveno-dex/monero/releases/download/release4/monero-bins-haveno-linux-x86_64.tar.gz',
|
|
||||||
'linux-x86_64-sha256' : '0810808292fd5ad595a46a7fcc8ecb28d251d80f8d75c0e7a7d51afbeb413b68',
|
|
||||||
'linux-aarch64' : 'https://github.com/haveno-dex/monero/releases/download/release4/monero-bins-haveno-linux-aarch64.tar.gz',
|
|
||||||
'linux-aarch64-sha256' : '61222ee8e2021aaf59ab8813543afc5548f484190ee9360bc9cfa8fdf21cc1de',
|
|
||||||
'mac' : 'https://github.com/haveno-dex/monero/releases/download/release4/monero-bins-haveno-mac.tar.gz',
|
|
||||||
'mac-sha256' : '5debb8d8d8dd63809e8351368a11aa85c47987f1a8a8f2dcca343e60bcff3287',
|
|
||||||
'windows' : 'https://github.com/haveno-dex/monero/releases/download/release4/monero-bins-haveno-windows.zip',
|
|
||||||
'windows-sha256' : 'd7c14f029db37ae2a8bc6b74c35f572283257df5fbcc8cc97b704d1a97be9888'
|
|
||||||
]
|
|
||||||
|
|
||||||
String osKey
|
|
||||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
||||||
osKey = 'windows'
|
|
||||||
} else if (Os.isFamily(Os.FAMILY_MAC)) {
|
|
||||||
osKey = 'mac'
|
|
||||||
} else {
|
|
||||||
String architecture = System.getProperty("os.arch").toLowerCase()
|
|
||||||
if (architecture.contains('aarch64') || architecture.contains('arm')) {
|
|
||||||
osKey = 'linux-aarch64'
|
|
||||||
} else {
|
|
||||||
osKey = 'linux-x86_64'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String moneroDownloadUrl = moneroBinaries[osKey]
|
|
||||||
String moneroSHA256Hash = moneroBinaries[osKey + '-sha256']
|
|
||||||
String moneroArchiveFileName = moneroDownloadUrl.tokenize('/').last()
|
|
||||||
String localnetDirName = '.localnet'
|
|
||||||
File localnetDir = new File(project.rootDir, localnetDirName)
|
|
||||||
localnetDir.mkdirs()
|
|
||||||
File moneroArchiveFile = new File(localnetDir, moneroArchiveFileName)
|
|
||||||
ext.downloadAndVerifyDependencies(moneroDownloadUrl, moneroSHA256Hash, moneroArchiveFile)
|
|
||||||
|
|
||||||
// extract if dependencies are missing or if archive was updated
|
|
||||||
File monerodFile
|
|
||||||
File moneroRpcFile
|
|
||||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
||||||
monerodFile = new File(localnetDir, 'monerod.exe')
|
|
||||||
moneroRpcFile = new File(localnetDir, 'monero-wallet-rpc.exe')
|
|
||||||
} else {
|
|
||||||
monerodFile = new File(localnetDir, 'monerod')
|
|
||||||
moneroRpcFile = new File(localnetDir, 'monero-wallet-rpc')
|
|
||||||
}
|
|
||||||
if (ext.dependencyDownloadedAndVerified || !monerodFile.exists() || !moneroRpcFile.exists()) {
|
|
||||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
||||||
ext.extractArchiveZip(moneroArchiveFile, localnetDir)
|
|
||||||
} else {
|
|
||||||
ext.extractArchiveTarGz(moneroArchiveFile, localnetDir)
|
|
||||||
}
|
|
||||||
|
|
||||||
// add the current platform's monero dependencies into the resources folder for installation
|
|
||||||
copy {
|
|
||||||
from "${monerodFile}"
|
|
||||||
into "${project(':core').projectDir}/src/main/resources/bin"
|
|
||||||
}
|
|
||||||
copy {
|
|
||||||
from "${moneroRpcFile}"
|
|
||||||
into "${project(':core').projectDir}/src/main/resources/bin"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ext.extractArchiveTarGz = { File tarGzFile, File destinationDir ->
|
|
||||||
println "Extracting tar.gz ${tarGzFile}"
|
|
||||||
// Gradle's tar extraction preserves permissions (crucial for jpackage to function correctly)
|
|
||||||
copy {
|
|
||||||
from tarTree(resources.gzip(tarGzFile))
|
|
||||||
into destinationDir
|
|
||||||
}
|
|
||||||
println "Extracted to ${destinationDir}"
|
|
||||||
}
|
|
||||||
|
|
||||||
ext.extractArchiveZip = { File zipFile, File destinationDir ->
|
|
||||||
println "Extracting zip ${zipFile}..."
|
|
||||||
ant.unzip(src: zipFile, dest: destinationDir)
|
|
||||||
println "Extracted to ${destinationDir}"
|
|
||||||
}
|
|
||||||
|
|
||||||
ext.downloadAndVerifyDependencies = { String archiveURL, String archiveSHA256, File destinationArchiveFile ->
|
|
||||||
ext.dependencyDownloadedAndVerified = false
|
|
||||||
|
|
||||||
// if archive exists, check to see if its already up to date
|
|
||||||
if (destinationArchiveFile.exists()) {
|
|
||||||
println "Verifying existing archive ${destinationArchiveFile}"
|
|
||||||
ant.archiveHash = archiveSHA256
|
|
||||||
ant.checksum(file: destinationArchiveFile, algorithm: 'SHA-256', property: '${archiveHash}', verifyProperty: 'existingHashMatches')
|
|
||||||
if (ant.properties['existingHashMatches'] != 'true') {
|
|
||||||
println "Existing archive does not match hash ${archiveSHA256}"
|
|
||||||
} else {
|
|
||||||
println "Existing archive matches hash"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// download archives
|
|
||||||
println "Downloading ${archiveURL}"
|
|
||||||
ant.get(src: archiveURL, dest: destinationArchiveFile)
|
|
||||||
println 'Download saved to ' + destinationArchiveFile
|
|
||||||
|
|
||||||
// verify checksum
|
|
||||||
println 'Verifying checksum for downloaded binary ...'
|
|
||||||
ant.archiveHash = archiveSHA256
|
|
||||||
ant.checksum(file: destinationArchiveFile, algorithm: 'SHA-256', property: '${archiveHash}', verifyProperty: 'downloadedHashMatches') // use a different verifyProperty name from existing verification or it will always fail
|
|
||||||
if (ant.properties['downloadedHashMatches'] != 'true') {
|
|
||||||
ant.fail('Checksum mismatch: Downloaded archive has a different checksum than expected')
|
|
||||||
}
|
|
||||||
println 'Checksum verified'
|
|
||||||
ext.dependencyDownloadedAndVerified = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
processResources.dependsOn havenoDeps // before both test and build
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(project(':cli')) {
|
configure(project(':cli')) {
|
||||||
|
@ -787,7 +671,12 @@ configure(project(':statsnode')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(project(':daemon')) {
|
configure(project(':daemon')) {
|
||||||
mainClassName = 'haveno.daemon.app.HavenoDaemonMain'
|
apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
|
apply plugin: 'application'
|
||||||
|
|
||||||
|
application {
|
||||||
|
mainClass = 'haveno.daemon.app.HavenoDaemonMain'
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':proto')
|
implementation project(':proto')
|
||||||
|
@ -847,6 +736,7 @@ configure(project(':daemon')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
configure(project(':inventory')) {
|
configure(project(':inventory')) {
|
||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class Version {
|
||||||
|
|
||||||
// The version no. for the objects sent over the network. A change will break the serialization of old objects.
|
// The version no. for the objects sent over the network. A change will break the serialization of old objects.
|
||||||
// If objects are used for both network and database the network version is applied.
|
// If objects are used for both network and database the network version is applied.
|
||||||
public static final String P2P_NETWORK_VERSION = "A";
|
public static final String P2P_NETWORK_VERSION = "X";
|
||||||
|
|
||||||
// The version no. of the serialized data stored to disc. A change will break the serialization of old objects.
|
// The version no. of the serialized data stored to disc. A change will break the serialization of old objects.
|
||||||
// VERSION = 0.5.0 -> LOCAL_DB_VERSION = 1
|
// VERSION = 0.5.0 -> LOCAL_DB_VERSION = 1
|
||||||
|
|
Loading…
Reference in a new issue