Closed micmac0 closed 4 years ago
Thank you for the issue. Please let me know whether you make every call through the same node (yours one?). Also, is it possible to reproduce the experiment and supply me not only with executor logs but with your node logs to. Before perform experiment please add special parameter to config.ini file in your node folder: [params] always_execute_contracts=true
Please let me know whether you make every call through the same node (yours one?)
Yes smartcontract transactions were all sent to same node (mine). Will redo the test as you describe later (i think tonight CEST time) when I will get free time for it.
Thank you in advance, please do not forget add parameter to config to get more info in node's log
here client node again to help with timestamp that should be about but not exactly the same as node ones :
17-06-2019 21:01:10.777 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - ---> address = 5rcykeiGiP7V2tjxqFCoduG6qvpbr8hUsgwLafeL9EXP
17-06-2019 21:01:10.778 c.c.c.n.util.NodeClientUtils.logApiResponse - <--- resultCode = 0; resultMessage = Success
17-06-2019 21:01:10.778 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - <--- smart contract hashState =
17-06-2019 21:01:10.783 o.c.l.l.DoSendSmartContractThread.doSend - send transaction
17-06-2019 21:01:17.145 o.c.l.l.DoSendSmartContractThread.doSend - Thread : 37 : Success 8B29000000005ABA249D3F2E8EDE4BA73129D1F31E93F1D6FB6E988E5842D6F6F8161BA6B0854824E36BACA0FA7C179BE15F031357E37A3E83490393E624E59F4A6400352E46000000000000000000000000FF4F0101440300000B00010000000A696E63436F756E7465720F00020C000000000F00030B00000000020004000C00050B0001000000FA696D706F727420636F6D2E637265646974732E73636170692E616E6E6F746174696F6E732E2A3B0A696D706F727420636F6D2E637265646974732E73636170692E76302E2A3B0A0A7075626C696320636C61737320546573743120657874656E647320536D617274436F6E7472616374207B0A207072697661746520496E746567657220636F756E7465723B0A207075626C69632054657374312829207B0A20636F756E7465723D303B0A207D0A200A207075626C696320537472696E6720696E63436F756E7465722829207B0A20636F756E7465722B2B3B0A2072657475726E20636F756E7465722E746F537472696E6728293B0A207D0A7D0F00020C000000010B00010000000554657374310B0002000001EFCAFEBABE0000003700200A000700120A0013001409000600150A001300160A00130017070018070019010007636F756E7465720100134C6A6176612F6C616E672F496E74656765723B0100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C6501000A696E63436F756E74657201001428294C6A6176612F6C616E672F537472696E673B01000A536F7572636546696C6501000A54657374312E6A6176610C000A000B07001A0C001B001C0C000800090C001D001E0C001F000F0100055465737431010022636F6D2F637265646974732F73636170692F76302F536D617274436F6E74726163740100116A6176612F6C616E672F496E746567657201000776616C75654F660100162849294C6A6176612F6C616E672F496E74656765723B010008696E7456616C7565010003282949010008746F537472696E6700210006000700000001000200080009000000020001000A000B0001000C0000002D000200010000000D2AB700012A03B80002B50003B100000001000D0000000E00030000000600040007000C00080001000E000F0001000C0000003D00030003000000212AB400034C2A2AB40003B600040460B800025AB500034D2B572AB40003B60005B000000001000D0000000A00020000000B0019000C00010010000000020011000B000300000000080004000000000000
Result from smartcontract : <Variant v_string:167>
17-06-2019 21:01:17.145 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - ---> address = 5rcykeiGiP7V2tjxqFCoduG6qvpbr8hUsgwLafeL9EXP
17-06-2019 21:01:17.146 c.c.c.n.util.NodeClientUtils.logApiResponse - <--- resultCode = 0; resultMessage = Success
17-06-2019 21:01:17.146 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - <--- smart contract hashState =
17-06-2019 21:01:17.150 o.c.l.l.DoSendSmartContractThread.doSend - send transaction
17-06-2019 21:01:22.096 o.c.l.l.DoSendSmartContractThread.doSend - Thread : 36 : Success 510000000000223A02FFD91ED99BFB42613F0CF780BF046481D6ED58CD8A7F66FECC2536847C4824E36BACA0FA7C179BE15F031357E37A3E83490393E624E59F4A6400352E46000000000000000000000000FF4F0101440300000B00010000000A696E63436F756E7465720F00020C000000000F00030B00000000020004000C00050B0001000000FA696D706F727420636F6D2E637265646974732E73636170692E616E6E6F746174696F6E732E2A3B0A696D706F727420636F6D2E637265646974732E73636170692E76302E2A3B0A0A7075626C696320636C61737320546573743120657874656E647320536D617274436F6E7472616374207B0A207072697661746520496E746567657220636F756E7465723B0A207075626C69632054657374312829207B0A20636F756E7465723D303B0A207D0A200A207075626C696320537472696E6720696E63436F756E7465722829207B0A20636F756E7465722B2B3B0A2072657475726E20636F756E7465722E746F537472696E6728293B0A207D0A7D0F00020C000000010B00010000000554657374310B0002000001EFCAFEBABE0000003700200A000700120A0013001409000600150A001300160A00130017070018070019010007636F756E7465720100134C6A6176612F6C616E672F496E74656765723B0100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C6501000A696E63436F756E74657201001428294C6A6176612F6C616E672F537472696E673B01000A536F7572636546696C6501000A54657374312E6A6176610C000A000B07001A0C001B001C0C000800090C001D001E0C001F000F0100055465737431010022636F6D2F637265646974732F73636170692F76302F536D617274436F6E74726163740100116A6176612F6C616E672F496E746567657201000776616C75654F660100162849294C6A6176612F6C616E672F496E74656765723B010008696E7456616C7565010003282949010008746F537472696E6700210006000700000001000200080009000000020001000A000B0001000C0000002D000200010000000D2AB700012A03B80002B50003B100000001000D0000000E00030000000600040007000C00080001000E000F0001000C0000003D00030003000000212AB400034C2A2AB40003B600040460B800025AB500034D2B572AB40003B60005B000000001000D0000000A00020000000B0019000C00010010000000020011000B000300000000080004000000000000
Result from smartcontract : <Variant v_string:167>
17-06-2019 21:01:22.096 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - ---> address = 5rcykeiGiP7V2tjxqFCoduG6qvpbr8hUsgwLafeL9EXP
17-06-2019 21:01:22.097 c.c.c.n.util.NodeClientUtils.logApiResponse - <--- resultCode = 0; resultMessage = Success
17-06-2019 21:01:22.097 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - <--- smart contract hashState =
17-06-2019 21:01:22.101 o.c.l.l.DoSendSmartContractThread.doSend - send transaction
17-06-2019 21:01:29.435 o.c.l.l.DoSendSmartContractThread.doSend - Thread : 38 : Success 812900000000A83154187EF6A74929E8F2DA9CC5AE90AEB2F65873CDFCB4E5CABCA92647481A4824E36BACA0FA7C179BE15F031357E37A3E83490393E624E59F4A6400352E46000000000000000000000000FF4F0101440300000B00010000000A696E63436F756E7465720F00020C000000000F00030B00000000020004000C00050B0001000000FA696D706F727420636F6D2E637265646974732E73636170692E616E6E6F746174696F6E732E2A3B0A696D706F727420636F6D2E637265646974732E73636170692E76302E2A3B0A0A7075626C696320636C61737320546573743120657874656E647320536D617274436F6E7472616374207B0A207072697661746520496E746567657220636F756E7465723B0A207075626C69632054657374312829207B0A20636F756E7465723D303B0A207D0A200A207075626C696320537472696E6720696E63436F756E7465722829207B0A20636F756E7465722B2B3B0A2072657475726E20636F756E7465722E746F537472696E6728293B0A207D0A7D0F00020C000000010B00010000000554657374310B0002000001EFCAFEBABE0000003700200A000700120A0013001409000600150A001300160A00130017070018070019010007636F756E7465720100134C6A6176612F6C616E672F496E74656765723B0100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C6501000A696E63436F756E74657201001428294C6A6176612F6C616E672F537472696E673B01000A536F7572636546696C6501000A54657374312E6A6176610C000A000B07001A0C001B001C0C000800090C001D001E0C001F000F0100055465737431010022636F6D2F637265646974732F73636170692F76302F536D617274436F6E74726163740100116A6176612F6C616E672F496E746567657201000776616C75654F660100162849294C6A6176612F6C616E672F496E74656765723B010008696E7456616C7565010003282949010008746F537472696E6700210006000700000001000200080009000000020001000A000B0001000C0000002D000200010000000D2AB700012A03B80002B50003B100000001000D0000000E00030000000600040007000C00080001000E000F0001000C0000003D00030003000000212AB400034C2A2AB40003B600040460B800025AB500034D2B572AB40003B60005B000000001000D0000000A00020000000B0019000C00010010000000020011000B000300000000080004000000000000
Result from smartcontract : <Variant v_string:168>
17-06-2019 21:01:29.436 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - ---> address = 5rcykeiGiP7V2tjxqFCoduG6qvpbr8hUsgwLafeL9EXP
17-06-2019 21:01:29.437 c.c.c.n.util.NodeClientUtils.logApiResponse - <--- resultCode = 0; resultMessage = Success
17-06-2019 21:01:29.438 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - <--- smart contract hashState =
17-06-2019 21:01:29.446 o.c.l.l.DoSendSmartContractThread.doSend - send transaction
17-06-2019 21:01:34.169 o.c.l.l.DoSendSmartContractThread.doSend - Thread : 37 : Success 8C29000000005ABA249D3F2E8EDE4BA73129D1F31E93F1D6FB6E988E5842D6F6F8161BA6B0854824E36BACA0FA7C179BE15F031357E37A3E83490393E624E59F4A6400352E46000000000000000000000000FF4F0101440300000B00010000000A696E63436F756E7465720F00020C000000000F00030B00000000020004000C00050B0001000000FA696D706F727420636F6D2E637265646974732E73636170692E616E6E6F746174696F6E732E2A3B0A696D706F727420636F6D2E637265646974732E73636170692E76302E2A3B0A0A7075626C696320636C61737320546573743120657874656E647320536D617274436F6E7472616374207B0A207072697661746520496E746567657220636F756E7465723B0A207075626C69632054657374312829207B0A20636F756E7465723D303B0A207D0A200A207075626C696320537472696E6720696E63436F756E7465722829207B0A20636F756E7465722B2B3B0A2072657475726E20636F756E7465722E746F537472696E6728293B0A207D0A7D0F00020C000000010B00010000000554657374310B0002000001EFCAFEBABE0000003700200A000700120A0013001409000600150A001300160A00130017070018070019010007636F756E7465720100134C6A6176612F6C616E672F496E74656765723B0100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C6501000A696E63436F756E74657201001428294C6A6176612F6C616E672F537472696E673B01000A536F7572636546696C6501000A54657374312E6A6176610C000A000B07001A0C001B001C0C000800090C001D001E0C001F000F0100055465737431010022636F6D2F637265646974732F73636170692F76302F536D617274436F6E74726163740100116A6176612F6C616E672F496E746567657201000776616C75654F660100162849294C6A6176612F6C616E672F496E74656765723B010008696E7456616C7565010003282949010008746F537472696E6700210006000700000001000200080009000000020001000A000B0001000C0000002D000200010000000D2AB700012A03B80002B50003B100000001000D0000000E00030000000600040007000C00080001000E000F0001000C0000003D00030003000000212AB400034C2A2AB40003B600040460B800025AB500034D2B572AB40003B60005B000000001000D0000000A00020000000B0019000C00010010000000020011000B000300000000080004000000000000
Result from smartcontract : <Variant v_string:168>
17-06-2019 21:01:34.169 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - ---> address = 5rcykeiGiP7V2tjxqFCoduG6qvpbr8hUsgwLafeL9EXP
17-06-2019 21:01:34.170 c.c.c.n.util.NodeClientUtils.logApiResponse - <--- resultCode = 0; resultMessage = Success
17-06-2019 21:01:34.171 c.c.c.n.s.NodeApiServiceImpl.getSmartContract - <--- smart contract hashState =
17-06-2019 21:01:34.173 o.c.l.l.DoSendSmartContractThread.doSend - send transaction
17-06-2019 21:01:43.472 o.c.l.l.DoSendSmartContractThread.doSend - Thread : 36 : Success 520000000000223A02FFD91ED99BFB42613F0CF780BF046481D6ED58CD8A7F66FECC2536847C4824E36BACA0FA7C179BE15F031357E37A3E83490393E624E59F4A6400352E46000000000000000000000000FF4F0101440300000B00010000000A696E63436F756E7465720F00020C000000000F00030B00000000020004000C00050B0001000000FA696D706F727420636F6D2E637265646974732E73636170692E616E6E6F746174696F6E732E2A3B0A696D706F727420636F6D2E637265646974732E73636170692E76302E2A3B0A0A7075626C696320636C61737320546573743120657874656E647320536D617274436F6E7472616374207B0A207072697661746520496E746567657220636F756E7465723B0A207075626C69632054657374312829207B0A20636F756E7465723D303B0A207D0A200A207075626C696320537472696E6720696E63436F756E7465722829207B0A20636F756E7465722B2B3B0A2072657475726E20636F756E7465722E746F537472696E6728293B0A207D0A7D0F00020C000000010B00010000000554657374310B0002000001EFCAFEBABE0000003700200A000700120A0013001409000600150A001300160A00130017070018070019010007636F756E7465720100134C6A6176612F6C616E672F496E74656765723B0100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C6501000A696E63436F756E74657201001428294C6A6176612F6C616E672F537472696E673B01000A536F7572636546696C6501000A54657374312E6A6176610C000A000B07001A0C001B001C0C000800090C001D001E0C001F000F0100055465737431010022636F6D2F637265646974732F73636170692F76302F536D617274436F6E74726163740100116A6176612F6C616E672F496E746567657201000776616C75654F660100162849294C6A6176612F6C616E672F496E74656765723B010008696E7456616C7565010003282949010008746F537472696E6700210006000700000001000200080009000000020001000A000B0001000C0000002D000200010000000D2AB700012A03B80002B50003B100000001000D0000000E00030000000600040007000C00080001000E000F0001000C0000003D00030003000000212AB400034C2A2AB40003B600040460B800025AB500034D2B572AB40003B60005B000000001000D0000000A00020000000B0019000C00010010000000020011000B000300000000080004000000000000
Result from smartcontract : <Variant v_string:169>
and here are node logs log_ConcurentCounter.tar.gz
also I had 2 times in client 167 as result but I don t get them in contract executor.
I test it with some previous versions and it looked ok but i wanted to check again newer versions, i did new test with 435 and it looks really ok. I made a loop with 5/thread 5wallets that call at same time same method and all result where uniq and OK. It looks thread safe now. Well done !
Describe the bug When called and modified by many initiator at same time, the state of smartcontract may not be updated correctly.
check these transactions: https://monitor.credits.com/testnet-r4_2/transaction/29bc23183a8ce88d41ca2548070f5636cf34a482c831d0842dafb4412017e5f7.1
https://monitor.credits.com/testnet-r4_2/transaction/39988bdcf246072a9bcb5a3fdb4d8a1084d3b8b62ae8810dbcb77f478ee5e1e7.1
To Reproduce I created a smartcontract there, this is just a call counter. https://monitor.credits.com/testnet-r4_2/Contract/5rcykeiGiP7V2tjxqFCoduG6qvpbr8hUsgwLafeL9EXP
I created a client that call same smartcontract from 3 initiators address from 3 differents threads. Then I loop N times to check if all return value are OK. For some times returned values where all uniq but for some few call state and call result was the same for two initators. That means that the counter do not work properly.
Here is my client log :
we can see duplicate results with lines containg (Result from smartcontract) : 67, 68,69 ,70,73,74,75
Expected behavior Concurent access policy should be added here ?