You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the performance is very important because if there are many txs, it will cost a lot of time to verify signatures in AnteHandler. So can we move to the version of ethereum?
The text was updated successfully, but these errors were encountered:
To first note, go-ethereum is getting its speed from using C code for this task. I believe the same koblitz endomorphisms as in the C / asm code are used in btcd for verification. I have not verified this though. We should check on security audits on the Ethereum's secp codebase (and not just assume its secure b/c etheruem uses it), and check its constant time guarantees. If this is the case, I am fine with switching, though we probably can't focus on the change until postlaunch.
As a side note, I think we may end up switching from C to golang with asm or pure Rust.
I suspect that secure ECDSA batch verification algorithms exist using random linear combinations of the relevant equations, along with using pippenger / bos-corter multi-scalar exponentiation algorthm. (In the same style as is done in ed25519, see dalek crypto's code for this). I also am aware of 2 asia crypt papers providing batch ecdsa verification speed-ups. Its worth exploring the speedup's to be had there, and by including things such as "shamir's trick" for the equation. We could then use a proposal like tendermint/tendermint#2639 to capitalize on this. I am unsure what are approach should be for updates to cryptography libs, but I don't think we should update the C source, but instead should update a golang w/ asm source or a Rust source.
go-ethereum uses libsecp256k1 from bitcoin. they just copied the code into their repo. we should look to do the same. I'll close this for #3163. thanks!
REF: cosmos/cosmos-sdk#2640 (comment)
hi, I compared performance of secp256 verifying signatures between go-ethereum and btcd. I found that go-ethereum improves about 30% over btcd.
I used my laptop(MacBook Pro (15-inch, 2018), 2.2 GHz Intel Core i7) to test. Below are the results.
go ethereum:
result:
btcd:
result:
the performance is very important because if there are many txs, it will cost a lot of time to verify signatures in
AnteHandler
. So can we move to the version of ethereum?The text was updated successfully, but these errors were encountered: