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

[neox-2.x] add interop services #1597

Merged
merged 21 commits into from
May 6, 2020
Merged

[neox-2.x] add interop services #1597

merged 21 commits into from
May 6, 2020

Conversation

ZhangTao1596
Copy link

Step 4/7 from neo-ngd/neo to neox-2.x

Add 2 new interop services

  • Neo.Cryptography.Keccak256
  • Neo.Cryptography.Ecrecover

@erikzhang @shargon I reopen this. Please take a look.

@erikzhang
Copy link
Member

Related: #1419

@Tommo-L
Copy link
Contributor

Tommo-L commented Apr 22, 2020

Related: #1419

This PR suports to recover the speck256k1 public key.
#1419 only supports speck256k1/r1 signature verification.

I think we need the two PRs to port into each other.

@shargon
Copy link
Member

shargon commented Apr 22, 2020

If the main focus of the cross-chain in neo2 is the cross-chain with neo3, we must first make sure that we use the same encryption standards, I think we need at least Sha256 in both cases.

@ZhangTao1596
Copy link
Author

I think we need at least Sha256 in both cases

We have OpCode.SHA256 and OpCode.HASH256 in neo2.

@shargon
Copy link
Member

shargon commented Apr 22, 2020

Could you add UT for these methods?

@Lichen9618
Copy link
Member

Could you add UT for these methods?

Unit Test will be added soon.

@ZhangTao1596 ZhangTao1596 requested a review from shargon April 23, 2020 07:27
neo.UnitTests/UT_ECDsa.cs Outdated Show resolved Hide resolved
neo.UnitTests/UT_Helper.cs Outdated Show resolved Hide resolved
@ZhangTao1596 ZhangTao1596 requested a review from shargon April 24, 2020 06:13
neo/Cryptography/ECC/ECDsa.cs Outdated Show resolved Hide resolved
neo/SmartContract/NeoService.cs Outdated Show resolved Hide resolved
neo/SmartContract/NeoService.cs Outdated Show resolved Hide resolved
neo/SmartContract/NeoService.cs Outdated Show resolved Hide resolved
@ZhangTao1596
Copy link
Author

@shargon Can you review this again?

neo/Cryptography/ECC/ECDsa.cs Outdated Show resolved Hide resolved
neo/Cryptography/ECC/ECDsa.cs Outdated Show resolved Hide resolved
neo/SmartContract/NeoService.cs Show resolved Hide resolved
Copy link
Contributor

@Tommo-L Tommo-L left a comment

Choose a reason for hiding this comment

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

I think we'll not add keccak256 and ecc recover functions in neo3, as it'll replaced by Speck256k1.CheckMultiSig.

But we'll keep this two functions in neox-2.x, as it also works well, we want to release neox-2.x asap.

neo.UnitTests/UT_Helper.cs Outdated Show resolved Hide resolved
neo.UnitTests/UT_ECDsa.cs Outdated Show resolved Hide resolved
@ZhangTao1596
Copy link
Author

@shargon Can we merge this?

@Tommo-L
Copy link
Contributor

Tommo-L commented May 6, 2020

Ready to merge?

@shargon shargon merged commit 1f7da51 into neo-project:neox-2.x May 6, 2020
@shargon shargon deleted the neox-interop branch May 6, 2020 09:17
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.

5 participants