diff --git a/Cargo.lock b/Cargo.lock index 70af459..b429931 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -624,7 +624,7 @@ dependencies = [ [[package]] name = "n3on-diff" -version = "0.1.0" +version = "0.2.0" dependencies = [ "base64", "clap", diff --git a/Cargo.toml b/Cargo.toml index 416beeb..fe206c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "n3on-diff" -version = "0.1.0" +version = "0.2.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index 0b4926e..91eb759 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,13 @@ Instead, find `*.metadata` files, where outputs for both VMs are saved and encod ## Issues Found -In case you found new VM bugs using this fuzzer, __please__ make an issue and add the link here! +In case you find new VM bugs using this fuzzer, __please__ make an issue and add the link here! -- [MODMUL operation returns wrong results for negative numbers](https://github.com/nspcc-dev/neo-go/issues/3598) -- [MODPOW operation returns wrong results when base is negative](https://github.com/nspcc-dev/neo-go/issues/3612) -- [PACKMAP operation keeps duplicate entries](https://github.com/nspcc-dev/neo-go/issues/3613) +| Name | Description | Link | +| ------------------------------------------------------------ | ------------------------------------ | ------------------------------------------------------- | +| MODMUL operation returns wrong results for negative numbers | [Description](./bugs/neo-go-3598.md) | [Link](https://github.com/nspcc-dev/neo-go/issues/3598) | +| MODPOW operation returns wrong results when base is negative | [Description](./bugs/neo-go-3612.md) | [Link](https://github.com/nspcc-dev/neo-go/issues/3612) | +| PACKMAP operation keeps duplicate entries | [Description](./bugs/neo-go-3613.md) | [Link](https://github.com/nspcc-dev/neo-go/issues/3613) | ## License diff --git a/bugs/neo-go-3598.md b/bugs/neo-go-3598.md new file mode 100644 index 0000000..bbce734 --- /dev/null +++ b/bugs/neo-go-3598.md @@ -0,0 +1,29 @@ +# MODMUL operation returns wrong results for negative numbers + +## Minimal case + +```text +AGQA/wClpQ== +``` + +## What is wrong + +For negative numbers MODMUL operation returns wrong results. + +```text +100 * -1 % -91 == 82 +``` + +![image](./neo-go-3598.png) + +## Expected behavior + +C# (neo) results: + +```text +100 * -1 % -91 == -9 +``` + +## Extra info + +Relevant for Commit (neo-go): `c960a7eb4799ffa1cf8a5428a91d9fb2c86ac69e` diff --git a/bugs/neo-go-3598.png b/bugs/neo-go-3598.png new file mode 100644 index 0000000..cd9eb66 Binary files /dev/null and b/bugs/neo-go-3598.png differ diff --git a/bugs/neo-go-3612.md b/bugs/neo-go-3612.md new file mode 100644 index 0000000..e264883 --- /dev/null +++ b/bugs/neo-go-3612.md @@ -0,0 +1,29 @@ +# MODPOW operation returns wrong results for negative numbers + +## Minimal case + +```text +DxMTpg== +``` + +## What is wrong + +For negative base MODPOW operation returns wrong results. + +```text +(-1 ^ 3) % 3 == 2 +``` + +![image](./neo-go-3612.png) + +## Expected behavior + +C# (neo) results: + +```text +(-1 ^ 3) % 3 == -1 +``` + +## Extra info + +Relevant for Commit (neo-go): `a9242535db757faba860e21c194033f30c679f48` diff --git a/bugs/neo-go-3612.png b/bugs/neo-go-3612.png new file mode 100644 index 0000000..a11db27 Binary files /dev/null and b/bugs/neo-go-3612.png differ diff --git a/bugs/neo-go-3613.md b/bugs/neo-go-3613.md new file mode 100644 index 0000000..ded2245 --- /dev/null +++ b/bugs/neo-go-3613.md @@ -0,0 +1,71 @@ +# PACKMAP operation keeps duplicate entries + +## Minimal case + +```text +ERERERK+ +``` + +## What is wrong + +PACKMAP operations keeps duplicate keys (and entries). + +```json +[ + { + "type": "Map", + "value": [ + { + "key": { + "type": "Integer", + "value": "1" + }, + "value": { + "type": "Integer", + "value": "1" + } + }, + { + "key": { + "type": "Integer", + "value": "1" + }, + "value": { + "type": "Integer", + "value": "1" + } + } + ] + } +] +``` + +![image](./neo-go-3613.png) + +## Expected behavior + +C# (neo) results: + +```json +[ + { + "type": "Map", + "value": [ + { + "key": { + "type": "Integer", + "value": "1" + }, + "value": { + "type": "Integer", + "value": "1" + } + } + ] + } +] +``` + +## Extra info + +Relevant for Commit (neo-go): `a9242535db757faba860e21c194033f30c679f48` diff --git a/bugs/neo-go-3613.png b/bugs/neo-go-3613.png new file mode 100644 index 0000000..20ee8b5 Binary files /dev/null and b/bugs/neo-go-3613.png differ