Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • blockchains/bitcoin/symbolic_execution
1 result
Show changes
Commits on Source (2)
FROM ubuntu:22.04 as build
# Install jq from source
WORKDIR /btc_symbolic
RUN apt update
RUN apt upgrade -y
RUN apt install -y python3 pip
# Necessary to support RIPEMD-160 hashes: see https://github.com/ofek/bit/issues/168
RUN sed -i 's/default = default_sect/default = default_sect\nlegacy = legacy_sect/g' /usr/lib/ssl/openssl.cnf
RUN sed -i 's/# activate = 1/activate = 1\n\n[legacy_sect]\nactivate = 1/g' /usr/lib/ssl/openssl.cnf
COPY . .
RUN pip install -r requirements.txt
ENTRYPOINT ["python3", "-m", "unittest", "discover", "tests"]
\ No newline at end of file
.PHONY: all tests
.PHONY: all docker_image tests
all: tests
all: docker_image tests
docker_image:
docker build -t btc_symbolic_executer .
tests:
python -m unittest discover tests
\ No newline at end of file
docker run --name btc_symbolic_executer_tests btc_symbolic_executer
docker rm btc_symbolic_executer_tests
\ No newline at end of file
# symbolic_execution
A symbolic executor
# Chaussette: A symbolic execution tool for Bitcoin scripts
A symbolic executor for Bitcoin scripts.
Please refer to the [official paper](https://orbi.uliege.be/handle/2268/305862) for an overview of the tool and results obtained with it.
## Run the tool on the preconfigures tests
The best way to start playing with the tool is probably to look at the tests located at [tests/language/bitcoin/test_parser.py](tests/language/bitcoin/test_parser.py).
Once [Docker](https://docs.docker.com/engine/install/) is installed, those tests can easily be run with the following command:
```
make
```
More information on make is available at [gnu.org](https://www.gnu.org/software/make/).
This prior command will take care of generating a container with all the necessary libraries to run the code.
Our tool is known to have a very low rate of false positives and negatives (refer to the paper), but still contain some. Some tests which are currently encoded are expected to fail. Currently, I haven't plan to fix those errors.
![failed_tests_screenshot](pics/failed_tests_screenshot.png)
\ No newline at end of file
pics/failed_tests_screenshot.png

39.8 KiB

numpy==1.26.4
pyparsing==3.1.2
z3-solver==4.13.0.0
\ No newline at end of file