question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refactor Brave ads command line arguments to use the `--rewards` command line arguments

See original GitHub issue

Brave ads command line arguments:

brave_ads_testing
brave_ads_production
brave_ads_staging
brave_ads_debug

i.e.

–rewards=staging=false (for production) –rewards=staging=true (for staging) –rewards=debug=true

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
LaurenWagscommented, Jul 8, 2022

Verified with

Brave | 1.41.80 Chromium: 103.0.5060.53 (Official Build) beta (x86_64)
-- | --
Revision | a1711811edd74ff1cf2150f36ffa3b0dae40b17f-refs/branch-heads/5060@{#853}
OS | macOS Version 12.4 (Build 21F79)

Verified flags listed in https://github.com/brave/brave-browser/issues/17526#issue-972696948.

--rewards=staging=true - PASSED

Confirmed when using --rewards=staging=true cmd line flag, the following calls were made to staging domains:

Parameters

[ REQUEST ]
> URL: https://api.rewards.bravesoftware.com/v1/parameters
> Method: GET

Issuers

[56160:259:0627/134455.728549:VERBOSE1:issuers.cc(66)] FetchIssuers
[56160:259:0627/134455.728607:VERBOSE2:issuers.cc(67)] GET /v1/issuers/
[56160:259:0627/134455.728632:VERBOSE6:issuers.cc(71)] URL Request:
  URL: https://static.ads.bravesoftware.com/v1/issuers/
  Method: kGet

Subdivision

[56160:259:0627/134455.730774:VERBOSE1:subdivision_targeting.cc(187)] FetchSubdivisionTargeting
[56160:259:0627/134455.730798:VERBOSE2:subdivision_targeting.cc(188)] GET /v1/getstate
[56160:259:0627/134455.730819:VERBOSE6:subdivision_targeting.cc(192)] URL Request:
  URL: https://geo.ads.bravesoftware.com/v1/getstate
  Method: kGet

Catalog

[56160:259:0627/134455.730961:VERBOSE1:catalog.cc(70)] Catalog
[56160:259:0627/134455.730985:VERBOSE2:catalog.cc(71)] GET /v9/catalog
[56160:259:0627/134455.731005:VERBOSE6:catalog.cc(77)] URL Request:
  URL: https://static.ads.bravesoftware.com/v9/catalog
  Method: kGet

Grants

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=4f570e3b-6beb-4613-ac52-47e3fd1089c8&platform=osx
> Method: GET

Create Confirmation

[56160:259:0627/135650.500667:VERBOSE1:redeem_unblinded_token.cc(50)] Redeem unblinded token
[56160:259:0627/135650.500976:VERBOSE1:redeem_unblinded_token.cc(71)] CreateConfirmation
[56160:259:0627/135650.501019:VERBOSE2:redeem_unblinded_token.cc(72)] POST /v2/confirmation/{confirmation_id}/{credential}
[56160:259:0627/135650.501047:VERBOSE6:redeem_unblinded_token.cc(76)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/760b542a-4af4-42........

Fetch Payment Token

[56160:259:0627/135650.921190:VERBOSE1:redeem_unblinded_token.cc(121)] FetchPaymentToken
[56160:259:0627/135650.921248:VERBOSE2:redeem_unblinded_token.cc(122)] GET /v2/confirmation/{confirmation_id}/paymentToken
[56160:259:0627/135650.921286:VERBOSE6:redeem_unblinded_token.cc(126)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/760b542a-4af4-4220-95c0-aa34af8a6ecd/paymentToken
  Method: kGet

Publisher Prefix List

[ REQUEST ]
> URL: https://rewards-stg.bravesoftware.com/publishers/prefix-list
> Method: GET

Get Signed Tokens

[58887:259:0627/164749.501087:VERBOSE1:refill_unblinded_tokens.cc(174)] GetSignedTokens
[58887:259:0627/164749.501238:VERBOSE2:refill_unblinded_tokens.cc(175)] GET /v2/confirmation/token/{payment_id}?nonce={nonce}
[58887:259:0627/164749.501303:VERBOSE6:refill_unblinded_tokens.cc(179)] URL Request:
  URL: https://mywallet.ads.bravesoftware.com/v2/confirmation/token/915fdd5a-27ac-4c0f-ad39-f4c17b24942c?nonce=ac487bfa-81c8-41fb-9807-0e331e0b757d
  Method: kGet
--rewards=staging=false - PASSED

Confirmed when using --rewards=staging=false cmd line flag, the following calls were made to production domains:

Parameters

[ REQUEST ]
> URL: https://api.rewards.brave.com/v1/parameters
> Method: GET

Issuers

[58550:259:0627/164052.937437:VERBOSE1:issuers.cc(66)] FetchIssuers
[58550:259:0627/164052.937490:VERBOSE2:issuers.cc(67)] GET /v1/issuers/
[58550:259:0627/164052.937520:VERBOSE6:issuers.cc(71)] URL Request:
  URL: https://static.ads.brave.com/v1/issuers/
  Method: kGet

Subdivision

[58550:259:0627/164052.940982:VERBOSE1:subdivision_targeting.cc(187)] FetchSubdivisionTargeting
[58550:259:0627/164052.941008:VERBOSE2:subdivision_targeting.cc(188)] GET /v1/getstate
[58550:259:0627/164052.941031:VERBOSE6:subdivision_targeting.cc(192)] URL Request:
  URL: https://geo.ads.brave.com/v1/getstate
  Method: kGet

Catalog

[58550:259:0627/164052.941176:VERBOSE1:catalog.cc(70)] Catalog
[58550:259:0627/164052.941203:VERBOSE2:catalog.cc(71)] GET /v9/catalog
[58550:259:0627/164052.941225:VERBOSE6:catalog.cc(77)] URL Request:
  URL: https://static.ads.brave.com/v9/catalog
  Method: kGet

Grants

[ REQUEST ]
> URL: https://grant.rewards.brave.com/v1/promotions?migrate=true&platform=osx
> Method: GET

Publisher Prefix List

[58550:259:0627/164047.426560:VERBOSE5:ledger_impl.cc(114)] 
[ REQUEST ]
> URL: https://rewards.brave.com/publishers/prefix-list
> Method: GET

Get Signed Tokens

[58550:259:0627/164056.831466:VERBOSE1:refill_unblinded_tokens.cc(174)] GetSignedTokens
[58550:259:0627/164056.831625:VERBOSE2:refill_unblinded_tokens.cc(175)] GET /v2/confirmation/token/{payment_id}?nonce={nonce}
[58550:259:0627/164056.831694:VERBOSE6:refill_unblinded_tokens.cc(179)] URL Request:
  URL: https://mywallet.ads.brave.com/v2/confirmation/token/f4cac19b-5c28-4235-aaa4-7b377baa269c?nonce=c2a0d0a9-2a7b-4e09-96fc-186a66f41d9a
  Method: kGet

Create Confirmation

[58550:259:0627/164629.564879:VERBOSE1:redeem_unblinded_token.cc(71)] CreateConfirmation
[58550:259:0627/164629.564926:VERBOSE2:redeem_unblinded_token.cc(72)] POST /v2/confirmation/{confirmation_id}/{credential}
[58550:259:0627/164629.564956:VERBOSE6:redeem_unblinded_token.cc(76)] URL Request:
  URL: https://anonymous.ads.brave.com/v2/confirmation/7d0c152c-f52d-46b8-8756-1c711fb19120/eyJwYXlsb2.....

Fetch Payment Token

[58550:259:0627/164629.682475:VERBOSE1:redeem_unblinded_token.cc(121)] FetchPaymentToken
[58550:259:0627/164629.682513:VERBOSE2:redeem_unblinded_token.cc(122)] GET /v2/confirmation/{confirmation_id}/paymentToken
[58550:259:0627/164629.682548:VERBOSE6:redeem_unblinded_token.cc(126)] URL Request:
  URL: https://anonymous.ads.brave.com/v2/confirmation/7d0c152c-f52d-46b8-8756-1c711fb19120/paymentToken
  Method: kGet
--rewards=debug=true - PASSED

Verified items listed in https://github.com/brave/brave-browser/issues/17526#issuecomment-1164764655. Note all times listed are approximate due to +/- jitter.

  • Confirmed next payment token redemption (cash-out) reduced to ~25 minutes
[59237:259:0627/165721.354973:VERBOSE1:redeem_unblinded_payment_tokens.cc(70)] Redeem unblinded payment tokens in 0 hours, 35 minutes, 43 seconds at 17:33:04.353
[59237:259:0627/173304.433526:VERBOSE1:redeem_unblinded_payment_tokens.cc(78)] RedeemUnblindedPaymentTokens
[59237:259:0627/173304.433692:VERBOSE2:redeem_unblinded_payment_tokens.cc(89)] PUT /v2/confirmation/payment/{payment_id}
[59237:259:0627/173304.433776:VERBOSE6:redeem_unblinded_payment_tokens.cc(104)] URL Request:
  URL: https://mywallet.ads.bravesoftware.com/v2/confirmation/payment/111adee7-92cf-44ff-af7c-781e65fe12dc
  Content: {"odyssey":"host","payload":"{\"paymentId\":\"111adee7-92cf-44ff-af7c-781e65fe12dc\"}","paymentCredentials":[{"confirmationType":"view","credential":{"signature":"Dcetq0bBd6dpw3LjOXgwukeyVFpc5ZnoVaFElKa/FO1P4PvtUuNOUNZDVb6kUOSPLJxYBQJDzTLVbQUzJoinTA==","t":"TfNxUyI0fGc4gcR1cSLan58r0Sy3xHzFfWZqJMEmtZmqF77Bq2XrYvtsJSHwobgky19AenKgNINGXM7rUeFzEA=="},"publicKey":"/ErFCyyTs6tQ+VCve8GsGcNZ4dZhYKIBisLZIbR+kR4="},{"confirmationType":"view","credential":{"signature":"omKXt8RImBhnpquFlH56opikrn1XW33IYXiMxnvxH0zwy5+t4Fz7pnuvSlDpXqOlsgFtZ1XALyILu/5Zc5s80A==","t":"v2wF4XRvKCSmUb1DZPz7pr/BFoJ2drHblF/qoEK9I/7swW4LPBX/oGg2G8ZvA5wgTQcp5VkJInrfmwd+o6JHAg=="},"publicKey":"/ErFCyyTs6tQ+VCve8GsGcNZ4dZhYKIBisLZIbR+kR4="},{"confirmationType":"dismiss","credential":{"signature":"rwQAasYvc7NLhWGMYJi7TgojxaIiHMC5rSgygO/hLWxNMtMHxp42o4d5v19Jgnt4FQg0nMAPGipTsGCuBmm6PQ==","t":"v8d3bhGg4uAmcebs/djUWOrhQqeWzMzOMez4PdGrMphvzAoShQ8NeKG8txaNSjvUjCw/QKKVrodac+FcVFfKlQ=="},"publicKey":"hPG3j7g7Vb6y635dinW8AVX5Izkh22hXfLXzPpnRRw8="},{"confirmationType":"view","credential":{"signature":"WsvOBTmXYrzAJxUrazbjvpSFPh3kln2f0N98EE3iaF2KY9meuoP41GvbvEo89KgkrAPpvixWz70GmQMZNrCcFQ==","t":"CIGroVdrZ84vvqxbFKQZrKmk1+vRkJ+gwyUNdDORk1prwKnmKvopJNyVJXHpuKA3Y7yI4SpTkaP9A7Ug5fuwVQ=="},"publicKey":"/ErFCyyTs6tQ+VCve8GsGcNZ4dZhYKIBisLZIbR+kR4="},{"confirmationType":"conversion","credential":{"signature":"gANopIW+hceBuG7oXeTm3RFHkdc4urpf4iLawr51QiODIXogHvtjLctvQz78XoO5CBtKe0iWKePPNunUbOZbPg==","t":"Zz0ifgGfOcmIdV5yFzAnpF0lXoih08wnPSBBbQ9ztIOFoBQesiCbVkRPrggFZhpOkR60nJoyyCT6pfCsQBARuw=="},"publicKey":"hPG3j7g7Vb6y635dinW8AVX5Izkh22hXfLXzPpnRRw8="}],"platform":"macos","totals":[{"ad_format":"ad_notification","conversion":"1","dismiss":"1","view":"2"},{"ad_format":"inline_content_ad","view":"1"}]}
  Content Type: application/json
  Method: kPut
[59237:259:0627/173304.433878:VERBOSE7:redeem_unblinded_payment_tokens.cc(105)]   Headers:
accept: application/json
[59237:259:0627/173304.845598:VERBOSE1:redeem_unblinded_payment_tokens.cc(117)] OnRedeemUnblindedPaymentTokens
[59237:259:0627/173304.845734:VERBOSE6:redeem_unblinded_payment_tokens.cc(119)] URL Response:
  URL: https://mywallet.ads.bravesoftware.com/v2/confirmation/payment/111adee7-92cf-44ff-af7c-781e65fe12dc
  Response Status Code: 200
  Response: {"message":"Ok","status":200}
[59237:259:0627/173304.845803:VERBOSE7:redeem_unblinded_payment_tokens.cc(120)]   Headers:
[59237:259:0627/173304.845877:VERBOSE9:confirmation_state_manager.cc(125)] Saving confirmations state
[59237:259:0627/173304.846444:VERBOSE1:account.cc(278)] Successfully redeemed unblinded payment tokens
[59237:259:0627/173304.847692:VERBOSE1:redeem_unblinded_payment_tokens.cc(70)] Redeem unblinded payment tokens in 0 hours, 19 minutes, 12 seconds at 17:52:16.846
  • Confirmed catalog fetched after ~15 minutes instead of ping defined in the v9/catalog endpoint
[59237:259:0627/165623.501597:VERBOSE1:catalog.cc(150)] Fetch catalog in 0 hours, 7 minutes, 12 seconds at 17:03:35.500
[59237:259:0627/170337.557267:VERBOSE1:catalog.cc(150)] Fetch catalog in 0 hours, 0 minutes, 33 seconds at 17:04:10.556
[59237:259:0627/170410.583727:VERBOSE1:catalog.cc(150)] Fetch catalog in 0 hours, 8 minutes, 28 seconds at 17:12:38.582
  • Confirmed conversions are submitted to server after ~10 minutes instead of ~1 day
[59237:259:0627/170947.433022:VERBOSE1:conversions.cc(341)] Conversion for ad_notification with campaign id 8fb041ed-e2da-4463-be1f-2b3d39666f6f, creative set id ea287f01-eec5-4a7d-ae08-e7e1814e9301, creative instance id e9f5984f-5c18-4a9f-8096-425af4252f16 and advertiser id 93130af3-2def-4ecb-b836-b3772e73b3c9
[59237:259:0627/170947.433097:VERBOSE1:conversions.cc(328)] There was a conversion match
[59237:259:0627/170947.434027:VERBOSE6:conversions.cc(391)] Successfully logged conversion event
[59237:259:0627/170947.434857:VERBOSE3:conversions.cc(415)] Successfully appended conversion to queue
[59237:259:0627/170947.435637:VERBOSE1:conversions.cc(558)] Convert ad_notification with campaign id 8fb041ed-e2da-4463-be1f-2b3d39666f6f, creative set id ea287f01-eec5-4a7d-ae08-e7e1814e9301, creative instance id e9f5984f-5c18-4a9f-8096-425af4252f16 and advertiser id 93130af3-2def-4ecb-b836-b3772e73b3c9 in 0 hours, 12 minutes, 7 seconds at 17:21:54.432
[59237:259:0627/172154.459560:VERBOSE1:conversions.cc(473)] Successfully converted ad_notification with campaign id 8fb041ed-e2da-4463-be1f-2b3d39666f6f, creative set id ea287f01-eec5-4a7d-ae08-e7e1814e9301, creative instance id e9f5984f-5c18-4a9f-8096-425af4252f16 and advertiser id 93130af3-2def-4ecb-b836-b3772e73b3c9 on Monday, June 27, 2022 at 5:21:54 PM
[59237:259:0627/172154.462505:VERBOSE3:ads_impl.cc(804)] Successfully processed deposit for ad_notification with creative instance id e9f5984f-5c18-4a9f-8096-425af4252f16 and conversion valued at 0
[59237:259:0627/172154.462690:VERBOSE1:confirmations.cc(61)] Confirming conversion for ad_notification with transaction id 9569c2bb-caff-41f1-aa28-5ab296da1d06 and creative instance id e9f5984f-5c18-4a9f-8096-425af4252f16
[59237:259:0627/172154.462801:VERBOSE1:conversions.cc(241)] Conversion queue is empty
[59237:259:0627/172154.464386:VERBOSE9:confirmation_state_manager.cc(125)] Saving confirmations state
[59237:259:0627/172154.465134:VERBOSE1:redeem_unblinded_token.cc(50)] Redeem unblinded token
[59237:259:0627/172154.465806:VERBOSE1:redeem_unblinded_token.cc(71)] CreateConfirmation
[59237:259:0627/172154.465878:VERBOSE2:redeem_unblinded_token.cc(72)] POST /v2/confirmation/{confirmation_id}/{credential}
[59237:259:0627/172154.465922:VERBOSE6:redeem_unblinded_token.cc(76)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/9f772b44-8fa7-42b5-8cb3-0539c8dc379b/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlbnNcIjpbXCJLSWZCOE82NENiUmEvYVlRK3QxRTZ5eEVMWjNhQVRDZ0xRWlhuUnUxT3hnPVwiXSxcImJ1aWxkQ2hhbm5lbFwiOlwiYmV0YVwiLFwiY2F0YWxvZ1wiOlt7XCJpZFwiOlwiZGIxZDVjZWFmZWE5N2U4NjEzZGY4NjI5OGUzZTYyNTJhOTBkY2MwMFwifV0sXCJjcmVhdGVkQXRUaW1lc3RhbXBcIjpcIjE2MDEtMDEtMDFUMDE6MDA6MDAuMDAwWlwiLFwiY3JlYXRpdmVJbnN0YW5jZUlkXCI6XCJlOWY1OTg0Zi01YzE4LTRhOWYtODA5Ni00MjVhZjQyNTJmMTZcIixcIm9keXNzZXlcIjpcImhvc3RcIixcInBheWxvYWRcIjp7fSxcInBsYXRmb3JtXCI6XCJtYWNvc1wiLFwicHVibGljS2V5XCI6XCJtcC83OWU2WmFtZ3gzdzJOd1B6ZlY5V0puY0dZNDJweFIwRGpUL1JhZ0dJPVwiLFwic3R1ZGllc1wiOltdLFwic3lzdGVtVGltZXN0YW1wXCI6XCIyMDIyLTA2LTI3VDIxOjAwOjAwLjAwMFpcIixcInR5cGVcIjpcImNvbnZlcnNpb25cIixcInZlcnNpb25OdW1iZXJcIjpcIjEwMy4wLjUwNjAuNTNcIn0iLCJzaWduYXR1cmUiOiJJL2JINGdOdStqamxUZnd3dVB5RnJCZXFXRHM4MXBpR3ZBRlRadVUxdDdIN3dMbWVKbU40WmtwOUZJN3NyWXdVRUF4TVNFeUY4U0VoNEpKdDZxelY3QT09IiwidCI6IlpGRVNCcFd2SzA5UDZPL2FiOGFQa1BXTzh0eUk5YTFRMk1Ga0RyTCt3SmNaeVR2VEZKS1M2WldqYTM5WGpPdDlhN0p2MkJOMGNkUGFMQlJMeXpsS25RPT0ifQ==
  Content: {"blindedPaymentTokens":["KIfB8O64CbRa/aYQ+t1E6yxELZ3aATCgLQZXnRu1Oxg="],"buildChannel":"beta","catalog":[{"id":"db1d5ceafea97e8613df86298e3e6252a90dcc00"}],"createdAtTimestamp":"1601-01-01T01:00:00.000Z","creativeInstanceId":"e9f5984f-5c18-4a9f-8096-425af4252f16","odyssey":"host","payload":{},"platform":"macos","publicKey":"mp/79e6Zamgx3w2NwPzfV9WJncGY42pxR0DjT/RagGI=","studies":[],"systemTimestamp":"2022-06-27T21:00:00.000Z","type":"conversion","versionNumber":"103.0.5060.53"}
  Content Type: application/json
  Method: kPost
[59237:259:0627/172154.466025:VERBOSE7:redeem_unblinded_token.cc(77)]   Headers:
accept: application/json
[59237:259:0627/172154.487095:VERBOSE9:confirmation_state_manager.cc(138)] Successfully saved confirmations state
[59237:259:0627/172155.130277:VERBOSE1:redeem_unblinded_token.cc(87)] OnCreateConfirmation
[59237:259:0627/172155.130409:VERBOSE6:redeem_unblinded_token.cc(89)] URL Response:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/9f772b44-8fa7-42b5-8cb3-0539c8dc379b/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlbnNcIjpbXCJLSWZCOE82NENiUmEvYVlRK3QxRTZ5eEVMWjNhQVRDZ0xRWlhuUnUxT3hnPVwiXSxcImJ1aWxkQ2hhbm5lbFwiOlwiYmV0YVwiLFwiY2F0YWxvZ1wiOlt7XCJpZFwiOlwiZGIxZDVjZWFmZWE5N2U4NjEzZGY4NjI5OGUzZTYyNTJhOTBkY2MwMFwifV0sXCJjcmVhdGVkQXRUaW1lc3RhbXBcIjpcIjE2MDEtMDEtMDFUMDE6MDA6MDAuMDAwWlwiLFwiY3JlYXRpdmVJbnN0YW5jZUlkXCI6XCJlOWY1OTg0Zi01YzE4LTRhOWYtODA5Ni00MjVhZjQyNTJmMTZcIixcIm9keXNzZXlcIjpcImhvc3RcIixcInBheWxvYWRcIjp7fSxcInBsYXRmb3JtXCI6XCJtYWNvc1wiLFwicHVibGljS2V5XCI6XCJtcC83OWU2WmFtZ3gzdzJOd1B6ZlY5V0puY0dZNDJweFIwRGpUL1JhZ0dJPVwiLFwic3R1ZGllc1wiOltdLFwic3lzdGVtVGltZXN0YW1wXCI6XCIyMDIyLTA2LTI3VDIxOjAwOjAwLjAwMFpcIixcInR5cGVcIjpcImNvbnZlcnNpb25cIixcInZlcnNpb25OdW1iZXJcIjpcIjEwMy4wLjUwNjAuNTNcIn0iLCJzaWduYXR1cmUiOiJJL2JINGdOdStqamxUZnd3dVB5RnJCZXFXRHM4MXBpR3ZBRlRadVUxdDdIN3dMbWVKbU40WmtwOUZJN3NyWXdVRUF4TVNFeUY4U0VoNEpKdDZxelY3QT09IiwidCI6IlpGRVNCcFd2SzA5UDZPL2FiOGFQa1BXTzh0eUk5YTFRMk1Ga0RyTCt3SmNaeVR2VEZKS1M2WldqYTM5WGpPdDlhN0p2MkJOMGNkUGFMQlJMeXpsS25RPT0ifQ==
  Response Status Code: 201
  Response: {"id":"9f772b44-8fa7-42b5-8cb3-0539c8dc379b","payload":{},"createdAt":"2022-06-27T21:21:55.117Z","type":"conversion","modifiedAt":"2022-06-27T21:21:55.117Z","creativeInstanceId":"e9f5984f-5c18-4a9f-8096-425af4252f16"}
x-served-by: cache-ewr18127-EWR
[59237:259:0627/172155.130738:VERBOSE1:redeem_unblinded_token.cc(121)] FetchPaymentToken
[59237:259:0627/172155.130795:VERBOSE2:redeem_unblinded_token.cc(122)] GET /v2/confirmation/{confirmation_id}/paymentToken
[59237:259:0627/172155.130849:VERBOSE6:redeem_unblinded_token.cc(126)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/9f772b44-8fa7-42b5-8cb3-0539c8dc379b/paymentToken
  Method: kGet
[59237:259:0627/172155.131129:VERBOSE7:redeem_unblinded_token.cc(127)]   Headers:

[59237:259:0627/172155.428032:VERBOSE1:redeem_unblinded_token.cc(137)] OnFetchPaymentToken
[59237:259:0627/172155.428159:VERBOSE6:redeem_unblinded_token.cc(139)] URL Response:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/9f772b44-8fa7-42b5-8cb3-0539c8dc379b/paymentToken
  Response Status Code: 202
  Response: {"error":"Payment Tokens are not ready","statusCode":202}
[59237:259:0627/172155.428205:VERBOSE7:redeem_unblinded_token.cc(140)]   Headers:
[59237:259:0627/172155.428288:VERBOSE1:redeem_unblinded_token.cc(157)] Payment token is not ready
[59237:259:0627/172155.428330:VERBOSE1:confirmations.cc(323)] Failed to redeem unblinded token for ad_notification with confirmation id 9f772b44-8fa7-42b5-8cb3-0539c8dc379b, transaction id 9569c2bb-caff-41f1-aa28-5ab296da1d06, creative instance id e9f5984f-5c18-4a9f-8096-425af4252f16 and conversion
[59237:259:0627/172155.428368:VERBOSE9:confirmation_state_manager.cc(125)] Saving confirmations state
[59237:259:0627/172155.428848:VERBOSE1:confirmations.cc(205)] Added conversion confirmation for ad_notification with id 9f772b44-8fa7-42b5-8cb3-0539c8dc379b, transaction id9569c2bb-caff-41f1-aa28-5ab296da1d06 and creative instance id e9f5984f-5c18-4a9f-8096-425af4252f16 to the confirmations queue
[59237:259:0627/172155.429624:VERBOSE1:refill_unblinded_tokens.cc(92)] No need to refill unblinded tokens as we already have 45 unblinded tokens which is above the minimum threshold of 20
[59237:259:0627/172155.430704:VERBOSE1:confirmations.cc(100)] Retry sending failed confirmations in 0 hours, 0 minutes, 8 seconds at 17:22:03.429
[59237:259:0627/172155.451630:VERBOSE9:confirmation_state_manager.cc(138)] Successfully saved confirmations state
[59237:259:0627/172203.440742:VERBOSE1:confirmations.cc(229)] Removed conversion confirmation for ad_notification with id 9f772b44-8fa7-42b5-8cb3-0539c8dc379b, transaction id 9569c2bb-caff-41f1-aa28-5ab296da1d06 and creative instance id e9f5984f-5c18-4a9f-8096-425af4252f16 from the confirmations queue
[59237:259:0627/172203.440906:VERBOSE9:confirmation_state_manager.cc(125)] Saving confirmations state
[59237:259:0627/172203.441611:VERBOSE1:redeem_unblinded_token.cc(50)] Redeem unblinded token
[59237:259:0627/172203.442342:VERBOSE1:redeem_unblinded_token.cc(121)] FetchPaymentToken
[59237:259:0627/172203.442416:VERBOSE2:redeem_unblinded_token.cc(122)] GET /v2/confirmation/{confirmation_id}/paymentToken
[59237:259:0627/172203.442458:VERBOSE6:redeem_unblinded_token.cc(126)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/9f772b44-8fa7-42b5-8cb3-0539c8dc379b/paymentToken
  Method: kGet
[59237:259:0627/172203.442496:VERBOSE7:redeem_unblinded_token.cc(127)]   Headers:

[59237:259:0627/172203.464925:VERBOSE9:confirmation_state_manager.cc(138)] Successfully saved confirmations state
[59237:259:0627/172203.770556:VERBOSE1:redeem_unblinded_token.cc(137)] OnFetchPaymentToken
[59237:259:0627/172203.770647:VERBOSE6:redeem_unblinded_token.cc(139)] URL Response:
  URL: https://anonymous.ads.bravesoftware.com/v2/confirmation/9f772b44-8fa7-42b5-8cb3-0539c8dc379b/paymentToken
  Response Status Code: 200
  Response: {"id":"9f772b44-8fa7-42b5-8cb3-0539c8dc379b","createdAt":"2022-06-27T21:21:55.117Z","type":"conversion","modifiedAt":"2022-06-27T21:22:00.277Z","creativeInstanceId":"e9f5984f-5c18-4a9f-8096-425af4252f16","paymentToken":{"publicKey":"hPG3j7g7Vb6y635dinW8AVX5Izkh22hXfLXzPpnRRw8=","batchProof":"Ub6u+NZ8tz86lEKFauDIdwETA27rcFUQwvgpDSfniAhGFOHfVaEFF9evE/tYKQ3mQR9gw6Wf7rR8g9XPGS19AQ==","signedTokens":["tFZo7SP6V8/c4ZGwyISbiTb++ZdX7P1bHzBArQVPdjY="]}}
[59237:259:0627/172203.771769:VERBOSE9:confirmation_state_manager.cc(125)] Saving confirmations state
[59237:259:0627/172203.773476:VERBOSE1:confirmations.cc(303)] Successfully redeemed unblinded token for ad_notification with confirmation id 9f772b44-8fa7-42b5-8cb3-0539c8dc379b, transaction id 9569c2bb-caff-41f1-aa28-5ab296da1d06, creative instance id e9f5984f-5c18-4a9f-8096-425af4252f16 and conversion. You now have 5 unblinded payment tokens which will be redeemed in 0 hours, 11 minutes, 1 second at 17:33:04.353
  • Confirmed v1/GetState endpoint fetched every ~5 min
[59237:259:0627/165854.522742:VERBOSE1:subdivision_targeting.cc(283)] Fetch ads subdivision target in 0 hours, 4 minutes, 31 seconds at 17:03:25.522
[59237:259:0627/170325.588197:VERBOSE1:subdivision_targeting.cc(283)] Fetch ads subdivision target in 0 hours, 2 minutes, 57 seconds at 17:06:22.587
[59237:259:0627/170622.610743:VERBOSE1:subdivision_targeting.cc(283)] Fetch ads subdivision target in 0 hours, 1 minute, 11 seconds at 17:07:33.609
2reactions
tmanceycommented, Jun 23, 2022

@LaurenWags

Ads

  • Reduces next payment token redemption (cash-out) from ~1 day to ~25 minutes
  • Fetches catalog after ~15 minutes instead of ping defined in the v9/catalog endpoint
  • Conversions are submitted to server after ~10 minutes instead of ~1 day
  • v1/GetState endpoint is fetched every ~5 minutes instead of every ~1 day

I do not see any uses for ledger. cc @emerick

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implement about:config · Issue #1124 · brave/brave-browser
Refactor Brave ads command line arguments to use the --rewards ... Fix command line Brave Ads permission rule - Follow up to 23336...
Read more >
Brave Ads FAQ - Brave Help Center
Brave does not reward users for clicking on the notifications. Brave's position is that users should only click on ads that they have...
Read more >
Brave Previews Opt-in Ads in Desktop Browser Developer ...
Today we're previewing our new digital advertising model in Brave's Developer channel. Developers and testers using the latest desktop ...
Read more >
Buttons in Brave Rewards Settings Not Working
Go to Rewards settings page · Press cmd + option + i · Click the Console tab in the dev tools window that...
Read more >
Brave's Opt-In Private Ad Platform Enters Second Phase with ...
Today, the Brave Ads Developer Channel Preview advances from phase one ... and messaging to encourage tipping options through Brave Rewards.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found