Update technical documentations to help new developers

This commit is contained in:
BtcContributor 2021-04-22 18:49:41 +02:00
parent 469448a218
commit 1a2307d613
No known key found for this signature in database
GPG Key ID: DA582457496C7F6D
4 changed files with 24 additions and 17 deletions

View File

@ -28,11 +28,13 @@ You can find more information about the Bitcoin regtest mode [here](https://bitc
Navigate to the [bitcoin.conf](https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File) file and set `regtest=1` and `peerbloomfilters=1`, or add `-regtest -peerbloomfilters=1` as a program arguments when starting Bitcoin Core.
At first startup you need to create 101 blocks using the command `generate 101`* from the terminal inside Bitcoin Core. 101 blocks are required because of the coin maturity (100 blocks) so you need one more to have at least 50 BTC available for spending.
At first startup you need to create 101 blocks using the command `generatetoaddress 101 address`* from the terminal inside Bitcoin Core, where `address` value could be obtained with the command `getnewaddress`. 101 blocks are required because of the coin maturity (100 blocks) so you need one more to have at least 50 BTC available for spending.
Later you can create new blocks with `generate 1`*.
generatetoaddress 101 bcrt1qhqn0t94uc269szakr4ez0zh7erdd6tlm4pv6mg
*This method is deprecated in Bitcoin Core's v.0.18 and will be fully removed in v.0.19. Use instead `generatetoaddress amount address`.
Later you can create new blocks with `generatetoaddress 1 address`*.
*If you are using Bitcoin Core v.0.18 or less, use instead `generate 1`.
## Understand Bisq P2P network options
@ -90,4 +92,4 @@ and
At this point you can now perform trades between Alice and Bob using your local regtest environment and test from both the buyer's and seller's perspective. You can also open disputes with `cmd+o` and see how the arbitration system works (run the arbitrator in that case as well).
_Remember to generate a new block in the Bitcoin Core console after taking an offer using the command `generate 1` to trigger a block confirmation._
_Remember to generate a new block in the Bitcoin Core console after taking an offer using the command `generatetoaddress 1 address` to trigger a block confirmation._

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,18 +1,22 @@
# Importing Bisq into IntelliJ IDEA
Most Bisq contributors use IDEA for development. The following instructions have been tested on IDEA 2019.2.
Most Bisq contributors use IDEA for development. The following instructions have been tested on IDEA 2021.1.
1. Follow the instructions in [build.md](build.md) to clone and build Bisq at the command line.
1. Open IDEA
1. Go to `Preferences->Plugins` (`File->Settings, Plugins for Windows`). Search for and install the _Lombok_ plugin. When prompted, do not restart IDEA.
1. Go to `Preferences->Build, Execution, Deployment->Compiler->Annotation Processors` and check the `Enable annotation processing` option (to enable processing of Lombok annotations)
1. Restart IDEA
1. Go to `Import Project`, select the `settings.gradle` file and click `Open`
1. In the `Import Project from Gradle` screen, check the `Use auto-import` option and click `OK`
1. When prompted whether to overwrite the existing `.idea` directory, click `Yes` (This step was not required with 2019.2 but is kept here in case you are running an older version)
1. In the `Project` tool window, right click on the root-level `.idea` folder, select `Git->Revert...` and click OK in the dialog that appears (to restore source-controlled `.idea` configuration files that get overwritten during project import)
1. If you did not yet setup JDK10 in IntelliJ, Go to `File->Project Structure->Project` and under the `Project SDK` option locate your JAVA_HOME folder, then in `Project language level` beneath select `10 - ...`. (JDK10 is no longer supported but you can still download it from the [archive](https://jdk.java.net/archive/))
1. Select JDK 10 for gradle as well. Go to `Preferences->Build, Execution, Deployment->Build Tools->Gradle` and select the JDK10 location for Gradle JVM
1. Go to `Build->Build Project`. Everything should build cleanly. You should be able to run tests, run `main` methods in any component, etc.
1. Go to `File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors` and check the `Enable annotation processing` option to enable processing of Lombok annotations (Lombok plugin installed by default since v2020.3)
1. Go to `File -> New -> Project from Existing Sources...` and then select the main Bisq folder to load automatically the related Gradle project
1. If you did not yet setup JDK11 in IntelliJ, go to `File-> Project Structure -> Project` and under the `Project SDK` option locate your JDK11 folder
1. Select JDK 11 for Gradle as well. Go to `File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle` and select the JDK11 location for the Gradle JVM value
1. Go to `Build -> Build Project`. Everything should build cleanly
1. Go to `Run > Edit Configurations... -> Plus (+) icon on the top left -> Application` anf then fill the requested fields as shown below, while using as CLI arguments one of those listed in [dev-setup.md](dev-setup.md):
> 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 `common` project. You can do this via the Gradle tool window in IDEA, or you can do it the command line with `./gradlew :common:generateProto`. Once you've done that, run `Build->Build Project` again and you should have no errors.
![edit_configurations.png](edit_configurations.png)
9. Now you should be able to run Bisq by clicking on the _Play_ button or via `Run -> Run 'Bisq Desktop'`
10. If you want to debug the application and execute breakpoints, use `Run -> Debug 'Bisq Desktop'`
> 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.

View File

@ -13,6 +13,7 @@ In order to take part in the testing process, you will need to do the following:
## Communication Channels
If you would like to discuss and/or contribute to Bisq's testing effort, join us in the #testing channel within the [Bisq Keybase team](https://keybase.io/team/bisq).
Here you could also request access to TestPad.
## Compensation
@ -35,7 +36,7 @@ Some definitions within the context of TestPad and how they apply to our specifi
### Test Structure
Tests are written using Behaviour-Driven Development (BDD) style syntax (given/when/then).
- **Given:** This states the preconditions that are assumed for the test. It is not a test step (one that requires a result to be recorded), but instead you must ensure the preconditions are satisfied in order to perform the test.
- **Given:** This states the preconditions that are assumed for the test. It is not a test step (one that requires a result to be recorded), but instead you must ensure the preconditions are satisfied in order to perform the test.
- **When:** This states the actions to be performed for the test. This also does not require a result to be recorded.
- **Then:** This states the expected results of the test. This requires a result to be recorded.