forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zklogin: add to multisig (MystenLabs#14145)
## Description add zklogin to multisig ## Test Plan unit test in rust, unit test and e2e test in typescript one tab: ``` cargo run --bin sui-test-validator ``` another tab: ``` cargo build --bin sui && target/debug/sui keytool zk-login-sign-and-execute-tx --max-epoch 10 --fixed --network localnet Compiling sui v1.12.0 (/Users/joy/mysten/sui/crates/sui) Finished dev [unoptimized + debuginfo] target(s) in 7.86s Ephemeral key identifier: 0xcc2196ee1fa156836daf9bb021d88d648a0023fa387e695d3701667a634a331f Ephemeral pubkey (BigInt): 84029355920633174015103288781128426107680789454168570548782290541079926444544 Jwt randomness: 100681567828351849884072155819400689117 Visit URL (Google): https://accounts.google.com/o/oauth2/v2/auth?client_id=25769832374-famecqrhe2gkebt5fvqms2263046lj96.apps.googleusercontent.com&response_type=id_token&redirect_uri=https://sui.io/&scope=openid&nonce=hTPpgF7XAKbW37rEUS6pEVZqmoI Visit URL (Twitch): https://id.twitch.tv/oauth2/authorize?client_id=rs1bh065i9ya4ydvifixl4kss0uhpt&force_verify=true&lang=en&login_type=login&redirect_uri=https://sui.io/&response_type=id_token&scope=openid&nonce=hTPpgF7XAKbW37rEUS6pEVZqmoI Visit URL (Facebook): https://www.facebook.com/v17.0/dialog/oauth?client_id=233307156352917&redirect_uri=https://sui.io/&scope=openid&nonce=hTPpgF7XAKbW37rEUS6pEVZqmoI&response_type=id_token Finish login and paste the entire URL here (e.g. https://sui.io/#id_token=...): https://sui.io/#id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImM2MjYzZDA5NzQ1YjUwMzJlNTdmYTZlMWQwNDFiNzdhNTQwNjZkYmQiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiIyNTc2OTgzMjM3NC1mYW1lY3FyaGUyZ2tlYnQ1ZnZxbXMyMjYzMDQ2bGo5Ni5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImF1ZCI6IjI1NzY5ODMyMzc0LWZhbWVjcXJoZTJna2VidDVmdnFtczIyNjMwNDZsajk2LmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTA2Mjk0MDQ5MjQwOTk5MzA3OTIzIiwibm9uY2UiOiJoVFBwZ0Y3WEFLYlczN3JFVVM2cEVWWnFtb0kiLCJuYmYiOjE2OTY5Njc4NDUsImlhdCI6MTY5Njk2ODE0NSwiZXhwIjoxNjk2OTcxNzQ1LCJqdGkiOiJjMTM5NjYwMzc3NmIxZjdlMWQ2NmI5NTM3YmM5NDRmNDdiNTA3ZTY4In0.hZl02IMAENkZpdPhHBhSAB0-A-WhaxzDCjGssRCNpZI_qcvc8F2ChkCnhwJeyAVU8Pr8EeDUMx0eNGugkzllWVDIoWns-evVX78oL2YCkUWHAOPR0RTpu6Skm0NQAC8XPGEiv0Kz2kCwDdWdjPgH23arwAi9NmANKfeZ3vrk6Svsfeez9f5wqv3c_MGki21U0jzz8kNgAOyB6uCccpy-YLD50EZk0DcsNKmjXbiY2ZhV-P-e8tG7xiPyIj5VxblmPHVZ7qL6o2tQhizXWgKArqgU9oe9K8OLeLp5awnS4vFCZ6eB8nfxab2AqBFnSqZPNC66erkUhlN1lby27OCITg&authuser=0&prompt=none User salt: 206703048842351542647799591018316385612 ZkLogin inputs: "{\"proofPoints\":{\"a\":[\"11071960508875089201057730565518101556775475169375579509065140489026077099654\",\"14174912479081119851997528327158995273006699149457531618246292146613112372944\",\"1\"],\"b\":[[\"7216990298660783302143896853289290021326436249623860051904679351585173012040\",\"18087701151940901281958636377056618090618208573732569791579703653413943983699\"],[\"19224763285739841430265605268687720210313145998503468635464708573454324013744\",\"12393241310435082598360753545909989326027524395613882552873544890506438935027\"],[\"1\",\"0\"]],\"c\":[\"20983561555479787714367945653854194275982221313962694075743870227818357229450\",\"16024834658814099899544865951708812186847146613075692342239549354247901181345\",\"1\"]},\"issBase64Details\":{\"value\":\"yJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLC\",\"indexMod4\":1},\"headerBase64\":\"eyJhbGciOiJSUzI1NiIsImtpZCI6ImM2MjYzZDA5NzQ1YjUwMzJlNTdmYTZlMWQwNDFiNzdhNTQwNjZkYmQiLCJ0eXAiOiJKV1QifQ\"}" Use multisig address as sender Sender: 0xf9266082764281fd99430ed349c1cac0796b6bbb9cc474b2d022e6232cd11486 Faucet requested and created test transaction: "AAACACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA1dbpfp+rpZ8z/hzODNRSLRna+szYuNg9QLVOTdlfZSUCAAAAAAAAACCr+M/bjvBJUnDgzRkpu09Uq167uXZqh7rPU6afAlob1QEBAQEBAAEAAPkmYIJ2QoH9mUMO00nBysB5a2u7nMR0stAi5iMs0RSGAQ/xwfsWOdApvK5lmAUT38ExbUsebssxk+l5UNRPap4kAgAAAAAAAAAguHVDIcb31XqwlIXvQPLGrVP8PYNH2KC8sBYEhr0HVvH5JmCCdkKB/ZlDDtNJwcrAeWtru5zEdLLQIuYjLNEUhugDAAAAAAAAQEtMAAAAAAAA" Signature Serialized: "AwEDA00xMTA3MTk2MDUwODg3NTA4OTIwMTA1NzczMDU2NTUxODEwMTU1Njc3NTQ3NTE2OTM3NTU3OTUwOTA2NTE0MDQ4OTAyNjA3NzA5OTY1NE0xNDE3NDkxMjQ3OTA4MTExOTg1MTk5NzUyODMyNzE1ODk5NTI3MzAwNjY5OTE0OTQ1NzUzMTYxODI0NjI5MjE0NjYxMzExMjM3Mjk0NAExAwJMNzIxNjk5MDI5ODY2MDc4MzMwMjE0Mzg5Njg1MzI4OTI5MDAyMTMyNjQzNjI0OTYyMzg2MDA1MTkwNDY3OTM1MTU4NTE3MzAxMjA0ME0xODA4NzcwMTE1MTk0MDkwMTI4MTk1ODYzNjM3NzA1NjYxODA5MDYxODIwODU3MzczMjU2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zPbK2Yvk06kbEAQEA" ╭──────────┬────────────────────────────────────────────────╮ │ txDigest │ GbM5sxq3m9PJh8EbafdTWyKNbN1KBPSkoXzvTLHXkPQX │ ╰──────────┴────────────────────────────────────────────────╯ ``` --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [x] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [x] breaking change for FNs (FN binary must upgrade) - [x] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes Add protocol version 32 with flag accept zklogin sig inside multisig. This allows Sui to verify a multisig that combined single sigs with zklogin sigs.
- Loading branch information
Showing
45 changed files
with
1,068 additions
and
894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@mysten/sui.js': minor | ||
--- | ||
|
||
Add support for zklogin sig inside multisig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,7 @@ fn async_verifier_bench(c: &mut Criterion) { | |
vec![], | ||
ZkLoginEnv::Test, | ||
true, | ||
true, | ||
)); | ||
|
||
b.iter(|| { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.