gui-qml icon indicating copy to clipboard operation
gui-qml copied to clipboard

Only write options after onboarding

Open johnny9 opened this issue 1 year ago • 14 comments

Windows Intel macOS Apple Silicon macOS ARM64 Android

johnny9 avatar Mar 09 '23 03:03 johnny9

Needs rebase.

hebasto avatar May 30 '23 09:05 hebasto

update from 45e3262 to 08be85b:

  • rebased over main

johnny9 avatar May 31 '23 13:05 johnny9

ACK 08be85b I tested these on Ubuntu 22.04.2 and it does what it says on the tin. Understood that we may need to buffer the settings writing to file in on-boarding; especially if the storage location is not set and may change. Maybe we should do our best to save what we can of what the user configured? Are there situations where we buffer settings and different settings that we save immediately?

thebagmaster avatar Jun 04 '23 02:06 thebagmaster

Please rebase.

https://discord.com/channels/903125802726596648/903126039084015638/1146922061449666602

hebasto avatar Aug 31 '23 22:08 hebasto

Update from 08be85b to 51df97d

  • rebased with main

johnny9 avatar Sep 01 '23 00:09 johnny9

tACK on WSL Ubuntu 22.04 on signet

Works as expected, the settings file gets created after the onboarding has finished.

settings.json:

{ "listen": true, "natpmp": true, "prune": 2861 }

Do we want the “Listen” and “natpmp” options to be true by default or was it just for testing this PR?

D33r-Gee avatar Dec 11 '23 18:12 D33r-Gee

tACK on Android armv7 everything worked as expected

The settings.json was created after the onboarding with the following values:

{ "prune": 2861 }

D33r-Gee avatar Dec 11 '23 20:12 D33r-Gee

Update 51df97d to 61f8e6c

  • Rebased with master
  • Initialized all uninitialized OptionsQmlModel properties

johnny9 avatar Mar 29 '24 03:03 johnny9

In branch johnny9:write_after_onboard:

  • If the user doesn't change anything setting.json file will look like:
{
    "dbcache": 16000,
    "listen": true,
    "natpmp": true,
    "prune": 1907,
    "server": true,
    "upnp": true
}
  • If the user disables any settings setting.json file will look like:
{
    "dbcache": 16000,
}

After the user makes any changes on the settings mentioned above next time the user starts bitcoin-qt up again it looks like the UI doesn't match the configuration file (settings.json), is this expected?

@pablomartin4btc I wasn't able to reproduce the output you were seeing during onboarding but I think I fixed the settings not applying at next startup with initializing the values in the constructor.

johnny9 avatar Mar 29 '24 14:03 johnny9

tACK https://github.com/bitcoin-core/gui-qml/commit/61f8e6c5fcb0c6c31a6283c3b7fdf6b9f82eba5e

On Ubuntu 22.04 and Android (armv7)

Works as expected, settings.json shows defaults:

{
    "listen": true,
    "prune": 1907
}

D33r-Gee avatar Mar 29 '24 16:03 D33r-Gee

dbcache setting is not persisted anymore ("dbcache": 16000,), is this correct?

It should only persist if you set it to a value other than nDefaultDbCache (450)

johnny9 avatar Apr 05 '24 11:04 johnny9

dbcache setting is not persisted anymore ("dbcache": 16000,), is this correct?

It should only persist if you set it to a value other than nDefaultDbCache (450)

Perfect, it works.

pablomartin4btc avatar Apr 05 '24 16:04 pablomartin4btc

Update from 61f8e6c to 4f557b0

  • rebased with main

johnny9 avatar Apr 10 '24 03:04 johnny9

Update from 4f557b0 to 9e56907

  • fixed build issue with previous rebase conflict (forgot to remove <<<<<<<)

johnny9 avatar Apr 10 '24 11:04 johnny9