[CERES] compiler crashing when using Chain.network_id #477

Closed
opened 2023-08-03 17:04:22 +09:00 by zxq9 · 1 comment
zxq9 commented 2023-08-03 17:04:22 +09:00 (Migrated from gitlab.com)

Created by: marc0olo

I am currently "playing around" with the compiler that enables Ceres features. I have built the aesophia_http image which I have published here:

as the new AENSv2 namespace capability is working using this self-built image, I assume that I have done everything right. it was built using ref to aesophia commit 1538af79edfb55f67b8de801842f44f4c0476d6a, which should include that feature already.

example to reproduce

include "String.aes"

main contract NetworkIdCrash =

    stateful entrypoint provide_delegation_sig(delegation_sig: signature) : unit =
        let expected_msg = String.concats([Chain.network_id, Address.to_str(Call.caller), "AENS", Address.to_str(Contract.address)])
        require(Crypto.verify_sig(Crypto.blake2b(expected_msg), Call.caller, delegation_sig), "INVALID_DELEGATION_SIGNATURE")
        ()

displayed error

CompilerError: compile error:
data_error:0:0: Compiler crashed, with reason: undef
[{aeb_fate_ops,network_id,[{stack,0}],[]},
 {aeso_fcode_to_fate,builtin_to_scode,3,
                     [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"},
                      {line,572}]},
 {aeso_fcode_to_fate,to_scode1,2,
                     [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"},
                      {line,372}]},
 {aeso_fcode_to_fate,'-call_to_scode/3-lc$^0/1-0-',2,
                     [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"},
                      {line,522}]},
 {aeso_fcode_to_fate,'-call_to_scode/3-lc$^0/1-0-',2,
                     [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"},
                      {line,522}]},
 {aeso_fcode_to_fate,call_to_scode,3,
                     [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"},
                      {line,522}]},
 {aeso_fcode_to_fate,to_scode1,2,
                     [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"},
                      {line,333}]},
 {aeso_fcode_to_fate,'-call_to_scode/3-lc$^0/1-0-',2,
                     [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"},
                      {line,522}]}]
*Created by: marc0olo* I am currently "playing around" with the compiler that enables Ceres features. I have built the `aesophia_http` image which I have published here: - https://hub.docker.com/layers/marc0olo/aesophia_http/7.4.0-ceres/images/sha256-499268c37c60c71ca87c38ac39bb77a7b95f9281d28be0b33755e790aeb051d9?context=repo as the new `AENSv2` namespace capability is working using this self-built image, I assume that I have done everything right. it was built using ref to aesophia commit `1538af79edfb55f67b8de801842f44f4c0476d6a`, which should include that feature already. # example to reproduce ``` include "String.aes" main contract NetworkIdCrash = stateful entrypoint provide_delegation_sig(delegation_sig: signature) : unit = let expected_msg = String.concats([Chain.network_id, Address.to_str(Call.caller), "AENS", Address.to_str(Contract.address)]) require(Crypto.verify_sig(Crypto.blake2b(expected_msg), Call.caller, delegation_sig), "INVALID_DELEGATION_SIGNATURE") () ``` # displayed error ``` CompilerError: compile error: data_error:0:0: Compiler crashed, with reason: undef [{aeb_fate_ops,network_id,[{stack,0}],[]}, {aeso_fcode_to_fate,builtin_to_scode,3, [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"}, {line,572}]}, {aeso_fcode_to_fate,to_scode1,2, [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"}, {line,372}]}, {aeso_fcode_to_fate,'-call_to_scode/3-lc$^0/1-0-',2, [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"}, {line,522}]}, {aeso_fcode_to_fate,'-call_to_scode/3-lc$^0/1-0-',2, [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"}, {line,522}]}, {aeso_fcode_to_fate,call_to_scode,3, [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"}, {line,522}]}, {aeso_fcode_to_fate,to_scode1,2, [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"}, {line,333}]}, {aeso_fcode_to_fate,'-call_to_scode/3-lc$^0/1-0-',2, [{file,"/app/_build/default/lib/aesophia/src/aeso_fcode_to_fate.erl"}, {line,522}]}] ```
zxq9 commented 2023-08-03 17:18:35 +09:00 (Migrated from gitlab.com)

Created by: marc0olo

closing this. I didn't update the aebytecode dependency. I just rebuilt the compiler and now it compiles. I should consider to ditch the http compiler also locally 🙈

*Created by: marc0olo* closing this. I didn't update the `aebytecode` dependency. I just rebuilt the compiler and now it compiles. I should consider to ditch the http compiler also locally 🙈
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/sophia#477