I’m just using the plain Erlang-functions in an Erlang shell. This is very similar to what the node does, so it isn’t very surprising that the node comes to the same conclusion {error,signature_check_failed}
…
I can’t see anything obviously wrong in the RLP code or in signTransaction
- what I can provide is the correct serialization of the unsigned transaction, i.e. binaryTx
in signTransaction
.
For the first transaction (ae_devnet) -
[249,4,155,42,1,161,1,117,238,152,37,173,99,9,99,72,43,
177,147,154,33,42,14,83,88,131,198,180,215,128,78,64,40,
126,31,85,109,162,114,1,185,3,248,249,3,245,70,2,160,
165,90,181,33,189,171,218,232,62,82,75,71,189,245,146,
67,195,247,228,114,80,28,206,170,138,74,129,187,80,240,
130,212,249,2,251,249,1,42,160,104,242,103,99,56,255,80,
136,57,171,164,119,73,239,250,139,232,126,242,132,242,7,
251,61,153,152,112,28,213,56,135,197,132,109,97,105,110,
184,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,184,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,249,1,203,160,
185,201,86,242,139,49,73,169,245,152,122,165,5,243,218,
27,34,9,204,87,57,35,64,6,43,182,193,189,159,159,153,
234,132,105,110,105,116,184,96,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,185,1,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
160,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,184,204,98,0,0,100,98,0,0,132,145,128,
128,128,81,127,185,201,86,242,139,49,73,169,245,152,122,
165,5,243,218,27,34,9,204,87,57,35,64,6,43,182,193,189,
159,159,153,234,20,98,0,0,192,87,80,128,81,127,104,242,
103,99,56,255,80,136,57,171,164,119,73,239,250,139,232,
126,242,132,242,7,251,61,153,152,112,28,213,56,135,197,
20,98,0,0,175,87,80,96,1,25,81,0,91,96,0,25,89,96,32,1,
144,129,82,96,32,144,3,96,3,129,82,144,89,96,0,81,89,82,
96,0,82,96,0,243,91,96,0,128,82,96,0,243,91,89,89,96,32,
1,144,129,82,96,32,144,3,96,0,25,89,96,32,1,144,129,82,
96,32,144,3,96,3,129,82,129,82,144,86,91,96,32,1,81,81,
89,80,128,145,80,80,128,144,80,144,86,91,80,80,130,145,
80,80,98,0,0,140,86,133,51,46,48,46,48,131,4,0,1,135,3,
231,57,183,7,104,0,130,78,32,0,0,130,3,232,132,65,144,
171,0,184,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,32,185,201,86,242,139,49,73,169,245,
152,122,165,5,243,218,27,34,9,204,87,57,35,64,6,43,182,
193,189,159,159,153,234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
And for the testnet transaction -
[249,4,156,42,1,161,1,11,180,237,121,39,249,123,81,225,
188,181,225,52,13,18,51,91,42,43,18,200,188,82,33,214,
60,75,203,57,212,30,97,130,50,130,185,3,248,249,3,245,
70,2,160,120,221,57,250,210,92,118,162,173,175,58,106,
41,161,159,237,238,240,73,205,192,69,159,225,53,40,30,
184,119,40,92,185,249,2,251,249,1,42,160,104,242,103,99,
56,255,80,136,57,171,164,119,73,239,250,139,232,126,242,
132,242,7,251,61,153,152,112,28,213,56,135,197,132,109,
97,105,110,184,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
160,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,64,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
249,1,203,160,185,201,86,242,139,49,73,169,245,152,122,
165,5,243,218,27,34,9,204,87,57,35,64,6,43,182,193,189,
159,159,153,234,132,105,110,105,116,184,96,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,3,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,185,1,64,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,160,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,3,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,184,204,98,0,0,100,98,0,0,
132,145,128,128,128,81,127,185,201,86,242,139,49,73,169,
245,152,122,165,5,243,218,27,34,9,204,87,57,35,64,6,43,
182,193,189,159,159,153,234,20,98,0,0,192,87,80,128,81,
127,104,242,103,99,56,255,80,136,57,171,164,119,73,239,
250,139,232,126,242,132,242,7,251,61,153,152,112,28,213,
56,135,197,20,98,0,0,175,87,80,96,1,25,81,0,91,96,0,25,
89,96,32,1,144,129,82,96,32,144,3,96,3,129,82,144,89,96,
0,81,89,82,96,0,82,96,0,243,91,96,0,128,82,96,0,243,91,
89,89,96,32,1,144,129,82,96,32,144,3,96,0,25,89,96,32,1,
144,129,82,96,32,144,3,96,3,129,82,129,82,144,86,91,96,
32,1,81,81,89,80,128,145,80,80,128,144,80,144,86,91,80,
80,130,145,80,80,98,0,0,140,86,133,50,46,49,46,48,131,4,
0,1,135,3,231,57,183,7,104,0,0,0,0,131,15,66,64,132,59,
154,202,0,184,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,32,185,201,86,242,139,49,73,169,
245,152,122,165,5,243,218,27,34,9,204,87,57,35,64,6,43,
182,193,189,159,159,153,234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]