Skip to content

Commit

Permalink
Add QuorumDriver
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfind committed Jun 10, 2022
1 parent a131d6b commit d477284
Show file tree
Hide file tree
Showing 14 changed files with 1,133 additions and 661 deletions.
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/sui-core/src/authority_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ where
/// At that point (and after) enough authorities are up to date with all objects
/// needed to process the certificate that a submission should succeed. However,
/// in case an authority returns an error, we do try to bring it up to speed.
async fn process_certificate(
pub async fn process_certificate(
&self,
certificate: CertifiedTransaction,
timeout_after_quorum: Duration,
Expand Down
4 changes: 4 additions & 0 deletions crates/sui-core/tests/staged/sui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,10 @@ SuiError:
UnsupportedFeatureError:
STRUCT:
- error: STR
115:
QuorumDriverCommunicationError:
STRUCT:
- error: STR
TransactionDigest:
NEWTYPESTRUCT: BYTES
TransactionEffectsDigest:
Expand Down
1 change: 1 addition & 0 deletions crates/sui-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ sui-core = { path = "../sui-core" }
sui-storage = { path = "../sui-storage" }
sui-gateway = { path = "../sui-gateway" }
sui-network = { path = "../sui-network" }
sui-quorum-driver = { path = "../sui-quorum-driver" }

telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
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": "0xd0600eeaf253af872aff58147ab7b3ecac8c1633",
"id": "0xea0356964151681dfa67122b94e4e2f3c781f3f4",
"version": 1
},
"name": "Example NFT",
"url": "ipfs://bafkreibngqhl3gaa7daob4i2vccziay2jjlp435cf66vhono7nrvww53ty"
}
},
"owner": {
"AddressOwner": "0xde7e8f2d751e3a29eb601115c3a667763154981b"
"AddressOwner": "0x3e9ddd83d2438dfe7ea72dcb557abfe6bd55c724"
},
"previousTransaction": "aP1o9K+Y/nccPj595ll82lk1wnYsmip9SUlGB7dUlHg=",
"previousTransaction": "ng2Oy/XpQ/1DET1c1Tr/50m2pFKOH3s8poEFuMKLs6Y=",
"storageRebate": 25,
"reference": {
"objectId": "0xd0600eeaf253af872aff58147ab7b3ecac8c1633",
"objectId": "0xea0356964151681dfa67122b94e4e2f3c781f3f4",
"version": 1,
"digest": "erw9tP3tOdaNCMKvM4XAOTSQy02oVivHsyDztrInXn4="
"digest": "t0FyIr7dwGW213oZLdl4ATRtFMyQWBrbGY2f2Iumbt4="
}
}
},
Expand All @@ -36,20 +36,20 @@
"fields": {
"balance": 100000,
"id": {
"id": "0x12560dfb0c81a1b8f84e7ae49d657534166e827b",
"id": "0x10b05df189e0b561d477394aaccbe9a52125011f",
"version": 0
}
}
},
"owner": {
"AddressOwner": "0xde7e8f2d751e3a29eb601115c3a667763154981b"
"AddressOwner": "0x3e9ddd83d2438dfe7ea72dcb557abfe6bd55c724"
},
"previousTransaction": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"storageRebate": 0,
"reference": {
"objectId": "0x12560dfb0c81a1b8f84e7ae49d657534166e827b",
"objectId": "0x10b05df189e0b561d477394aaccbe9a52125011f",
"version": 0,
"digest": "I7AN0gssk9Nu1bU8563JajqIAiMK8Aoj11ZqY+76uPs="
"digest": "ApW86bD0pjIlwjwGM/dKeO5BdRIRHRUb8dmWYzYk72Y="
}
}
},
Expand All @@ -59,16 +59,16 @@
"data": {
"dataType": "package",
"disassembled": {
"M1": "// Move bytecode v5\nmodule 46e286497c6a965cbcf06665fd710a50eca39dd4.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}\npublic(script) 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}\npublic(script) 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 8a7ffae681cc5eb0739741d287f27178c768a134.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}\npublic(script) 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}\npublic(script) 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": "Z1Ma9b5Ucr3Yl6hK1pybL107aMITS/FwfWOgAIUafSY=",
"previousTransaction": "ufVYBudi+Y4LjMnikwW2V9xIy0Hd4TGvpfKeIhYXAlI=",
"storageRebate": 0,
"reference": {
"objectId": "0x46e286497c6a965cbcf06665fd710a50eca39dd4",
"objectId": "0x8a7ffae681cc5eb0739741d287f27178c768a134",
"version": 1,
"digest": "ieD2/8vi1miAhCnWo+GZFkX4SbxCpEQRmlx1RpQ+cmg="
"digest": "J+F8BrMF2F8s288gzQvuU9u9+z9/gl5+8U3pLHkIzs4="
}
}
},
Expand All @@ -77,21 +77,21 @@
"details": {
"data": {
"dataType": "moveObject",
"type": "0x9e08927dec0a84063d79be6db5dc31e1ba632e04::Hero::Hero",
"type": "0xd91c0a47dcd15439c04145cb60919ee862b174ff::Hero::Hero",
"fields": {
"experience": 0,
"game_id": "0xae556790e572a8786a5a45a1a34a1338853097fc",
"game_id": "0xa474a1742cc5b09f4c20fd501bb6b1d8ac6da855",
"hp": 100,
"id": {
"id": "0x9dbaee096b32ef1b706a889383e9c4973d54f85b",
"id": "0x8104bbf1aa18b10a3f268095f104bf21b7c062d9",
"version": 1
},
"sword": {
"type": "0x9e08927dec0a84063d79be6db5dc31e1ba632e04::Hero::Sword",
"type": "0xd91c0a47dcd15439c04145cb60919ee862b174ff::Hero::Sword",
"fields": {
"game_id": "0xae556790e572a8786a5a45a1a34a1338853097fc",
"game_id": "0xa474a1742cc5b09f4c20fd501bb6b1d8ac6da855",
"id": {
"id": "0x75105e77236b46af9c127985bc0fb7345dc92e0c",
"id": "0xdae58b4ecd9b00aaa21bce4df3525d877fee98be",
"version": 0
},
"magic": 10,
Expand All @@ -101,14 +101,14 @@
}
},
"owner": {
"AddressOwner": "0xde7e8f2d751e3a29eb601115c3a667763154981b"
"AddressOwner": "0x3e9ddd83d2438dfe7ea72dcb557abfe6bd55c724"
},
"previousTransaction": "9YqDK9rPEEmSjjn4BawtooMaRCLmVgS98vNZa83YXWE=",
"previousTransaction": "aLPGIJTcKmwQgEkiXIK+DsjG1F36Z3W63SsYaCichnw=",
"storageRebate": 22,
"reference": {
"objectId": "0x9dbaee096b32ef1b706a889383e9c4973d54f85b",
"objectId": "0x8104bbf1aa18b10a3f268095f104bf21b7c062d9",
"version": 1,
"digest": "Phsdj2jYlt48gxXeZa076wfzLy8W1+AAKdhYH2xWr8M="
"digest": "8lmIDe5tR4RP+fTQvr1Ze9xNu7yylTlrgvsJB6BI8Vo="
}
}
}
Expand Down
Loading

0 comments on commit d477284

Please sign in to comment.