bisq-network / compensation

@bisq-network contributor compensation requests
https://github.com/bisq-network/docs/tree/master/dao/phase-zero#how-to-request-compensation
19 stars 19 forks source link

For Cycle 58 #1533

Open alvasw opened 2 months ago

alvasw commented 2 months ago

Summary

Specify the total amount of BSQ you are requesting, along with the USD total and BSQ/USD rate (don't include the brackets!):

Contributions delivered

Add contributions you have delivered and roles you have performed here as new rows in the table below. Role line-items should include an asterisk (*) in the team column.

Title Team USD Link Notes
bisq2: ControlPortFileParser: Handle "\r\n" newline encoding dev https://github.com/bisq-network/bisq2/pull/2047

Lines end with "\r\n" on Windows.

bisq2: Move TorInstallationFiles into TorInstaller dev https://github.com/bisq-network/bisq2/pull/2048
bisq2: TorService: Use AtomicBoolean compareAndSet dev https://github.com/bisq-network/bisq2/pull/2062
bisq2: Fix Tor start-up deadlock dev https://github.com/bisq-network/bisq2/pull/2063

Java's WatchService misses filesystem events while a consumer is processing a WatchKey.
Java documentation:

Once the events have been processed the consumer invokes the key's reset method to reset the key which allows the key to be signalled and re-queued with further events.

This behavior caused deadlocks during some Tor start ups.

Changes:

  • Implement ControlPortFilePoller
  • Let Tor pick control port
    • To select the Tor control port, we bind to a random port, close it and pass the port number to Tor. It can happen that Tor tries to bind to the port before it is closed. In this case, the Tor startup will fail because Tor will never print a line containing "[notice] Opened Control listener connection (ready) on ". Up until now, Bisq monitored the Tor log file to know when the control port is ready. Now Tor writes the control port to a file and Bisq reads that file.

Ref: #1798

bisq2: Remove legacy Tor startup code dev https://github.com/bisq-network/bisq2/pull/2066

Relates to #1798 and #2063.

bisq2: Compute Tor bootstrap timeout from last event dev https://github.com/bisq-network/bisq2/pull/2067

When the Tor network is under load, the bootstrap process takes multiple minutes. Tor informs us about the progress with BootstrapEvent's until Tor is ready.

Fixes #1798

bisq2: Get SOCKS5 port from Tor daemon dev https://github.com/bisq-network/bisq2/pull/2122 We don't know the SOCKS5 port when we're using to a running Tor daemon. This change is needed to support external Tor instances.

Ref: https://github.com/bisq-network/bisq2/issues/1894
bisq2: Let Tor pick SOCKS5 port dev https://github.com/bisq-network/bisq2/pull/2123 To select the Tor SOCKS5 port, we bind to a random port, close it and pass the port number to Tor. It can happen that Tor tries to bind to the port before it is closed. In this case, the Tor startup will fail.

Ref: https://github.com/bisq-network/bisq2/issues/1798
bisq2: Move Tor ControlPortFile classes to control_port package dev https://github.com/bisq-network/bisq2/pull/2124
bisq2: Fix request for permission to use the microphone dev https://github.com/bisq-network/bisq2/issues/1842#issuecomment-2079752414 We use jpackage to create packages that contain the JDK, so that users don't have to install Java separately. The JDK can't know in advance what APIs a Jar is consuming and requests therefore all permission by default.

The microphone permission is hard-coded here: https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template#L36

I created a jpackage app image to modify the file but the jpackage app image creates the app bundle and there is no easy way to override the properties. At this point, It seems better to create the app bundle and runtime image ourselves to only request the permission we need.
dev 5000 Total for items above.
alvasw commented 2 months ago

7f2ae2bae8a440a6bc2dd1d2acbdf2bb2d5cf30a88d2eef94a2217e264cb3dd3