Skip to content

Update BLS signature ordering to avoid public key compression #1416

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

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented Apr 25, 2023

Why this should be merged

Public key compression should be avoided in any code hot-paths.

How this works

Uses the uncompressed format rather than the compressed format.

How this was tested

CI

@aaronbuchwald
Copy link
Collaborator

Results for BenchmarkGetCanonicalValidatorSet

Before:

# github.com/ava-labs/avalanchego/vms/platformvm/warp.test
ld: warning: could not create compact unwind for _blst_sha256_block_data_order: does not use RBP or RSP based frame
goos: darwin
goarch: amd64
pkg: github.com/ava-labs/avalanchego/vms/platformvm/warp
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkGetCanonicalValidatorSet/0-12  	 2944636	       402.2 ns/op	       0 B/op	       0 allocs/op
BenchmarkGetCanonicalValidatorSet/1-12  	 1000000	      1061 ns/op	     192 B/op	       5 allocs/op
BenchmarkGetCanonicalValidatorSet/10-12 	  182083	      6638 ns/op	    2340 B/op	      42 allocs/op
BenchmarkGetCanonicalValidatorSet/100-12         	   18933	     69755 ns/op	   23476 B/op	     403 allocs/op
BenchmarkGetCanonicalValidatorSet/1000-12        	    1622	    811667 ns/op	  249560 B/op	    4003 allocs/op
BenchmarkGetCanonicalValidatorSet/10000-12       	     100	  11025589 ns/op	 2380696 B/op	   40003 allocs/op
PASS
ok  	github.com/ava-labs/avalanchego/vms/platformvm/warp	11.748s

After:

ld: warning: could not create compact unwind for _blst_sha256_block_data_order: does not use RBP or RSP based frame
goos: darwin
goarch: amd64
pkg: github.com/ava-labs/avalanchego/vms/platformvm/warp
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkGetCanonicalValidatorSet/0-12  	 3929092	       298.2 ns/op	       0 B/op	       0 allocs/op
BenchmarkGetCanonicalValidatorSet/1-12  	 1351539	      1023 ns/op	     288 B/op	       5 allocs/op
BenchmarkGetCanonicalValidatorSet/10-12 	  219115	      5952 ns/op	    3300 B/op	      42 allocs/op
BenchmarkGetCanonicalValidatorSet/100-12         	   21322	     60256 ns/op	   33076 B/op	     403 allocs/op
BenchmarkGetCanonicalValidatorSet/1000-12        	    1632	    839877 ns/op	  345561 B/op	    4003 allocs/op
BenchmarkGetCanonicalValidatorSet/10000-12       	     100	  10612301 ns/op	 3340696 B/op	   40003 allocs/op
PASS
ok  	github.com/ava-labs/avalanchego/vms/platformvm/warp	11.949s

@StephenButtolph StephenButtolph merged commit b11e9bb into dev Apr 26, 2023
@StephenButtolph StephenButtolph deleted the update-warp-signature-ordering branch April 26, 2023 18:30
joshua-kim added a commit to joshua-kim/avalanchego that referenced this pull request Apr 27, 2023
commit b11e9bb
Author: Stephen Buttolph <stephen@avalabs.org>
Date:   Wed Apr 26 14:30:28 2023 -0400

    Update BLS signature ordering to avoid public key compression (ava-labs#1416)

commit e44ef23
Author: Stephen Buttolph <stephen@avalabs.org>
Date:   Wed Apr 26 11:57:39 2023 -0400

    Honor AllowPrivateIPs config (ava-labs#1422)

commit 6fb00b9
Author: Stephen Buttolph <stephen@avalabs.org>
Date:   Wed Apr 26 11:56:46 2023 -0400

    Simplify IP status calculation (ava-labs#1421)
joshua-kim pushed a commit to joshua-kim/avalanchego that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants