-
Notifications
You must be signed in to change notification settings - Fork 73
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
IF: update libtester eosio.bios to match latest eosio.bios in reference-contracts, add more validation to set_finalizers host function #1989
Conversation
…ontract, add more valiation to set_finalizers host function
check(f.public_key.substr(0, pk_prefix.length()) == pk_prefix, "public key not started with PUB_BLS"); | ||
check(f.pop.substr(0, sig_prefix.length()) == sig_prefix, "proof of possession signature not started with SIG_BLS"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check(f.public_key.substr(0, pk_prefix.length()) == pk_prefix, "public key not started with PUB_BLS"); | |
check(f.pop.substr(0, sig_prefix.length()) == sig_prefix, "proof of possession signature not started with SIG_BLS"); | |
check(f.public_key.substr(0, pk_prefix.length()) == pk_prefix, "public key should start with PUB_BLS"); | |
check(f.pop.substr(0, sig_prefix.length()) == sig_prefix, "proof of possession signature should start with SIG_BLS"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many of our error messages state the fact of error. Not sure which way is clearer. Will change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is changed it needs to be updated in reference contracts. Not sure it is worth it for bios contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it is not worthwhile for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe the current message is correct English.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed by 3e1f8cc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference Contracts changes will be done by AntelopeIO/reference-contracts#34
abi_finalizer_policy.finalizers.emplace_back(eosio::abi_finalizer_authority{f.description, f.weight, std::move(pk_vector)}); | ||
} | ||
|
||
check(finalizer_policy.threshold > weight_sum / 2, "finalizer policy threshold cannot be met by finalizer weights"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check(finalizer_policy.threshold > weight_sum / 2, "finalizer policy threshold cannot be met by finalizer weights"); | |
check(finalizer_policy.threshold > weight_sum / 2, "finalizer policy threshold must be greater than half of the sum of the weights"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…wasm_parser to resolve env.bls_fp_mod unresolveable
…sistent with underlying types
…earlier and report the offending public key if duplicate key is detected
Port latest
eosio.bios
from #1987 to libtester, add POP check, and update tests.In
set_finalizers
host function, add overflow check forf_weight_sum
and always validate public key.Resolved #1987