Closed ukor closed 3 years ago
Can you post the hex representation of both tx1
and tx2
here?
Tx1
0100000009a1ae56879f22f544e8c29bedb361ce63d5348817769634083ccb527ca1896ab9010000009200483045022100c26acdc9b3a53e3c587fd64225b30f031bb0d2f85ae9d4b359d481aebc3fcebe0220504a238138f51d53685750c9a701323bb193c5bceb88fb6543fffe0a030f866b01475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffffee0d4fface20dbe158ba1be8d6364a31a36ba2ac3adfed8d53a52dad07843d7d010000009200483045022100e2ba6a8b7355dbbc42f05fe13e6f022003beca033a1719fb1e5beb1548f932b402203e7c7923e3027f8de5ebde4198bb009cf5d2c8ea84d51b548724015667e918c201475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff2d6258016ba19dd0230df5d5afa95e3b6ae324c10081e3045c9fdd9b7542cbfa000000009200483045022100a58477b77db46bbf00ebef186f4330990c6cb33921ebd65c772b41362a0dc816022009612f5c18a9941e2b7e5095705ae95b23a6a2bae316f50053fd1a56820fd73401475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff02de678c55fe9869de3101a8b5f4ef988f9397a15eb50099b3958b0bad63afb90000000092004830450221009667cbc998a0cb2f1e062191872d8da4ccf7d6e2abda243ce176c383d7e0a443022060b26ae9cf51d247655270454ca16c4c23e791670ad9e5e1e6015780660691bc01475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff74604fa5ff47d1be39aebc634080f48cd578a7721ce6cc725d829b6376c6b1af000000009200483045022100a4fee7ea12840a82f327c581feb0ec15d804078f2a654cd2c2006a48e366871602206e648579d73c9ffff17557089f2696111a240bd525f5cda83a3e17278c531b0401475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff650cf09c36f3bb3ba87c1e28dd52603191eca5b5e4b8b59684fe49ba57942d57010000009200483045022100fe678bd147dae771284399aa7c0c57144fd86155f76f04867e5fcb473687a170022057dcc09c4732cdabbd6e8d6e70566fa2d3f2d2441f5da12afa054703ba1c3a3201475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffffacdaf23df74b3188c6d889bf804dbaa4a90b1112c280443faa949d10be5591c5000000009200483045022100ca260c13f11071cd053fa61751945bc297919e5b490cbc6638a56f153dfb4d9002205870410f5796fd1706ca39139c73f8c237819e583db6c7f9869b5a3b9a07221801475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffffcf37cb845823cbce1b8dd39ed94ee07325078a78f23a43ea915beae157a78730000000009200483045022100cb7e9ac647fb192f3dedb03c4f44024e8e63867dd9c4ce457beebdf453c9c8d102202fc6c1b599ef88bdbd15ffcd9d580ad863334e4eb666d0b96733965f1084c02601475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffffd5299aa5046a694513db64984a97176747e867f2c2950c6d983c760c6ed720dd010000009200483045022100fa0d396f130040f43fba8edb5ed4f58d3875e81fc6564f14ffd87a77ea0f4cf7022051f53d82a111a96eddaecfd1937877b113199dc97a0c0ffdd5971d16f80be9e401475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff02102700000000000017a91441a60ddc14b7d84afd6528cd36436ed2364b4d70879d6e16000000000017a914d03723f90bb3a9533a484bf15f352501520408af8700000000
Tx2
0100000009a1ae56879f22f544e8c29bedb361ce63d5348817769634083ccb527ca1896ab9010000009200483045022100c26acdc9b3a53e3c587fd64225b30f031bb0d2f85ae9d4b359d481aebc3fcebe0220504a238138f51d53685750c9a701323bb193c5bceb88fb6543fffe0a030f866b01475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffffee0d4fface20dbe158ba1be8d6364a31a36ba2ac3adfed8d53a52dad07843d7d010000009200483045022100e2ba6a8b7355dbbc42f05fe13e6f022003beca033a1719fb1e5beb1548f932b402203e7c7923e3027f8de5ebde4198bb009cf5d2c8ea84d51b548724015667e918c201475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff2d6258016ba19dd0230df5d5afa95e3b6ae324c10081e3045c9fdd9b7542cbfa000000009200483045022100a58477b77db46bbf00ebef186f4330990c6cb33921ebd65c772b41362a0dc816022009612f5c18a9941e2b7e5095705ae95b23a6a2bae316f50053fd1a56820fd73401475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff02de678c55fe9869de3101a8b5f4ef988f9397a15eb50099b3958b0bad63afb90000000092004830450221009667cbc998a0cb2f1e062191872d8da4ccf7d6e2abda243ce176c383d7e0a443022060b26ae9cf51d247655270454ca16c4c23e791670ad9e5e1e6015780660691bc01475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff74604fa5ff47d1be39aebc634080f48cd578a7721ce6cc725d829b6376c6b1af000000009200483045022100a4fee7ea12840a82f327c581feb0ec15d804078f2a654cd2c2006a48e366871602206e648579d73c9ffff17557089f2696111a240bd525f5cda83a3e17278c531b0401475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff650cf09c36f3bb3ba87c1e28dd52603191eca5b5e4b8b59684fe49ba57942d57010000009200483045022100fe678bd147dae771284399aa7c0c57144fd86155f76f04867e5fcb473687a170022057dcc09c4732cdabbd6e8d6e70566fa2d3f2d2441f5da12afa054703ba1c3a3201475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffffacdaf23df74b3188c6d889bf804dbaa4a90b1112c280443faa949d10be5591c5000000009200483045022100ca260c13f11071cd053fa61751945bc297919e5b490cbc6638a56f153dfb4d9002205870410f5796fd1706ca39139c73f8c237819e583db6c7f9869b5a3b9a07221801475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffffcf37cb845823cbce1b8dd39ed94ee07325078a78f23a43ea915beae157a78730000000009200483045022100cb7e9ac647fb192f3dedb03c4f44024e8e63867dd9c4ce457beebdf453c9c8d102202fc6c1b599ef88bdbd15ffcd9d580ad863334e4eb666d0b96733965f1084c02601475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffffd5299aa5046a694513db64984a97176747e867f2c2950c6d983c760c6ed720dd010000009200483045022100fa0d396f130040f43fba8edb5ed4f58d3875e81fc6564f14ffd87a77ea0f4cf7022051f53d82a111a96eddaecfd1937877b113199dc97a0c0ffdd5971d16f80be9e401475221031515cbaf8c6090279d90983b88f91700a135c4f9acd97a85ca62d383bc2bd907210226dd21551162886a9743231cf103fd78b326a0089a20fc57497017947a7618de52aeffffffff02102700000000000017a91441a60ddc14b7d84afd6528cd36436ed2364b4d70879d6e16000000000017a914d03723f90bb3a9533a484bf15f352501520408af8700000000
Are they suppose to be the same thing?
I see what is happening.
Your way of using the multisig is not right.
Because you use the user private key you have set up the wallet
object from the users perspective with
wallet = MultiSigTestnet(
user_key,
[user_key.public_key, system_key.public_key],
2,
)
Then when you call wallet.create_transaction
it also signs it with the user key. However when you try to sign the transaction with the system key you must create a specific wallet object from the system's view instead of directly signing with the system key.
So:
wallet_system, = MultiSigTestnet(
system_key,
[user_key.public_key, system_key.public_key],
2,
)
wallet_system.sign_transaction(tx)
Note: I would recommend to actually create the multisig objects as
wallet_system, = MultiSigTestnet(
system_key,
(user_key.public_key, system_key.public_key=,
2,
)
so the public key list is provided as a set. This sorts them lexicograpically and you dont need to provide the correct order when recovering the multisig from the keys.
@bjarnemagnussen - Thank you so much. You are a lifesaver.
Thanks for the suggestion.
I am having an issue signing and broadcasting a transaction, I followed the solution at #81 but still no luck.
Here is my code:
After sending some testnet coins to
address
. Here is my transaction code.Transaction
I get the error
wallet.get_unspent()
returnsWhat am I doing wrong?