mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-16 15:58:08 +00:00
add developer guide and cleanup docs
This commit is contained in:
parent
4d81d98e00
commit
47a7ec07e1
5 changed files with 97 additions and 21 deletions
22
README.md
22
README.md
|
@ -32,10 +32,6 @@ Currently, efforts are focused in developing the core repository ('haveno'). If
|
||||||
|
|
||||||
The PGP keys of the core team members are in `gpg_keys/`.
|
The PGP keys of the core team members are in `gpg_keys/`.
|
||||||
|
|
||||||
## Trade protocol
|
|
||||||
|
|
||||||
See [trade-protocol.md](docs/trade_protocol/trade-protocol.md)
|
|
||||||
|
|
||||||
## Keep in touch and help out!
|
## Keep in touch and help out!
|
||||||
|
|
||||||
Haveno is a community-driven project. For it to be succesful it's fundamental to have the support and help of the Monero community. We have our own Matrix server. Registrations are not open at the moment, but the rooms are public and can be joined from any matrix client (like Element). We look forward to hearing from you!
|
Haveno is a community-driven project. For it to be succesful it's fundamental to have the support and help of the Monero community. We have our own Matrix server. Registrations are not open at the moment, but the rooms are public and can be joined from any matrix client (like Element). We look forward to hearing from you!
|
||||||
|
@ -46,18 +42,24 @@ Haveno is a community-driven project. For it to be succesful it's fundamental to
|
||||||
|
|
||||||
Email: contact@haveno.exchange
|
Email: contact@haveno.exchange
|
||||||
|
|
||||||
### Styling guidelines
|
## Running a local Haveno test network
|
||||||
|
|
||||||
See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md)
|
See [docs/installing.md](docs/installing.md)
|
||||||
|
|
||||||
|
## Contributing to Haveno
|
||||||
|
|
||||||
|
We are looking for help building Haveno. There are many [tasks](https://github.com/haveno-dex/haveno/issues) to complete, and many tasks have bounties.
|
||||||
|
|
||||||
|
See the [developer guide](docs/developer-guide.md) to get started developing for Haveno. At this stage, we're mostly looking for help building the backend and APIs.
|
||||||
|
|
||||||
|
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
|
## 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 eligible for a bounty on the [dedicated Kanban board](https://github.com/orgs/haveno-dex/projects/2) or look for [issues labelled '💰bounty'](https://github.com/haveno-dex/haveno/issues?q=is%3Aissue+is%3Aopen+label%3A%F0%9F%92%B0bounty) in the main `haveno` repository. [Details and conditions for receiving a bounty](docs/bounties.md).
|
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 eligible for a bounty on the [dedicated Kanban board](https://github.com/orgs/haveno-dex/projects/2) or look for [issues labelled '💰bounty'](https://github.com/haveno-dex/haveno/issues?q=is%3Aissue+is%3Aopen+label%3A%F0%9F%92%B0bounty) in the main `haveno` repository. [Details and conditions for receiving a bounty](docs/bounties.md).
|
||||||
|
|
||||||
## Running a local Haveno test network
|
|
||||||
|
|
||||||
See [docs/installing.md](docs/installing.md)
|
|
||||||
|
|
||||||
## Sponsors
|
## Sponsors
|
||||||
|
|
||||||
Would you like to help us build Haveno? Become a sponsor! We will show your logo here. Contact us at havenodex@protonmail.com.
|
Would you like to help us build Haveno? Become a sponsor! We will show your logo here. Contact us at havenodex@protonmail.com.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
## Contributing to Haveno
|
# Contributing to Haveno
|
||||||
|
|
||||||
Thanks for wishing to help! Here there are some guidelines and information about the development process. We suggest you to join the matrix room `#haveno-dev` (relayed on Freenode) and have a chat with the devs, so that we can help get you started.
|
Thanks for wishing to help! Here there are some guidelines and information about the development process. We suggest you to join the [matrix](https://app.element.io/#/room/#haveno-dev:haveno.network) room `#haveno-dev` (relayed on [IRC/Libera](irc://irc.libera.chat/#haveno-dev)) and have a chat with the devs, so that we can help get you started.
|
||||||
|
|
||||||
Issues are tracked on GitHub. We use [a label system](https://github.com/haveno-dex/haveno/issues/50) and GitHub's [project boards](https://github.com/haveno-dex/haveno/projects) to simplify development. Make sure to take a look at those and to follow the priorities suggested.
|
Issues are tracked on GitHub. We use [a label system](https://github.com/haveno-dex/haveno/issues/50) and GitHub's [project boards](https://github.com/haveno-dex/haveno/projects) to simplify development. Make sure to take a look at those and to follow the priorities suggested.
|
||||||
|
|
||||||
### General guidelines
|
## General guidelines
|
||||||
|
|
||||||
- Be verbose. Remember this is collaborative development and we need to make life as easy as possible for future developers and for the current maintainers.
|
- Be verbose. Remember this is collaborative development and we need to make life as easy as possible for future developers and for the current maintainers.
|
||||||
- All formatting needs to be consistent with the current code.
|
- All formatting needs to be consistent with the current code.
|
||||||
|
@ -12,6 +12,12 @@ Issues are tracked on GitHub. We use [a label system](https://github.com/haveno-
|
||||||
|
|
||||||
## Development process
|
## Development process
|
||||||
|
|
||||||
|
When you have something new built for Haveno, submit a pull request for review to be merged.
|
||||||
|
|
||||||
- Pull requests should contain as many details as possible about what you are going to change and why. Avoid "title only" PRs, unless they are self-explanatory.
|
- Pull requests should contain as many details as possible about what you are going to change and why. Avoid "title only" PRs, unless they are self-explanatory.
|
||||||
- Pull requests should contain one single commit, unless it makes sense to have more. Please become familiar with git if you are not.
|
- Pull requests should contain one single commit, unless it makes sense to have more. Please become familiar with git if you are not.
|
||||||
- Pull requests won't be merged before 24 hours has passed. This timeframe will be extended when Haveno will have more active developers.
|
- Pull requests won't be merged before 24 hours has passed. This timeframe will be extended when Haveno will have more active developers.
|
||||||
|
|
||||||
|
## Developer guide
|
||||||
|
|
||||||
|
See the [developer guide](developer-guide.md) to get started developing Haveno.
|
|
@ -1,13 +1,14 @@
|
||||||
Here are stored most of the docs of the Haveno project:
|
# Haveno Documentation
|
||||||
|
|
||||||
- [installing.md](installing.md ) - Instructions for running a local test network
|
- [installing.md](installing.md ) - Instructions for running a local test network
|
||||||
- [bounties.md](bounties.md) - Rules and description of the bounty program
|
|
||||||
- [CONTRIBUTING.md](CONTRIBUTING.md) - Guidelines for contributors
|
- [CONTRIBUTING.md](CONTRIBUTING.md) - Guidelines for contributors
|
||||||
|
- [developer-guide.md](developer-guide.md) - Guide for developers
|
||||||
|
- [bounties.md](bounties.md) - Rules and description of the bounty program
|
||||||
|
- [haveno-import.md](idea-import.md) - Instructions for importing Haveno into Eclipse IDE or IntelliJ IDEA (from Bisq)
|
||||||
|
- [trade-protocol.md](trade_protocol/trade-protocol.md) - Documents Haveno's core trade protocol
|
||||||
- [data-stores.md](data-stores.md) - Instructions for updating data stores (from Bisq)
|
- [data-stores.md](data-stores.md) - Instructions for updating data stores (from Bisq)
|
||||||
- [idea-import.md](idea-import.md) - Instructions for importing Haveno as an IntelliJ IDEA project (from Bisq))
|
|
||||||
- [README.md](README.md) - This file
|
|
||||||
- [tor-upgrade.md](tor-upgrade.md) - Instructions for upgrading the Tor dependencies used by Haveno (from Bisq)
|
- [tor-upgrade.md](tor-upgrade.md) - Instructions for upgrading the Tor dependencies used by Haveno (from Bisq)
|
||||||
- [trade-protocol.md](trade_protocol/trade-protocol.md) - The description of Haveno's trade protocol
|
- [README.md](README.md) - This file
|
||||||
|
|
||||||
Documents outside of this folder:
|
Documents outside of this folder:
|
||||||
|
|
||||||
|
|
39
docs/developer-guide.md
Normal file
39
docs/developer-guide.md
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# Developer Guide
|
||||||
|
|
||||||
|
This document is a guide for Haveno development.
|
||||||
|
|
||||||
|
## Installing Haveno
|
||||||
|
|
||||||
|
In order to develop for Haveno, first [install and run a local Haveno test network](installing.md).
|
||||||
|
|
||||||
|
## Running the UI proof of concept
|
||||||
|
|
||||||
|
Follow [instructions](https://github.com/haveno-dex/haveno-ui-poc#run-in-a-browser) to run Haveno's UI proof of concept in a browser.
|
||||||
|
|
||||||
|
This proof of concept demonstrates using Haveno's gRPC server with a web frontend (react and typescript) instead of Bisq's JFX application.
|
||||||
|
|
||||||
|
## Importing Haveno into development environment
|
||||||
|
|
||||||
|
Follow [instructions](import-haveno.md) to import Haveno into a development environment.
|
||||||
|
|
||||||
|
## Running end-to-end API tests
|
||||||
|
|
||||||
|
Follow [instructions](https://github.com/haveno-dex/haveno-ui-poc#run-tests) to run end-to-end API tests in the UI project.
|
||||||
|
|
||||||
|
## Adding new API functions and tests
|
||||||
|
|
||||||
|
1. Follow [instructions](https://github.com/haveno-dex/haveno-ui-poc#run-tests) to run Haveno's existing API tests successfully.
|
||||||
|
2. Define the new service or message in Haveno's [protobuf definition](../proto/src/main/proto/grpc.proto).
|
||||||
|
3. Clean and build Haveno after modifying the protobuf definition: `make clean && make`
|
||||||
|
4. Implement the new service in Haveno's backend, following existing patterns.<br>
|
||||||
|
For example, the gRPC function to get offers is implemented by [`GrpcServer`](https://github.com/haveno-dex/haveno/blob/master/daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java) > [`GrpcOffersService.getOffers(...)`](https://github.com/haveno-dex/haveno/blob/b761dbfd378faf49d95090c126318b419af7926b/daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java#L104) > [`CoreApi.getOffers(...)`](https://github.com/haveno-dex/haveno/blob/b761dbfd378faf49d95090c126318b419af7926b/core/src/main/java/bisq/core/api/CoreApi.java#L128) > [`CoreOffersService.getOffers(...)`](https://github.com/haveno-dex/haveno/blob/b761dbfd378faf49d95090c126318b419af7926b/core/src/main/java/bisq/core/api/CoreOffersService.java#L126) > [`OfferBookService.getOffers()`](https://github.com/haveno-dex/haveno/blob/b761dbfd378faf49d95090c126318b419af7926b/core/src/main/java/bisq/core/offer/OfferBookService.java#L193).
|
||||||
|
5. Build Haveno: `make`
|
||||||
|
6. Follow [instructions](https://github.com/haveno-dex/haveno-ui-poc#how-to-update-the-protobuf-client) to update the protobuf client in haveno-ui-poc.
|
||||||
|
7. Add the corresponding typescript method(s) to [HavenoDaemon.tsx](https://github.com/haveno-dex/haveno-ui-poc/blob/master/src/HavenoDaemon.tsx) with clear and concise documentation.
|
||||||
|
8. Add clean and comprehensive tests to [HavenoDaemon.test.tsx](https://github.com/haveno-dex/haveno-ui-poc/blob/master/src/HavenoDaemon.test.tsx), following existing patterns.
|
||||||
|
9. Verify the tests with `npm run test -- -t 'my test'` to run tests by name and `npm test` to run all tests together.
|
||||||
|
10. Open a pull request for review.
|
||||||
|
|
||||||
|
## Trade Protocol
|
||||||
|
|
||||||
|
For documentation of the trade protocol, see [trade protocol](trade_protocol/trade-protocol.pdf).
|
|
@ -1,4 +1,32 @@
|
||||||
# Importing Bisq into IntelliJ IDEA
|
## Importing Haveno into development environment
|
||||||
|
|
||||||
|
This document describes how to import Haveno into an integrated development environment (IDE).
|
||||||
|
|
||||||
|
## Importing Haveno into Eclipse IDE
|
||||||
|
|
||||||
|
The following steps describe how to import Haveno into Eclipse IDE for development. You can also develop using [IntelliJ IDEA](#importing-haveno-into-intellij-idea) or VSCode if you prefer.
|
||||||
|
|
||||||
|
> Note: Use default values unless specified otherwise.
|
||||||
|
|
||||||
|
1. Download and run the [Eclipse](https://www.eclipse.org/downloads/) installer.
|
||||||
|
2. Select "Eclipse IDE for Enterprise Java and Web Developers" to install.
|
||||||
|
3. Launch an eclipse workspace and close out of the welcome screen.
|
||||||
|
4. [Download](https://search.maven.org/search?q=g:org.projectlombok%20AND%20a:lombok&core=gav) the latest version of the lombok jar.
|
||||||
|
5. Run lombok jar, e.g.: `java -jar ~/Downloads/lombok-1.18.22.jar`.
|
||||||
|
6. Follow prompts to install lombok to your Eclipse installation.
|
||||||
|
7. Restart Eclipse.
|
||||||
|
8. File > Import... > Existing Gradle Project.
|
||||||
|
9. Select the location of "haveno" project, e.g. ~/git/haveno.
|
||||||
|
10. Advance to finish importing haveno project.
|
||||||
|
11. File > Import... > Existing Projects into Workspace.
|
||||||
|
12. Select the location of "haveno-ui-poc" project, e.g. ~git/haveno-ui-poc.
|
||||||
|
13. Advance to finish importing haveno-ui-poc project.
|
||||||
|
|
||||||
|
You are now ready to make, run, and test changes to the Haveno project!
|
||||||
|
|
||||||
|
## Importing Haveno into IntelliJ IDEA
|
||||||
|
|
||||||
|
> Note: These instructions are outdated and for Bisq.
|
||||||
|
|
||||||
Most Bisq contributors use IDEA for development. The following instructions have been tested on IDEA 2021.1.
|
Most Bisq contributors use IDEA for development. The following instructions have been tested on IDEA 2021.1.
|
||||||
|
|
||||||
|
@ -18,4 +46,4 @@ Most Bisq contributors use IDEA for development. The following instructions have
|
||||||
|
|
||||||
> TIP: If you encounter compilation errors in IDEA related to the `protobuf.*` classes, it is probably because you didn't build Bisq at the command line as instructed above. You need to run the `generateProto` task in the `other` project. You can do this via the Gradle tool window in IDEA, or you can do it the command line with `./gradlew :other:generateProto`. Once you've done that, run `Build -> Build Project` again and you should have no errors.
|
> TIP: If you encounter compilation errors in IDEA related to the `protobuf.*` classes, it is probably because you didn't build Bisq at the command line as instructed above. You need to run the `generateProto` task in the `other` project. You can do this via the Gradle tool window in IDEA, or you can do it the command line with `./gradlew :other:generateProto`. Once you've done that, run `Build -> Build Project` again and you should have no errors.
|
||||||
>
|
>
|
||||||
> If this does not solve the issue, try to execute `./gradlew clean` and then rebuild the project again.
|
> If this does not solve the issue, try to execute `./gradlew clean` and then rebuild the project again.
|
Loading…
Reference in a new issue