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

fix: Using received blockhash as nonce #285

Conversation

DashKash54
Copy link
Collaborator

What

Fixes the bug of not using the received blockhashes from the nodes as the nonce.

Notes

Lot's of files changed, but only ones to look for is lit-core.ts & test-hotwallet-with-blockhash.mjs

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Ansonhkg Ansonhkg merged commit 34b4863 into test/manzano-habanero Dec 18, 2023
1 of 2 checks passed
@Ansonhkg Ansonhkg deleted the feature/lit-1935-update-sdk-to-throw-error-if-blockhash-form-nodes-is branch December 18, 2023 16:53
joshLong145 pushed a commit that referenced this pull request Jan 26, 2024
* manzano support

* changes to tests

* add habanero support

* add habanero enum

* fix: Using received blockhash as nonce (#285)

* add blockhash log

* wip

* Revert "wip"

This reverts commit f900e15.

* connect to all nodes, fix kicked nodes filtering (#291)

* connect to all nodes, fix kicked nodes filtering

* fix 2-sigs test

---------

Co-authored-by: Josh Long <[email protected]>

* fix exp in tests

* Feature/lit 2155 add custom contract context (#293)

* wip

* wip

* wip

* wip

* Support for contract resolver  for resolving addresses

* add e2e tests

* reduced contract resolve

* remove e2e test for unit test impl

* fix for type normalizing

* fmt

* run ci on all branches

* run ci oon pull requests

* change branch rules in workflow

* dont duplciate test runs on prs

* e2e works on both manzano and habanero

* remove internalDev

* remove internalDev

* remove internalDev

* remove internalDev

* rm unused code

* linted

* change lint command

* rm internalDev

* change ci lint command

* linted contracts-sdk

* gen code

* prettier

* feat: throw when bootstrap urls not found

* fix: check habanero network

* prettier

* add storage.test.db to gitignore

* Feat/manzano habanero cache (#322)

* cache

* add instru

* fix: don't exit

* resolve comments

* Feat/manzano habanero merge nft delegation (#323)

* wip

* feat: addRateLimitAuthSig

* fix: circular dependency issue

* recap works with ipfs-only-hash

* remove bs58 & cid

* make CID an async load module

* make addRateLimitAuthSig async

* ipfs-only-hash package

* WIP e2e test

* use ipfsBundler instead

* test: add recap test

* wip: e2e test

* WIP

* feat: utility function to generate accs hash for RLI delegation

* gen session sigs

* remove comment

* update test

* got sessionsigs

* remove unified accs

* add param

* wip

* feat: addRateLimitAuthSig

* fix: circular dependency issue

* recap works with ipfs-only-hash

* remove bs58 & cid

* make CID an async load module

* make addRateLimitAuthSig async

* ipfs-only-hash package

* merge

* sig works but not sure if rli works

* doesnt work

* add to siwe message

* add sanitize

* recap

* clean up test

* clean up test

* NodeWalletSignatureJSONError

* wip

* swap order

* put the order back

* wip

* now hitting rate limit exceeded

* varous fixes - stripping the 0x prefix in the delegate_to array.  uses needs to be a string

* this should work (#309)

* cache

* add instru

* fix: don't exit

* prettier

* add prettier to build script

* fix: recap test

* resolve comments

* disable: addRateLimitAuthSig and console.log

* add comment on addCapabilities

* disable generateUnifiedAccsForRLIDelegation

* add comment on mint rli

* consistent log on contracts-sdk

* consistent log on contracts-sdk

* optional domain

* add comment

* make nonce

* update test

* prettier

* update test

* add rli tests

* delegatee f-ing works

* dont write to disk

---------

Signed-off-by: Anson <[email protected]>
Co-authored-by: Chris Cassano <[email protected]>

* Feature/lit 2237 implement retry operations for stateless threshold endpoints (#307)

* wip retry agent

* tweak logging

* fix signature share combining

* tweak retry logic for failure detection

* add standard error logging

* add validation error

* fmt

* tweak to new signaure share processing

* add retry to network operations

* refactor retry for multi request tracking

* refactor for group request retry

* add uint tests for executeWithRetry

* fmt

* updates from review comments

* fmt

* fmt

* fix validateAndSignEcdsa retry logic

* remove logging

* fmt

* remove logging of provider object

* support removing circular refs when serializing objects

* move _safeStringify up for reuse

* Revert "remove logging of provider object"

This reverts commit 0844930.

* Revert "move _safeStringify up for reuse"

This reverts commit d8a15e5.

* Revert "support removing circular refs when serializing objects"

This reverts commit 393bb6e.

* Test/Encryption and decryption using the PKP as the requesting wallet (#312)

* add e2e test using the pkp to encrypt and decrypt instead of using a user provided wallet

* fmt

* fix typings

* refactor to no longer use request id when logging errors being retried

* refactor to not use trace id when logging retry on error

* fmt

* Feature/lit 2183 error with checkandsignauthmessage (#311)

* remove logging of provider object

* support removing circular refs when serializing objects

* move _safeStringify up for reuse

* fmt

* add comment to _safeStringify

* fix unused var

* auto-gen

* Publish 3.0.30

* feat: support session sigs when get auth method id

* revert to 05684c6 (#314)

* Publish 3.0.31

* fmt

* feature/lit-2303-js-sdk-authmethod-is-a-sessionsig-if-so-parse-one-of-the (#316)

* AuthMethod is a sessionSig if so parse one of the elements of it's array

* update comment

* nit: I think we could do this with a single  loop

* fmt

* feat: Support Scroll mainnet (#317)

* fix typeo

* Fix/failing unit tests (#321)

* fix failing unit tests

* fmt

* wip retry agent

* tweak logging

* fix signature share combining

* tweak retry logic for failure detection

* add standard error logging

* add validation error

* fmt

* tweak to new signaure share processing

* add retry to network operations

* refactor retry for multi request tracking

* refactor for group request retry

* add uint tests for executeWithRetry

* fmt

* updates from review comments

* fmt

* fmt

* fix validateAndSignEcdsa retry logic

* remove logging

* fmt

* fix typings

* refactor to no longer use request id when logging errors being retried

* refactor to not use trace id when logging retry on error

* fmt

* remove logging of provider object

* support removing circular refs when serializing objects

* move _safeStringify up for reuse

* Revert "remove logging of provider object"

This reverts commit 0844930.

* Revert "move _safeStringify up for reuse"

This reverts commit d8a15e5.

* Revert "support removing circular refs when serializing objects"

This reverts commit 393bb6e.

* Publish 3.0.30

* Test/Encryption and decryption using the PKP as the requesting wallet (#312)

* add e2e test using the pkp to encrypt and decrypt instead of using a user provided wallet

* fmt

* Feature/lit 2183 error with checkandsignauthmessage (#311)

* remove logging of provider object

* support removing circular refs when serializing objects

* move _safeStringify up for reuse

* fmt

* add comment to _safeStringify

* fix unused var

* auto-gen

* feat: support session sigs when get auth method id

* revert to 05684c6 (#314)

* Publish 3.0.31

* fmt

* feature/lit-2303-js-sdk-authmethod-is-a-sessionsig-if-so-parse-one-of-the (#316)

* AuthMethod is a sessionSig if so parse one of the elements of it's array

* update comment

* nit: I think we could do this with a single  loop

* fmt

* feat: Support Scroll mainnet (#317)

* fix typeo

* Fix/failing unit tests (#321)

* fix failing unit tests

* fmt

* rebase to feat/habanero-manzano

* fmt

* Feature/lit 2237 implement retry operations for stateless threshold endpoints feat/manzano habanero (#324)

* Resolved conflicts

* fix: no rli test

---------

Signed-off-by: Anson <[email protected]>
Co-authored-by: Federico Amura <[email protected]>
Co-authored-by: Ansonhkg <[email protected]>
Co-authored-by: Adarsh-Kumar28 <[email protected]>

* change test name

* update message

* remove lowercase

* types & constants & wip e2e tests

* build

* wip

* wip

* wip

* fix permission issues with eth wallet auth method type

* remove step 6 for minting new pkp

* Feat/manzano habanero final polish (#326)

* WIP

* polish up

* conditionally adding property

* remove console.log

* Add/stytch auth parsing to contract sdk (#327)

* port utility code for now to make contract-sdk auth parsing fully functional

* fmt

---------

Signed-off-by: Anson <[email protected]>
Co-authored-by: Anson <[email protected]>

* update docs for 3.1 (#328)

* fix: support network types

* Add/contract sdk network types (#329)

* add other network options

* Revert "add other network options"

This reverts commit ba94cd6.

* add other network options

* fmt

* add network flag to test case

* remove uneeded test cases

* Publish 3.1.0

* gen docs

---------

Signed-off-by: Anson <[email protected]>
Co-authored-by: Josh Long <[email protected]>
Co-authored-by: Adarsh-Kumar28 <[email protected]>
Co-authored-by: Chris Cassano <[email protected]>
Co-authored-by: Chris Cassano <[email protected]>
Co-authored-by: Federico Amura <[email protected]>
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.

4 participants