Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Improve verified-caching #12272

Closed
mrose17 opened this issue Dec 13, 2017 · 2 comments · Fixed by #12287
Closed

Improve verified-caching #12272

mrose17 opened this issue Dec 13, 2017 · 2 comments · Fixed by #12287

Comments

@mrose17
Copy link
Member

mrose17 commented Dec 13, 2017

Test plan

#12287 (comment)


The present algorithm is:

  1. Keep a cache of sites mapping to verified status & timestamp
  2. On startup, go to the ledger server to determine the latest timestamp
  3. When visiting a site, consult the cache: if the entry is present and the timestamp >= the latest timestamp, use that verified status
  4. Otherwise, go to the ledger server to get the verified status for the site and cache with timestamp

Proposed changes:

  1. In addition to "on startup, get the latest timestamp at regular intervals after startup (I suggest every hour)
  2. When the user switches to about:preferences#payments, get the latest timestamp -- also make sure that if something changes for a site being listed on that page, that the page gets updated to reflect the current verified status
@NejcZdovc
Copy link
Contributor

pulling this one into hotfix 7, because we are receiving quite a lot of questions and comments why verified status is not displayed

NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Dec 18, 2017
Resolves brave#12272

Auditors:

Test Plan:
@bsclifton bsclifton modified the milestones: 0.19.x Hotfix 9, 0.21.x (Developer Channel) Dec 20, 2017
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Dec 22, 2017
Resolves brave#12272

Auditors:

Test Plan:
@NejcZdovc NejcZdovc modified the milestones: 0.21.x (Developer Channel), 0.20.x (Beta Channel) Jan 2, 2018
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Jan 3, 2018
Resolves brave#12272

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Jan 3, 2018
Resolves brave#12272

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Jan 3, 2018
Resolves brave#12272

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Jan 4, 2018
Resolves brave#12272

Auditors:

Test Plan:
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Jan 5, 2018
Resolves brave#12272

Auditors:

Test Plan:
bsclifton pushed a commit to NejcZdovc/browser-laptop that referenced this issue Jan 8, 2018
Resolves brave#12272

Auditors:

Test Plan:
bsclifton added a commit that referenced this issue Jan 8, 2018
bsclifton added a commit that referenced this issue Jan 8, 2018
bsclifton added a commit that referenced this issue Jan 8, 2018
@srirambv
Copy link
Collaborator

srirambv commented Jan 9, 2018

Verified time stamp on Windows

[ response for GET https://mercury-proxy.privateinternetaccess.com/v3/publisher/timestamp ]
>>> HTTP/1.1 200
>>> accept-ranges: bytes
>>> cache-control: private
>>> connection: keep-alive
>>> content-length: 35
>>> content-type: application/json; charset=utf-8
>>> date: Tue, 09 Jan 2018 10:03:28 GMT
>>> server: Cowboy
>>> strict-transport-security: max-age=31536000
>>> vary: accept-encoding
>>> via: 1.1 vegur
>>> x-rate-limit-limit: 9007199254740991
>>> x-rate-limit-remaining: 9007199254740990
>>> x-rate-limit-reset: 1515492209
>>>
>>> {"timestamp":"6508987018276503553"}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.