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

EnrollmentTransaction.cs checking PK #31

Closed
ghost opened this issue Jul 22, 2017 · 1 comment
Closed

EnrollmentTransaction.cs checking PK #31

ghost opened this issue Jul 22, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 22, 2017

in EnrollmentTransaction.cs the publickKey is not checked as part of DeserializeExclusiveData.

in contrast, in RegisterTransaction.cs you do check and throw a FormatException.

compare RegisterTransaction.DeserializeExclusiveData line 70-72
Owner = ECPoint.DeserializeFrom(reader, ECCurve.Secp256r1);
if (Owner.IsInfinity && AssetType != AssetType.SystemShare && AssetType != AssetType.SystemCoin)
throw new FormatException();

to EnrollmentTransaction.DeserializeExclusiveData line 47
PublicKey = ECPoint.DeserializeFrom(reader, ECCurve.Secp256r1);

@erikzhang
Copy link
Member

As you know EnrollmentTransaction is marked as "Obsolete", it is no longer to be used any more. As an alternative, Validator.Register() in contract API will check the pubkey.
See https://github.com/neo-project/neo/blob/master/neo/SmartContract/StateMachine.cs#L114

Li-Tian pushed a commit to Li-Tian/neo that referenced this issue Nov 22, 2018
Thacryba referenced this issue in simplitech/neo Dec 12, 2019
* Update packages reference

* Fix claim (#34)
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

No branches or pull requests

1 participant