Skip to content

Commit

Permalink
Support different quorum threshold in AuthorityQuorumSignInfo (Mysten…
Browse files Browse the repository at this point in the history
…Labs#2671)

* Support weak quorum threshold

* rpc types regen
  • Loading branch information
lxfind authored Jun 24, 2022
1 parent 88abe65 commit bfd051d
Show file tree
Hide file tree
Showing 8 changed files with 661 additions and 651 deletions.
4 changes: 2 additions & 2 deletions crates/sui-json-rpc-api/src/rpc_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use sui_types::base_types::{
ObjectDigest, ObjectID, ObjectInfo, ObjectRef, SequenceNumber, SuiAddress, TransactionDigest,
};
use sui_types::committee::EpochId;
use sui_types::crypto::{AuthorityQuorumSignInfo, Signature};
use sui_types::crypto::{AuthorityStrongQuorumSignInfo, Signature};
use sui_types::error::SuiError;
use sui_types::event::{Event, TransferType};
use sui_types::gas::GasCostSummary;
Expand Down Expand Up @@ -961,7 +961,7 @@ pub struct SuiCertifiedTransaction {
/// tx_signature is signed by the transaction sender, applied on `data`.
pub tx_signature: Signature,
/// authority signature information, if available, is signed by an authority, applied on `data`.
pub auth_sign_info: AuthorityQuorumSignInfo,
pub auth_sign_info: AuthorityStrongQuorumSignInfo,
}

impl Display for SuiCertifiedTransaction {
Expand Down
46 changes: 23 additions & 23 deletions crates/sui-open-rpc/samples/objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
"fields": {
"description": "An NFT created by the wallet Command Line Tool",
"id": {
"id": "0xd070e8251a5e094dbd7175906b24a5c1ae8d2f41",
"id": "0x494eacaa114c6e42cdf962672af3a123fcedb076",
"version": 1
},
"name": "Example NFT",
"url": "ipfs://bafkreibngqhl3gaa7daob4i2vccziay2jjlp435cf66vhono7nrvww53ty"
}
},
"owner": {
"AddressOwner": "0x15090b0b58e2cffdf41f82bb79aa61d101669511"
"AddressOwner": "0x1680f5f14335ac5833b2c43173e44cdc8778eae1"
},
"previousTransaction": "jPCXJ2ZWsU5CGFRMBbLyRafJN1gH3VAXGcv5drI1nQk=",
"previousTransaction": "iv5I8L4F1gwxeIpVwcYmrCKbO5wQucY8jCdXBj/FIpI=",
"storageRebate": 25,
"reference": {
"objectId": "0xd070e8251a5e094dbd7175906b24a5c1ae8d2f41",
"objectId": "0x494eacaa114c6e42cdf962672af3a123fcedb076",
"version": 1,
"digest": "Ra1j4fwZg/oFBcxsAFPNP8/vBx7vxhf3obkwdjW/FiE="
"digest": "9vJsKOfIZzoiaaVeN95Qbxt0l78XcwDMXfJ9VFJ3se4="
}
}
},
Expand All @@ -36,20 +36,20 @@
"fields": {
"balance": 100000,
"id": {
"id": "0x010669175cee34d61c4ab84a839895188ad8663d",
"id": "0x03f6b46c2a692308197091c45c0b1f7fe58bcb5a",
"version": 0
}
}
},
"owner": {
"AddressOwner": "0x15090b0b58e2cffdf41f82bb79aa61d101669511"
"AddressOwner": "0x1680f5f14335ac5833b2c43173e44cdc8778eae1"
},
"previousTransaction": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"storageRebate": 0,
"reference": {
"objectId": "0x010669175cee34d61c4ab84a839895188ad8663d",
"objectId": "0x03f6b46c2a692308197091c45c0b1f7fe58bcb5a",
"version": 0,
"digest": "eUheubDSPm5tOAk/gDmSi9+ebi111/K4RphTiAq+mog="
"digest": "0HcxGAJ6lF7BLf9GsMbkgSosFyDtyNbZHZrJDzhZisI="
}
}
},
Expand All @@ -59,16 +59,16 @@
"data": {
"dataType": "package",
"disassembled": {
"m1": "// Move bytecode v5\nmodule 9da042e317a0656781ba0cecaf61f649c1ccbacd.m1 {\nstruct Forge has store, key {\n\tid: VersionedID,\n\tswords_created: u64\n}\nstruct Sword has store, key {\n\tid: VersionedID,\n\tmagic: u64,\n\tstrength: u64\n}\n\ninit(Arg0: &mut TxContext) {\nB0:\n\t0: CopyLoc[0](Arg0: &mut TxContext)\n\t1: Call[6](new_id(&mut TxContext): VersionedID)\n\t2: LdU64(0)\n\t3: Pack[0](Forge)\n\t4: StLoc[1](loc0: Forge)\n\t5: MoveLoc[1](loc0: Forge)\n\t6: MoveLoc[0](Arg0: &mut TxContext)\n\t7: FreezeRef\n\t8: Call[7](sender(&TxContext): address)\n\t9: Call[0](transfer<Forge>(Forge, address))\n\t10: Ret\n}\npublic magic(Arg0: &Sword): u64 {\nB0:\n\t0: MoveLoc[0](Arg0: &Sword)\n\t1: ImmBorrowField[0](Sword.magic: u64)\n\t2: ReadRef\n\t3: Ret\n}\npublic strength(Arg0: &Sword): u64 {\nB0:\n\t0: MoveLoc[0](Arg0: &Sword)\n\t1: ImmBorrowField[1](Sword.strength: u64)\n\t2: ReadRef\n\t3: Ret\n}\nentry public sword_create(Arg0: &mut Forge, Arg1: u64, Arg2: u64, Arg3: address, Arg4: &mut TxContext) {\nB0:\n\t0: MoveLoc[4](Arg4: &mut TxContext)\n\t1: Call[6](new_id(&mut TxContext): VersionedID)\n\t2: MoveLoc[1](Arg1: u64)\n\t3: MoveLoc[2](Arg2: u64)\n\t4: Pack[1](Sword)\n\t5: StLoc[5](loc0: Sword)\n\t6: MoveLoc[5](loc0: Sword)\n\t7: MoveLoc[3](Arg3: address)\n\t8: Call[1](transfer<Sword>(Sword, address))\n\t9: CopyLoc[0](Arg0: &mut Forge)\n\t10: ImmBorrowField[2](Forge.swords_created: u64)\n\t11: ReadRef\n\t12: LdU64(1)\n\t13: Add\n\t14: MoveLoc[0](Arg0: &mut Forge)\n\t15: MutBorrowField[2](Forge.swords_created: u64)\n\t16: WriteRef\n\t17: Ret\n}\nentry public sword_transfer(Arg0: Sword, Arg1: address) {\nB0:\n\t0: MoveLoc[0](Arg0: Sword)\n\t1: MoveLoc[1](Arg1: address)\n\t2: Call[1](transfer<Sword>(Sword, address))\n\t3: Ret\n}\npublic swords_created(Arg0: &Forge): u64 {\nB0:\n\t0: MoveLoc[0](Arg0: &Forge)\n\t1: ImmBorrowField[2](Forge.swords_created: u64)\n\t2: ReadRef\n\t3: Ret\n}\n}"
"m1": "// Move bytecode v5\nmodule f198e8dfeb788c776964b3bf7751d906ef880159.m1 {\nstruct Forge has store, key {\n\tid: VersionedID,\n\tswords_created: u64\n}\nstruct Sword has store, key {\n\tid: VersionedID,\n\tmagic: u64,\n\tstrength: u64\n}\n\ninit(Arg0: &mut TxContext) {\nB0:\n\t0: CopyLoc[0](Arg0: &mut TxContext)\n\t1: Call[6](new_id(&mut TxContext): VersionedID)\n\t2: LdU64(0)\n\t3: Pack[0](Forge)\n\t4: StLoc[1](loc0: Forge)\n\t5: MoveLoc[1](loc0: Forge)\n\t6: MoveLoc[0](Arg0: &mut TxContext)\n\t7: FreezeRef\n\t8: Call[7](sender(&TxContext): address)\n\t9: Call[0](transfer<Forge>(Forge, address))\n\t10: Ret\n}\npublic magic(Arg0: &Sword): u64 {\nB0:\n\t0: MoveLoc[0](Arg0: &Sword)\n\t1: ImmBorrowField[0](Sword.magic: u64)\n\t2: ReadRef\n\t3: Ret\n}\npublic strength(Arg0: &Sword): u64 {\nB0:\n\t0: MoveLoc[0](Arg0: &Sword)\n\t1: ImmBorrowField[1](Sword.strength: u64)\n\t2: ReadRef\n\t3: Ret\n}\nentry public sword_create(Arg0: &mut Forge, Arg1: u64, Arg2: u64, Arg3: address, Arg4: &mut TxContext) {\nB0:\n\t0: MoveLoc[4](Arg4: &mut TxContext)\n\t1: Call[6](new_id(&mut TxContext): VersionedID)\n\t2: MoveLoc[1](Arg1: u64)\n\t3: MoveLoc[2](Arg2: u64)\n\t4: Pack[1](Sword)\n\t5: StLoc[5](loc0: Sword)\n\t6: MoveLoc[5](loc0: Sword)\n\t7: MoveLoc[3](Arg3: address)\n\t8: Call[1](transfer<Sword>(Sword, address))\n\t9: CopyLoc[0](Arg0: &mut Forge)\n\t10: ImmBorrowField[2](Forge.swords_created: u64)\n\t11: ReadRef\n\t12: LdU64(1)\n\t13: Add\n\t14: MoveLoc[0](Arg0: &mut Forge)\n\t15: MutBorrowField[2](Forge.swords_created: u64)\n\t16: WriteRef\n\t17: Ret\n}\nentry public sword_transfer(Arg0: Sword, Arg1: address) {\nB0:\n\t0: MoveLoc[0](Arg0: Sword)\n\t1: MoveLoc[1](Arg1: address)\n\t2: Call[1](transfer<Sword>(Sword, address))\n\t3: Ret\n}\npublic swords_created(Arg0: &Forge): u64 {\nB0:\n\t0: MoveLoc[0](Arg0: &Forge)\n\t1: ImmBorrowField[2](Forge.swords_created: u64)\n\t2: ReadRef\n\t3: Ret\n}\n}"
}
},
"owner": "Immutable",
"previousTransaction": "xRqiBWChdmWraW0odMbbdYnC4MZ0PJ/yBPoDwKiY2+Q=",
"previousTransaction": "yuiJg/buUm+ZHgEGqCjkIYlcEwcPfYDx2tGQ+gbiNDE=",
"storageRebate": 0,
"reference": {
"objectId": "0x9da042e317a0656781ba0cecaf61f649c1ccbacd",
"objectId": "0xf198e8dfeb788c776964b3bf7751d906ef880159",
"version": 1,
"digest": "WzSC7w464TO/b3mJNN+wXrNRrEY5MY3fGhoJDG4W3pk="
"digest": "kK7Hlgmlk/idoyK4r5VcKartAamGKTzLqoCRHvnnN5M="
}
}
},
Expand All @@ -77,21 +77,21 @@
"details": {
"data": {
"dataType": "moveObject",
"type": "0xf581c6835de6ab63ee108e9b679e511a1d4d6437::hero::Hero",
"type": "0x43beee724c2ca69e9e4f30857b81c5efefd3999::hero::Hero",
"fields": {
"experience": 0,
"game_id": "0x5e84830ea1c34aac7cf749c383d3e1f544c50410",
"game_id": "0x7c17114667957d1caa3a172d2f8dbe42535bb571",
"hp": 100,
"id": {
"id": "0x876c1648dd6e6b02792e662a3fb55798be912f31",
"id": "0xe88a382c7598e92a04b79dc1d06c8c7248fa7097",
"version": 1
},
"sword": {
"type": "0xf581c6835de6ab63ee108e9b679e511a1d4d6437::hero::Sword",
"type": "0x43beee724c2ca69e9e4f30857b81c5efefd3999::hero::Sword",
"fields": {
"game_id": "0x5e84830ea1c34aac7cf749c383d3e1f544c50410",
"game_id": "0x7c17114667957d1caa3a172d2f8dbe42535bb571",
"id": {
"id": "0x0a612ecec35081f002e8f1ba8e2000b9cb73fae3",
"id": "0xcfaf71dca93bede9e8c3c9c61b1c5274675af61b",
"version": 0
},
"magic": 10,
Expand All @@ -101,14 +101,14 @@
}
},
"owner": {
"AddressOwner": "0x15090b0b58e2cffdf41f82bb79aa61d101669511"
"AddressOwner": "0x1680f5f14335ac5833b2c43173e44cdc8778eae1"
},
"previousTransaction": "jaqy0PGgFgUxrAPhLwJONJXSakmr6noURHnC/aw0f5U=",
"previousTransaction": "6cjGzIIsnzW49Ifq2JivNxJXcoMJC/klmiFawzGyiEE=",
"storageRebate": 22,
"reference": {
"objectId": "0x876c1648dd6e6b02792e662a3fb55798be912f31",
"objectId": "0xe88a382c7598e92a04b79dc1d06c8c7248fa7097",
"version": 1,
"digest": "hDDbEBB+lC+pd8/9SUZnEL0I616lKX1eHJvnmiQG1Po="
"digest": "i3iL1Uv4nb6l/SLY9XggRAliuGPqP+SzV3V5GbayOMA="
}
}
}
Expand Down
Loading

0 comments on commit bfd051d

Please sign in to comment.