Brave-browser: Sync v2

Created on 28 May 2020  Â·  4Comments  Â·  Source: brave/brave-browser

sync v1 will be completely removed and sync v2 will fully run on chromium sync engine with

  1. Sync Chain concept inherited from v1
  2. Brave specific auth flow

    1. Derive public/private key pair from seed

    2. Fetch timestamp from server

    3. Compose access token by timestamp, signed timestamp and public key

  3. Client encryption

    • Use bip39 keywords of seed as custom passphrase

    • Clients will derive encryption/decryption key based on the passphrase

  4. Migration from v1

    • Reset sync engine to clean state

    • Strip off meta info store in bookmarks used by v1

ODesktop QA Pass-Linux QA Pass-Win64 QA Pass-macOS QTest-Plan-Specified QYes featursync release-noteinclude

Most helpful comment

A list of all sync and/or fixed-with-sync-v2 issues in the 1.12.x milestone can be found here: https://github.com/brave/brave-browser/issues?q=is%3Aissue+milestone%3A%221.12.x+-+Release%22+label%3Afeature%2Fsync+is%3Aclosed

All 4 comments

@darkdh While the team is working on sync any chance someone could implement import/export from/to file for the Android Browser (https://github.com/brave/brave-browser/issues/6378) ? With Sync v1 (which i performed just now) I was finding 130-170 bookmarks were being synced every 80 seconds. This means if you have a lot of bookmarks it will take a long time for sync to complete.

This is probably the most important missing feature in Brave, good luck, can't wait to get rid of Soros sponsored Firefox.

Verification passed on

Brave | 1.12.107 Chromium: 84.0.4147.105 (Official Build) (64-bit)
-- | --
Revision | a6b12dfad6663f13a7e16e9a42a6a4975374096b-refs/branch-heads/4147@{#943}
OS | Ubuntu 18.04 LTS

Verified test plan from https://github.com/brave/qa-resources/issues/172
Verified test plan from https://github.com/brave/brave-core/pull/5294

Upgrade scenario
profile/Default/Bookmarks for Sync 1 on 1.11.101
image
Bookmarks file: Bookmarks_before.txt

After Upgrade - all the sync meta data is gone
image
Bookmarks file: Bookmarks_after.txt
Note: sync_metadata at the bottom of Bookmarks file is expected.

Verified that bookmarks are retained after upgrade
image

Verified that message is shown after upgrade
image

Verified able to create sync 2 chain. Encountered https://github.com/brave/brave-browser/issues/11116


Verification passed on

Brave | 1.12.112 Chromium: 84.0.4147.125 (Official Build) (64-bit)
-- | --
Revision | d0784639447f2e10d32ebaf9861092b20cfde286-refs/branch-heads/4147@{#1059}
OS | Windows 10 OS Version 1903 (Build 18362.959)




Upgrade Scenarios

Brave 1.11.x (Sync V1) synced is enabled and imported 1000 bookmarks - meta info is displayed in profile/Default/Bookmarks

image

Upgraded to 1.12.x (Sync V2) and verified that meta info is removed from profile/Default/Bookmarks and bookmarks retained on the upgraded profile
image

image

  • Verified that Brave sync upgrade message is shown after upgrade to 1.12.x
    image
  • Verified that sync chain which was set in V1 1.11.x is not retained but bookmarks retained
  • Verified that new sync chain can be created after the upgrade

Verification PASSED on macOS 10.15.6 x64 using the following build:

Brave | 1.12.112 Chromium: 84.0.4147.125 (Official Build) (64-bit)
-- | --
Revision | d0784639447f2e10d32ebaf9861092b20cfde286-refs/branch-heads/4147@{#1059}
OS | macOS Version 10.15.6 (Build 19G73)

Upgrade from v1 - Migration:

Example of profile/Default/Bookmarks on 1.11.104 CR: 84.0.4147.105 using sync v1:

{
   "checksum": "32072b965696b6131cef6fc026aae4ff",
   "roots": {
      "bookmark_bar": {
         "children": [ {
            "date_added": "13241726440621238",
            "guid": "4882bc77-dbe5-4974-8b41-44cb24d89336",
            "id": "235",
            "meta_info": {
               "object_id": "35, 120, 69, 141, 106, 48, 252, 101, 254, 88, 150, 148, 147, 54, 184, 234",
               "order": "1.0.1.1",
               "parent_object_id": "",
               "position_in_parent": "-1263695895318207126",
               "sync_timestamp": "1597252849244.033936",
               "version": "1"
            },
            "name": "Cryptocurrency Market Capitalizations | CoinMarketCap",
            "type": "url",
            "url": "https://coinmarketcap.com/"
         }, {
            "children": [ {
               "children": [ {
                  "date_added": "0",
                  "guid": "bd9443aa-539c-48b1-9c90-4c86c14632ae",
                  "id": "7",
                  "meta_info": {
                     "object_id": "53, 78, 177, 193, 173, 150, 185, 175, 105, 165, 197, 47, 237, 69, 34, 22",
                     "order": "1.0.1.2.1.1",
                     "parent_object_id": "161, 237, 12, 71, 63, 49, 236, 189, 80, 206, 227, 6, 33, 117, 155, 19",
                     "position_in_parent": "-5805588200882475148",
                     "sync_timestamp": "1597252849244.145020",
                     "version": "1"
                  },
                  "name": "KS Lessons – Stonemaier Games",
                  "type": "url",
                  "url": "https://stonemaiergames.com/kickstarter/lessons/"
               }, {
                  "date_added": "0",
                  "guid": "b51f023a-8ca9-43e2-b23c-511408309dbd",
                  "id": "8",
                  "meta_info": {
                     "object_id": "14, 133, 228, 149, 13, 201, 207, 9, 132, 66, 51, 196, 212, 138, 23, 135",
                     "order": "1.0.1.2.1.2",
                     "parent_object_id": "161, 237, 12, 71, 63, 49, 236, 189, 80, 206, 227, 6, 33, 117, 155, 19",
                     "position_in_parent": "-418993892014198229",
                     "sync_timestamp": "1597252849244.186035",
                     "version": "1"
                  },

Example of profile/Default/Bookmarks on 1.12.112 CR: 84.0.4147.125 using sync v2:

{
   "checksum": "32072b965696b6131cef6fc026aae4ff",
   "roots": {
      "bookmark_bar": {
         "children": [ {
            "date_added": "13241726440621238",
            "guid": "4882bc77-dbe5-4974-8b41-44cb24d89336",
            "id": "235",
            "name": "Cryptocurrency Market Capitalizations | CoinMarketCap",
            "type": "url",
            "url": "https://coinmarketcap.com/"
         }, {
            "children": [ {
               "children": [ {
                  "date_added": "0",
                  "guid": "bd9443aa-539c-48b1-9c90-4c86c14632ae",
                  "id": "7",
                  "name": "KS Lessons – Stonemaier Games",
                  "type": "url",
                  "url": "https://stonemaiergames.com/kickstarter/lessons/"
               }, {
                  "date_added": "0",
                  "guid": "b51f023a-8ca9-43e2-b23c-511408309dbd",
                  "id": "8",
                  "name": "Unbroken Monster Stories – Altema Games",
                  "type": "url",
                  "url": "http://altemagames.com/unbroken/unbroken-monster-stories/"
               },

Ensured that the correct infofar is being displayed once upgrading from Sync v1 to Sync v2 as per the following:

Screen Shot 2020-08-12 at 3 15 06 PM

A list of all sync and/or fixed-with-sync-v2 issues in the 1.12.x milestone can be found here: https://github.com/brave/brave-browser/issues?q=is%3Aissue+milestone%3A%221.12.x+-+Release%22+label%3Afeature%2Fsync+is%3Aclosed

Was this page helpful?
0 / 5 - 0 ratings