[engine] Onchain boost #2475
Ticket(s) / Related Merge Requests
- Issue card: #2475 (closed)
- Front front!2142 (merged)
- Helm helm-charts!113 (merged)
Summary of Changes
Onchain boost flow for new boost system.
Testing Considerations
Make an onchain boost
Get the GUID of the boost from Vitess (hint - look it up by entity guid) - while your there, check the boost state is 8
Run source /vault/secrets/env && php cli.php Blockchain triggerBoostEvent --eventType='resolve' --boostGuid='1450196812500570122'
(can repeat these steps and test the fail event type sticks).
Check in Vitess the boosts state is now 1
CURRENTLY NOT WORKING ON SANDBOX
The below steps are to test approve and reject logic but the requests are coming back as 404 - they work perfectly fine locally - I believe that they may be getting filtered out by the egress proxy.
- login as sandbox admin in postman, remember to grab /set the xsrf token
- In postman, hit the
/api/v3/boosts/1449063289186160648/approve
endpoint interpolating your boost GUID - Repeat for reject.
- On accept, tokens should appear in the goerli depoyers wallet (currently set at the approver 0x3a83bdab9F33c725B0A2b685E1b9abaB05F32e83) - on reject they should come back to you - check this on Goerli etherscan.
Controlled by https://growthbook.minds.com/features/engine-2475-onchain-boosts
Deployment Considerations
If boostWallet
isn't being set somewhere I'm missing, it may need adding to with whatever wallet we want to use - else there may be issues approving and rejecting onchain boosts.
https://gitlab.com/minds/infrastructure/minds-terraform/-/blob/master/legacy/minds/eks-minds.tf#L911
Charts are intended to only effect the sandbox env, this should use the existing mainnet addresses / wallets and RPC urls on production. There may be an issue with sandbox egress though.
Regression Scope
Boost V3 onchain boosting - should not impact legacy boost BARRING that the runner that handles reading incoming onchain transactions has been changed, which isn't operational on sandboxes anyway - hence I made the Blockchain cli endpoint triggerBoostEvent
so that you can manually fire these events.
Platform Affected (web, mobile, etc)
Web
Developer Testing Completed
Manual, unit - E2E with onchain is out of scope.
Screenshots / Screen Recording
Sandbox
Local Flow Accept
simplescreenrecorder-2022-12-16_11.32.00
Receipt tx where approver receives token payment (0x912de7ca9e2abd1f313ec338d378dadc5679629faa24e740a1c7f12ab99a2f54):
Local Flow Reject
simplescreenrecorder-2022-12-16_11.42.31
Receipt tx where ORIGINAL SENDER receives their token payment BACK (due to rejection) (0x6ba9dfd07468bcfd5df02702feba8baebbe452efe2684032a0db835017480723) - note this skips the submission steps because they're the exact same as above:
Local Flow TX Failure
simplescreenrecorder-2022-12-16_11.47.08
Does this impact
-
Localization -
Dark/light mode -
Guest mode
Definition of Done Checklist
-
The Acceptance Criteria has been met -
Code is tested: Testing includes unit/spec, E2E/automated and manual testing -
Merge requests description has been filled out