Closed agran closed 6 years ago
Transaction: 752vp1Zr18jm1Xq35DyRGWs73WFya9ibEGTHqZEBicsFdoqyVspuoMBewiThUZX8LPgMTXqZZnTDaG8AoKxfNsa
Creator: QMcfbBpyGsMdXpkkMLhKv79yyF9DNeN1u7
Height: 179707
Base58: 25tJtm3KBamRSHX4NU81QWHwdp9BuwSCZv69E23xc77FuQisLREcSB8u56HutQLWGEf6TcqT7HKLpR5QapP1jHKkjujHMiXvXmqMNvQZEud3XAGF1Rkj3B7W3Y47WAxEHbAe6z6Y
Payload: {"addcomplete":{"test.txt":"this is a test text file"},"name":"QMcfbBpyGsMdXpkkMLhKv79yyF9DNeN1u7"}
Note, in the payload, how the value for "addcomplete" is another JSON object and NOT a string - which is what is expected by the QORA code in StorageUtils.java:288 (mainKey is "addcomplete"):
String addJson = (String) jsonObject.get(mainKey);
This transaction shouldn't really have made it into the blockchain due to being invalid on the above grounds. Even worse, although the exception thrown by above is caught at ArbitraryTransaction.java:235 it isn't re-thrown but simply falls through to more code that charges the creator the transaction fee before happily adding the transaction to the blockchain!
It looks like payload checking needs to be added to is_valid() for arbitrary transactions as process() is not expected to fail.
As the above transaction is "grandfathered" into the blockchain, options for allowing this transaction (e.g. when syncing from scratch) are:
Coding and testing required before this issue can be closed.
fixed with commit referenced above