brave-browser: Calls to BAT-Native-Ledger are blocked when a reconciliation is in progress

Test plan

See https://github.com/brave/brave-core/pull/1800

Description

When a reconciliation is in progress, calls to bat-native-ledger are blocked and queued

Steps to Reproduce

  1. Open Brave, enable Rewards, and fund wallet
  2. Visit a verified publisher and have added to auto-contribute list
  3. Trigger an auto-contribution reconciliation
  4. Visit any site and open rewards panel

Additional: During contribution process, go to Rewards, auto-contribute settings and change some settings. Quit the browser (you may have to ‘Force Quit’/‘End Task’) and open publisher_state. None of the changes will have been recorded.

During contribution, sites won’t add to autocontribute list until after contribution is completed.

Actual result:

Only wallet summary is displayed because calls to get publisher related information are blocked. Leave panel open until reconciliation is complete and panel will work properly.

Expected result:

Publisher information should show in the panel

Steps to Reproduce

  1. Open Brave, enable Rewards, and fund wallet
  2. Visit a verified publisher and have added to auto-contribute list
  3. Trigger an auto-contribution reconciliation
  4. Go to Rewards and open backup wallet modal

Actual result:

Backup words do not appear.

Expected result:

Backup words should appear.

Reproduces how often:

easily

Brave version (brave://version info)

Brave 0.59.35 Chromium: 72.0.3626.81 (Official Build) (64-bit)
Revision ac8b982e05014492d1bd7d317628a4f22a97ffa0-refs/branch-heads/3626@{#796}
OS Mac OS X

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds? yes

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields?
  • Is the issue reproducible on the latest version of Chrome?

Additional Information

cc @NejcZdovc @bridiver @ryanml The STRs above are just a couple examples. It seems any call going into bat-native-ledger during reconciliation is queued up until after reconciliation process (right before voting). Seems to have a lesser impact if a non-autocontribute reconciliation is in progress but still somewhat noticeable.

Possibly related: #3345, #3039

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

Awesome job @yrliou. Works much better.

Verification passed on

Brave 0.61.45 Chromium: 73.0.3683.39 (Official Build) beta (64-bit)
Revision cc53b0e12fcaf42e4bab8d6c23bd4fb7aae99f6c-refs/branch-heads/3683@{#413}
OS Windows 7 Service Pack 1 Build 7601.24312

Used test plan from https://github.com/brave/brave-core/pull/1800 and https://github.com/brave/brave-browser/issues/3393#issuecomment-468101518 There is still small delay (less than a second), but other than that works OK. Tested on staging server.

Verification PASSED on macOS 10.14.3 x64 using the following build:

Brave 0.61.45 Chromium: 73.0.3683.39 (Official Build) beta(64-bit)
Revision cc53b0e12fcaf42e4bab8d6c23bd4fb7aae99f6c-refs/branch-heads/3683@{#413}
OS Mac OS X

Verification passed on

Brave 0.61.50 Chromium: 73.0.3683.67 (Official Build) (64-bit)
Revision a83fd4f3207ae83412d329a9ca1239dd1e068345-refs/branch-heads/3683@{#760}
OS Linux