Skip to content
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

Feature/lit 1815 pull node urls from chain in sdk instead of using hardcoded #245

Conversation

Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Nov 3, 2023

Usage

  • yarn gen:internal-dev

note: the above command is added to the yarn build pipeline

To review

Scripts

Output

Integrations

Additionally

Test

  1. Run yarn build
  2. Run yarn test:e2e:node --filter=test-connection-internal-dev
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://199.115.117.113:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://199.115.117.113:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://199.115.117.114:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://199.115.117.114:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://108.62.0.105:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://108.62.0.105:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://64.131.85.106:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://64.131.85.106:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://64.131.85.108:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://64.131.85.108:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://167.114.17.201:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://167.114.17.201:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://167.114.17.202:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://167.114.17.202:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://167.114.17.203:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://167.114.17.203:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://167.114.17.204:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://167.114.17.204:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] handshakeWithSgx http://167.114.17.205:443/web/handshake
[Lit-JS-SDK v3.0.16] sendCommandToNode with url http://167.114.17.205:443/web/handshake and data { clientPublicKey: 'test' }
[Lit-JS-SDK v3.0.16] ✅ [BLS SDK] wasmExports loaded. 12 functions available. Run 'wasmExports' in the console to see them.
[Lit-JS-SDK v3.0.16] ✅ [ECDSA SDK NodeJS] wasmECDSA loaded. 6 functions available. Run 'wasmECDSA' in the console to see them.
Something went wrong, internal id for request: lit_c043c891323d1. Please provide this identifier with any support requests. Error is request to http://199.115.117.113:443/web/handshake failed, reason: socket hang up - undefined
[Lit-JS-SDK v3.0.16] Error connecting to node  http://199.115.117.113:443 FetchError: request to http://199.115.117.113:443/web/handshake failed, reason: socket hang up

ericlewis and others added 3 commits November 17, 2023 14:07
A hack was added a year ago to suppress a webpack complaint. Other packages import crypto and don't seem to contain this hack. The metro bundler doesn't allow for conditional requires / substitutions, and as such causes react-native to fail loading the crypto library. This PR removes the hack.

I have not checked if webpack still complains but am hoping Chris can chime in.
DashKash54 and others added 12 commits November 17, 2023 22:18
* feat: Store blockhash from handshake + use it in SIWE

* feat: Pass blockhash instead of client in authSig functions

* refac: Cleanup

* feat: Client getter for blockhash + Manual tests

* refac: Remove comments

* refac: latest_blockhash -> latestBlockhash

* test: Display result of manual tests

* test: Node E2E test for creating authSig by fetching the blockhash from the client
…nto feature/lit-1815-pull-node-urls-from-chain-in-sdk-instead-of-using-hardcoded
@joshLong145 joshLong145 changed the base branch from feat/SDK-V3 to merge/main-into-v3 November 27, 2023 13:47
Josh Long and others added 6 commits November 27, 2023 08:48
…ad-of-using-hardcoded' of github.com:LIT-Protocol/js-sdk into feature/lit-1815-pull-node-urls-from-chain-in-sdk-instead-of-using-hardcoded
* it all works, yay

* gen contracts

* fix up tests

* remove unused thing

* add checkNodeAttestation boolean config option

* better attestation

* remove custom code to test on internaldev

* check ip and port against report

* check ip and port against attestation report

* remove unused params

* moving to get certs in js

* i built stuff

* it works

* fully working in nodejs and also browser

* fix valid cert test

* sync package version

* push readme changes

* add back attestation checking from bad merge

* add default for cayenne for attestation check

* add explicit attestation check disable in e2e tests

* fmt

---------

Co-authored-by: Josh Long <josh@litprotocol.com>
…nto feature/lit-1815-pull-node-urls-from-chain-in-sdk-instead-of-using-hardcoded
Base automatically changed from merge/main-into-v3 to master November 28, 2023 18:55
@joshLong145
Copy link

Thanks for this work. closing as the implementations have been migrated to: #272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.