@hanssv.chain I made all required changes and now we provide an easy selection between FATE
and AEVM
in our SDK.
with AEVM
we have no problems. when using FATE
then the dryRun is failing for the payAndSplit
-function. (Internal Server Error)
the dryRun for the init
-function works without any problems.
this seems to be a problem in the implementation of the core-protocol I think. will look into the debug-log and hopefully find more information about the problem.
edit
here the error-log of the node. I hope this is related to the dryRun for the payAndSplit-function:
2019-10-06 14:02:08.774 [error] <0.5465.1>@aec_trees:apply_txs_on_state_trees:607 Tx {aetx,contract_call_tx,aect_call_tx,109,{contract_call_tx,{id,account,<<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>>},2,{id,contract,<<62,44,231,91,214,95,57,42,226,167,63,31,25,1,27,108,118,168,104,112,152,92,209,4,53,78,77,169,17,129,176,177>>},3,452180000000000,0,1000000000000000000,1579000,1000000000,<<43,17,245,174,169,217,63>>,[],<<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>>}} cannot be applied due to an error {error,{badmatch,{es,void,[],#{0 => [{'PUSH',{immediate,0}},{'BALANCE',{stack,0}},{'GT',{stack,0},{stack,0},{stack,0}},{'JUMPIF',{stack,0},{immediate,4}}],1 => [{'PUSH',{immediate,<<"contract didn't receive any payment">>}},{'ABORT',{stack,0}}],2 => [{'STORE',{var,9999},{stack,0}},{'ELEMENT',{stack,0},{immediate,1},{var,-1}},{'MAP_TO_LIST',{var,1},{stack,0}},{'ELEMENT',{stack,0},{immediate,2},{var,-1}},{'BALANCE',{stack,0}},{'ADD',{stack,0},{stack,0},{stack,0}},{'PUSH',{var,-1}},{'SETELEMENT',{stack,0},{immediate,2},{stack,0},{stack,0}},{'STORE',{var,-1},{stack,0}},{'BALANCE',{stack,0}},{'PUSH',{var,1}},{'CALL',{immediate,<<48,129,120,71>>}}],3 => [{'STORE',{var,9999},{stack,0}},{'CALLER',{stack,0}},{'CALL_VALUE',{stack,0}},{'BALANCE',{stack,0}},{'VARIANT',{stack,0},{immediate,[0,2,2,0,3]},{immediate,4},{immediate,3}},{'CALL_T',{immediate,<<101,165,224,15>>}}],4 => [{'PUSH',{immediate,{tuple,{}}}},{'JUMP',{immediate,2}}]},[],{address,<<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>>},1000000000000000000,{state,{state,{trees,{mpt,<<171,228,5,15,89,141,152,193,101,156,117,113,162,178,91,110,54,52,159,46,19,34,192,133,31,198,187,103,190,49,4,48>>,{db,accounts,{gb_trees,{6,{<<117,136,145,167,177,0,60,195,178,67,231,39,105,236,45,30,70,137,18,208,152,213,107,232,95,253,233,255,72,9,210,169>>,[<<48,0,0,0,0,0,0,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>>,<<205,10,1,0,137,54,53,201,173,197,222,160,0,0>>],{<<76,143,150,212,192,14,37,167,216,214,98,59,47,140,151,175,190,28,43,95,35,188,196,210,230,109,18,87,182,79,154,198>>,[<<117,136,145,167,177,0,60,195,178,67,231,39,105,236,45,30,70,137,18,208,152,213,107,232,95,253,233,255,72,9,210,169>>,<<>>,<<>>,<<206,6,103,203,1,140,194,39,195,15,159,222,218,167,21,216,239,251,15,116,4,47,120,248,242,174,10,199,1,239,42,155>>,<<>>,<<>>,<<>>,<<194,185,119,83,16,122,56,160,194,30,34,5,112,247,64,40,84,60,24,86,25,12,136,207,154,162,176,127,14,119,222,166>>,<<>>,<<>>,<<>>,<<>>,<<>>,<<>>,<<>>,<<>>,<<>>],{<<42,145,88,134,154,134,84,70,138,13,167,218,43,216,79,207,241,241,224,38,204,66,67,162,14,228,244,111,33,172,202,181>>,[<<53,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>>,<<210,10,1,2,142,4,238,45,109,65,91,133,165,71,57,120,226,36,0>>],nil,nil},nil},{<<196,236,139,84,213,10,252,221,235,68,7,110,56,191,2,91,204,167,133,153,157,129,30,107,145,207,87,3,179,23,30,145>>,[<<117,136,145,167,177,0,60,195,178,67,231,39,105,236,45,30,70,137,18,208,152,213,107,232,95,253,233,255,72,9,210,169>>,<<>>,<<>>,<<206,6,103,203,1,140,194,39,195,15,159,222,218,167,21,216,239,251,15,116,4,47,120,248,242,174,10,199,1,239,42,155>>,<<>>,<<>>,<<>>,<<42,145,88,134,154,134,84,70,138,13,167,218,43,216,79,207,241,241,224,38,204,66,67,162,14,228,244,111,33,172,202,181>>,<<>>,<<>>,<<>>,<<>>,<<>>,<<>>,<<>>,<<>>,<<>>],{<<145,157,68,129,85,57,130,68,39,17,179,160,136,125,125,130,254,150,3,14,14,158,214,1,209,43,35,133,248,215,254,178>>,[<<62,44,231,91,214,95,57,42,226,167,63,31,25,1,27,108,118,168,104,112,152,92,209,4,53,78,77,169,17,129,176,177>>,<<204,10,1,0,136,13,224,182,179,167,100,0,0>>],nil,{<<171,228,5,15,89,141,152,193,101,156,117,113,162,178,91,110,54,52,159,46,19,34,192,133,31,198,187,103,190,49,4,48>>,[<<117,136,145,167,177,0,60,195,178,67,231,39,105,236,45,30,70,137,18,208,152,213,107,232,95,253,233,255,72,9,210,169>>,<<>>,<<>>,<<145,157,68,129,85,57,130,68,39,17,179,160,136,125,125,130,254,...>>,...],...}},...}}}},...}},...},...},...},...}}}
2019-10-06 14:02:08.775 [error] <0.5465.1>@lists:thing_to_list:603 CRASH REPORT Process <0.5465.1> with 0 neighbours crashed with reason: no function clause matching lists:thing_to_list({error,{badmatch,{es,void,[],#{0 => [{'PUSH',{immediate,0}},{'BALANCE',{stack,0}},{'GT',{stack,...},...},...],...},...}}}) line 603
2019-10-06 14:02:08.775 [error] <0.5465.1>@lists:thing_to_list:603 Cowboy stream 1 with ranch listener internal and connection process <0.5464.1> had its request process exit with reason: no function clause matching lists:thing_to_list({error,{badmatch,{es,void,[],#{0 => [{'PUSH',{immediate,0}},{'BALANCE',{stack,0}},{'GT',{stack,...},...},...],...},...}}}) line 603
we are using this version of the PaymentSplitter contract:
the node-version we are running against is v5.0.0-rc.3