The PR mainly adds the test cases for the group transaction support. If all the test cases pass, then it could be considered that tealer has the basic support for group transactions. Note: All the test cases are not enabled. Test cases will be enabled progressively with the support for different patterns.
tests/group_transactions/basic/logicsig_1.py lists all the test cases.
tests/group_transactions/* contains a basic framework to write tests using the group configuration. To add a test, one would write the group configuration for the protocol and write the expected_output.yaml file. The expected_output.yaml file lists all the vulnerable operations that should be reported by the detector(s).
The config file structure is updated to include the name of the "operation" the group transaction performs.
A new output format GroupTransactionOutput is implemented to represent reported output when analyzing a group by the detectors. The output contains the group, a list of transactions in the group that are vulnerable, and for each transaction list of vulnerable contracts.
The command line handler is updated to run detectors on the config. Previously, the tealer would ignore the detectors, printers when the group_config is given. It is now updated to run the detectors and generate the output.
The PR mainly adds the test cases for the group transaction support. If all the test cases pass, then it could be considered that tealer has the basic support for group transactions. Note: All the test cases are not enabled. Test cases will be enabled progressively with the support for different patterns.
tests/group_transactions/basic/logicsig_1.py
lists all the test cases.tests/group_transactions/*
contains a basic framework to write tests using the group configuration. To add a test, one would write the group configuration for the protocol and write theexpected_output.yaml
file. Theexpected_output.yaml
file lists all the vulnerable operations that should be reported by the detector(s).The config file structure is updated to include the name of the "operation" the group transaction performs.
A new output format
GroupTransactionOutput
is implemented to represent reported output when analyzing a group by the detectors. The output contains thegroup
, a list oftransactions
in the group that are vulnerable, and for each transaction list of vulnerable contracts.The command line handler is updated to run detectors on the config. Previously, the tealer would ignore the detectors, printers when the group_config is given. It is now updated to run the detectors and generate the output.
Sample output: