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

(WIP) Add pre-compile: verification for ed25519 sig made via GPG #2

Open
wants to merge 11 commits into
base: optimism
Choose a base branch
from
2 changes: 1 addition & 1 deletion params/protocol_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const (
Bls12381MapG2Gas uint64 = 75000 // Gas price for BLS12-381 mapping field element to G2 operation

P256VerifyGas uint64 = 3450 // secp256r1 elliptic curve signature verifier gas price
GpgEd25519VerifyGas uint64 = 2000 // GPG Ed25519 signature verification gas price
GpgEd25519VerifyGas uint64 = 7900 // GPG Ed25519 signature verification gas price
Copy link
Author

Choose a reason for hiding this comment

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

Assuming Ecrecover is fairly priced (as per EIP-152 Blake2 precompile) at 3000 gas/op for ~50,100 ns/op.

GpgEd25519Verify should be priced proportionately 7900 gas/op for ~134,000 ns/op as a good first estimate for gas cost.


// The Refund Quotient is the cap on how much of the used gas can be refunded. Before EIP-3529,
// up to half the consumed gas could be refunded. Redefined as 1/5th in EIP-3529
Expand Down