Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

LIVE-2080 Use HTTPS instead of HTTP for solana validators URL #1902

Merged
merged 2 commits into from
Apr 21, 2022

Conversation

ghost
Copy link

@ghost ghost commented Apr 21, 2022

Context (issues, jira)

https://ledgerhq.atlassian.net/browse/LIVE-2080

Description / Usage

Endpoint to fetch Solana validators was incorrectly using HTTP instead of HTTPS.
It also had an unwanted extra / at the end.

Before

$ curl -v http://validators-solana.coin.ledger.com//api/v1/validators/mainnet.json
*   Trying 2606:4700::6812:194a:80...
* TCP_NODELAY set
* Connected to validators-solana.coin.ledger.com (2606:4700::6812:194a) port 80 (#0)
> GET //api/v1/validators/mainnet.json HTTP/1.1
> Host: validators-solana.coin.ledger.com
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 301 Moved Permanently
< Date: Thu, 21 Apr 2022 10:04:48 GMT
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: max-age=3600
< Expires: Thu, 21 Apr 2022 11:04:48 GMT
< Location: https://validators-solana.coin.ledger.com//api/v1/validators/mainnet.json
< Server: cloudflare
< CF-RAY: 6ff54c32ac7b999f-CDG
< 
* Connection #0 to host validators-solana.coin.ledger.com left intact

After

$ curl https://validators-solana.coin.ledger.com/api/v1/validators/mainnet.json
[{"network":"mainnet","account":"FaHURG5sdNdHrJAfbbqYt6ngG5C1XakpVPkp1LT8tSoz","name":null,"keybase_id":null,"www_url":null,"details":null,"avatar_url":null,"created_at":"2022-01-12 20:51:25 UTC","updated_at":"2022-03-21 10:20:59 UTC","admin_warning":null,"active_stake":60725112081069,"authorized_withdrawer_score":0,"commission":10,"data_center_concentration_score":0,"delinquent":false,"published_information_score":0,"root_distance_score":2,"security_report_score":0,"skipped_slot_score":2,"software_version":"1.9.16","software_version_score":2,"stake_concentration_score":0 ...

Expectations

  • Test coverage: The changes of this PR are covered by test. Unit test were added with mocks when depending on a backend/device.
  • No impact: The changes of this PR have ZERO impact on the userland. Meaning, we can use these changes without modifying LLD/LLM at all. It will be a "noop" and the maintainers will be able to bump it without changing anything.

@ghost ghost self-requested a review as a code owner April 21, 2022 10:06
@ghost ghost self-requested a review April 21, 2022 10:06
@ghost ghost self-requested a review as a code owner April 21, 2022 10:06
@vercel
Copy link

vercel bot commented Apr 21, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ledger-live-common ❌ Failed (Inspect) Apr 21, 2022 at 0:16AM (UTC)

@ghost ghost changed the base branch from develop to release/v22.0.2 April 21, 2022 10:13
@lambertkevin lambertkevin merged commit 77684ff into release/v22.0.2 Apr 21, 2022
@lambertkevin lambertkevin deleted the bugfix/LIVE-2080-solana-validators branch April 21, 2022 12:25
@lambertkevin lambertkevin mentioned this pull request Apr 21, 2022
lambertkevin added a commit that referenced this pull request Apr 21, 2022
* Use HTTPS instead of HTTP for Solana validators URL

Co-authored-by: lambertkevin <[email protected]>
lambertkevin added a commit that referenced this pull request Apr 22, 2022
* Use HTTPS instead of HTTP for Solana validators URL

Co-authored-by: lambertkevin <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants