-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wallet]Run geth in an infura-like mode #1108
Conversation
d4261f0
to
e09e8dd
Compare
8544cbe
to
54a24c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! See comments below, mostly small stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally with yarn run dev
and build the integration sdk to test. Can import a wallet, exchange gold and dollars both directions, and send dollars.
Note that the transaction feed is not loading on integration, but it is not loading on master either and seems untouched in this PR.
0a6351d
to
ea2690c
Compare
Tested again. Can't get SMS verification to work but that's broken on the master as well. |
ea2690c
to
ef9d930
Compare
ef9d930
to
8fc4a75
Compare
* Remove private key from logging * Make infura setup work with https I was trying to use infura-like setup with `ws` (Web sockets). Since `ws` sends plain-text, it does not work in prouduction. We cannot use `wss` since it is not supported natively by geth - ethereum/go-ethereum#16423 Even K8s only supports https. To avoid this issue, I shifted to https. Subscriptions don't work with https, so, a crude polling mechanism to check for transaction confirmations. Also, in this commit, change the nonce count to include "pending" transactions, so that, multiple transactions can be sent without waiting for completion. * Handle nonce related to simultaneous transactions Handle the case when too many transactions are sent close to each other. Geth has `web3.eth.getTransactionCount(account, 'pending')` but even that only seems to work once the transactions have made to the transaction pool. Therefore, for transactions sent too close to each other, which is the case for SMS verification transactions, maintain a local nonce and ensure that new Nonce is equal or greater than local nonce. * Increment nonce before sending transaction Otherwise, the next transaction might not get the right nonce. * Fix some issues pointed by Rossy * Remove artifical wait
e4c57ac
to
f19a6fb
Compare
I don't know why |
f19a6fb
to
4d1497e
Compare
4d1497e
to
e104181
Compare
Codecov Report
@@ Coverage Diff @@
## master #1108 +/- ##
==========================================
- Coverage 66.83% 66.06% -0.77%
==========================================
Files 261 261
Lines 7492 7564 +72
Branches 503 437 -66
==========================================
- Hits 5007 4997 -10
- Misses 2387 2471 +84
+ Partials 98 96 -2
Continue to review full report at Codecov.
|
* master: [Protocol] Fix network id for alfajores in truffle configs (#1211) When resetting and upgrading a VM testnet, new tx-nodes are included in the new instance group (#771) Upload static VM testnet nodes, add stackdriver logging (#750) Revert "Make packages depend on git vesrion (not npm)" (#1201) Make packages depend on git vesrion (not npm) (#1192) [contractkit] Document methods (#1195) [ck] consistent send tx object in kit (#1191) Move docker images to use node v10 (#1183) [ContractKit]Fill more fields before web3 signing (#1133) [codecov]Fix codecov errors (#1147) [Wallet] Add support for address pasting in send input field (#1180) Fix verification pool validation (#1176) Improve QR Code scan ability (#1036) Add CLI commands around identity metadata (#1167) [wallet]Run geth in an infura-like mode (#1108) # Conflicts: # yarn.lock
* Implement new import wallet flow designs including empty wallet warning * Improve responsiveness of import wallet screen * More robust error handling for import saga * Add tests for import saga * Cleanup redundant web3 zerosync mocks introduced in #1108
Description
Run mobile app without running a local geth instance. Connect to
{testnet}-infura.celo-testnet.org
for example, https://integration-infura.celo-testnet.org`Tested
DEFAULT_TESTNET=integration
andDEFAULT_SYNC_MODE=-1
inpackages/mobile/.env
file.yarn run dev
.celotooljs account invite -e integration --phone <phone number>
to get SMS.Related issues