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/3404 datil dev support #515

Merged
merged 70 commits into from
Jul 8, 2024
Merged

Conversation

Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Jun 27, 2024

Changelog

🚀 Features

  • (tinny) Introduce chunked parallel execution
  • (tinny) LIT_RPC enum
  • *(tinny)*Add relayer tests
  • (sdk) Add datil relayer support

🐛 Bug Fixes

  • Import
  • (testing) Correct test result reporting in runTestsParallel
  • (tinny) Temp disabled wallet switching when minting pkp
  • (tinny) Temp disabled switchWallet when minting capacity delegation authsig
  • (tinny) Simplify and centralize RPC URL handling

📚 Documentation

  • Update local-test README

⚙️ Miscellaneous Tasks

  • Fix testLIT typo

Dev

  • (test) Add env file for local tests and dotenv
  • (test) Add .env
  • (test) Add lock file
  • Add shiva types defs
  • (shiva) Update shiva client

Description

Installation

yarn add @lit-protocol/lit-node-client@datil-dev

or

yarn add @lit-protocol/lit-node-client@6.1.0-beta.0

Using the datil-dev network

const litNodeClient = new LitNodeClient({
  litNetwork: "datil-dev",
});

await litNodeClient.connect();

Test command:

❗️❗️Note: I'm failing to run the tests in parallel right now, but they work when running individually. I added a CHUNK_SIZE feature which would run parallel execution in chunks and I thought that would fix it, but it seems like it might be RPC rate limit issue instead of nonce? not sure.. still to be investigated...❗️❗️

UPDATE: contract calls still being reverted, but if gasLimit is set to 5 mil, then parallel executions work fine

DEBUG=true NETWORK=datil-dev yarn test:local

Related PRs:

@Ansonhkg Ansonhkg marked this pull request as ready for review June 28, 2024 16:21
@Ansonhkg Ansonhkg requested a review from joshLong145 as a code owner June 28, 2024 16:21
@Ansonhkg Ansonhkg requested a review from DashKash54 June 28, 2024 16:22
Copy link
Contributor

@MaximusHaximus MaximusHaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice work on quick notice, man. Nice enhancements to the local tests too. I added a bunch of nits, but did have a couple of things that I think might be breaking changes that I added comments on too 👍

@Ansonhkg Ansonhkg self-assigned this Jul 2, 2024
Ansonhkg and others added 9 commits July 2, 2024 19:44
…ort-wrappedkeys

LIT-3404 - Add Wrapped Keys support for datil-dev
…make defaulting + required states for SEV checks more explicit.
…ecution are readable

- We no longer re-throw a new error with a message containing the stringified error
- Error objects stringify to { } so this was destroying our ability to read errors from the `postLitActionValidation()` method
…mpatibility

- Moved into a sub-directory for clarity and less wall-of-text on root `tests` directory
- Added helper method to handle setting gas and chain parameters depending on the network we're running against
- Updated logging to not show fail X's when the tests are passing
- Un-commented disabled test for checking duplicate private key being stored to wrapped-keys backend
- Removed test checking insufficient funds; this was not actually testing our code, only ethers.
MaximusHaximus and others added 5 commits July 5, 2024 15:35
…hertext` for keys that we work with from our built-in LIT actions
Since we merged the Wrapped Keys support for Datil-dev
Publishing the same build with the @datil-dev tag
Copy link
Contributor

@MaximusHaximus MaximusHaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@MaximusHaximus MaximusHaximus merged commit 31ff682 into master Jul 8, 2024
4 checks passed
@MaximusHaximus MaximusHaximus deleted the feature/3404-datil-dev-support branch July 8, 2024 19:57
context?: LitContractContext | LitContractResolverContext,
rpcUrl?: string
) {
let provider: ethers.providers.JsonRpcProvider;
rpcUrl = rpcUrl ?? DEFAULT_READ_RPC;
rpcUrl =
rpcUrl ?? network === 'datil-dev' ? LIT_RPC.VESUVIUS : LIT_RPC.CHRONICLE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a bug. The following yields different result, and which is what (I think) we want instead.

    rpcUrl =
      rpcUrl ??
      (network === 'datil-dev' ? LIT_RPC.VESUVIUS : LIT_RPC.CHRONICLE);

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.

7 participants