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

Use btcec v2 lib for ECDSA keys manipulation #105

Merged
merged 4 commits into from
Feb 12, 2024

Conversation

Stefan-Ethernal
Copy link

@Stefan-Ethernal Stefan-Ethernal commented Feb 7, 2024

Description

This PR removes direct dependency on BTC full node (https://github.com/btcsuite/btcd) implementation and instead uses the btcec go module directly (https://github.com/btcsuite/btcd/tree/master/btcec).

TODO:

  • Introduce crypto.ECDSAKey to the Blade and use it instead of *wallet.Key.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Please complete this section if you ran manual tests for this functionality, otherwise delete it

Documentation update

Please link the documentation update PR in this section if it's present, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

@Stefan-Ethernal Stefan-Ethernal self-assigned this Feb 7, 2024
@Stefan-Ethernal Stefan-Ethernal force-pushed the feat/remove-btcd-dependency branch 2 times, most recently from 25d954f to b459860 Compare February 11, 2024 20:21
@Stefan-Ethernal Stefan-Ethernal force-pushed the feat/remove-btcd-dependency branch from b459860 to 61f7218 Compare February 11, 2024 20:25
@Stefan-Ethernal Stefan-Ethernal changed the title Use btcec v2 lib for ECDSA keys manipulation Use btcec v2 lib for ECDSA keys manipulation Feb 12, 2024
@Stefan-Ethernal Stefan-Ethernal merged commit 0b7913e into feature/berlin Feb 12, 2024
6 of 7 checks passed
@Stefan-Ethernal Stefan-Ethernal deleted the feat/remove-btcd-dependency branch February 12, 2024 13:04
@goran-ethernal goran-ethernal mentioned this pull request Feb 19, 2024
11 tasks
goran-ethernal added a commit that referenced this pull request Feb 19, 2024
* EIP-2565 Implementation (0xPolygon#1704)

* implemented EIP-2565

* fixed linting error

* fixed linting error

* fixed TestModExpWithEIP2565

* resolved comments

* resolved comments

* resolved merge conflicts

* Eip 2929 (0xPolygon#1748)

* implemented changes for EIP-2929 (access list)

* added missing files

* fixed unit test Test_opCall

* populate access_list with precompiles only if eip-2929 is activated

* added address to access list for Balance opcode

* added test cases and for EIP-2929 and also call stack output

* changed structure of access list and removed some comments

* fixed linting errors

* fixed AddSlot method

* added test cases for access list

* removed call stack output for Test_Transition_EIP2929

* corrected indentation

* fixed linting errors

* fixed linting errors

* fixed Test_opReturnDataCopy

* removed ActivePrecompile Address slice

* changed the const name

* changed the const name in comments

* change the AddAddress function to a variadic function

* refactored

* added test cases for SLOAD opcode

* fixed linting errors

* refactored code

* resolved merge conflicts

* fixed EIP-2929 test

* Rebase fix

* `Berlin` fork implementation (#81)

* Berlin implementation

* Fix tests

* Lint fix

* Lint fix part 2

* Bug fixes

* Lint fix

* Legacy e2e tests fix

* Unmarshal fix

* Tx signer fix

* Use requires instead of Fatalf

* Pass the TestLondonSignerSender

* Cleanup precompile addresses

* TxSigner fix

* Fix precompiles addresses access in unit test

* Order tx types

* Address comments

---------

Co-authored-by: Stefan Negovanović <[email protected]>

* Rebase fix

* Berlin fixes (#86)

* Add journal to contract access list changes

* small fix on journal

* remove access list from state

* Fix build

* Remove commented code

* Add access list to state_test_util

* Include BerlinToLondon tests as well

* Minor change

---------

Co-authored-by: Stefan Negovanović <[email protected]>

* Use `btcec v2` lib for `ECDSA` keys manipulation (#105)

* Use btcec v2 lib for ECDSA keys manipulation

* Fix test

* Remove key from stake manager

* Warning fix (loop variable capture)

* Bump Ethereum tests version (#119)

* Bump Ethereum tests version

* Linter fixes

* Skip loopMul and minor refactoring

* Refactor Ethereum tests files resolution

* Provide EIP 3607 to each fork config

* Audit duration of each test

* Add detailed logging and skip CREATEBlake2f_MaxRounds test

* Remove -v flag

* small fixes

* fix

* Lint fix

---------

Co-authored-by: Goran Rojovic <[email protected]>

* London test fixes (#111)

* Tests fixes

* SelfDestruct fix

* Rebase fix

* Journaling fix

* Tests fix

* e2e fix

* subGasLimit fix

* Fix

* Skip CheckEIP1559 e2e test

* Remove auxState field from Transition and use NewTransition function

* increase timeout for UT

* Suppress linting warnings

* underflow test fix

* Revert make file

* Remove panic

* Use %d in the error formatting

---------

Co-authored-by: Stefan Negovanović <[email protected]>

---------

Co-authored-by: Rachit Sonthalia <[email protected]>
Co-authored-by: Goran Rojovic <[email protected]>
Co-authored-by: Goran Rojovic <[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.

2 participants