Closed nancyaion closed 5 years ago
The fix is to hash the AVM topics to 32 bytes hash values, in a similar way that FVM topics are generated.
org.aion.avm.core.util.HashUtils.sha256()
will be used for this purpose.
kernel commit dbf4c78e5dcbad2efef7d51f8cea33634e19b7a6
modify the unit test, as the AVM topics are now hash values, instead of the initial byte arrays
The topics filter in kernel web3 API only works with 32 bytes topic value, thus works for FVM topics as they are hash values of 32 bytes. Our current AVM topics are defined as arbitrary length byte arrays.
./beta.sh --get-all-logs -t
option only works when the AVM topic happens to be of 32 bytes length.