Chia-Network / clvm_tools_rs

clvm_tools ported to rust based on https://github.com/Chia-Mine/clvm_tools-js/, and chialisp-21 dialect with a new compiler.
Apache License 2.0
11 stars 13 forks source link

Hex with odd digit count panics in modern compiler #93

Open richardkiss opened 4 months ago

richardkiss commented 4 months ago
% run '(mod X (include *standard-cl-23*) (logand 0xf 100))'
thread '<unnamed>' panicked at src/compiler/sexp.rs:278:35:
should convert from hex: InvalidInputLength
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "/Users/kiss/unbacked/tmp/virtualenvs/_Users_kiss_projects_chia_chialisp_stdlib_main/venv/bin/run", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/Users/kiss/unbacked/tmp/virtualenvs/_Users_kiss_projects_chia_chialisp_stdlib_main/venv/lib/python3.12/site-packages/clvm_tools/cmds.py", line 101, in run
    sys.stdout.write(bytes(clvm_tools_rs.launch_tool("run", args, 2)).decode('utf8'))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyo3_runtime.PanicException: should convert from hex: InvalidInputLength

Probably better to just prefix 0-pad0xf to 0x0f.

prozacchiwawa commented 2 months ago

thanks this is next in line: https://github.com/Chia-Network/clvm_tools_rs/pull/101 apologies for not having retired this issue earlier