Zilliqa / zq2

Zilliqa 2.0 code base
Apache License 2.0
10 stars 0 forks source link

Z2-Converter : Converter crashes on the latest main branch #1913

Open chetan-zilliqa opened 3 days ago

chetan-zilliqa commented 3 days ago

Running z2 converter on the latest main branch fails with following error

contract address: 0xffff6e869a68cbff55345c210e5b65cc294e5f0c
Address: 0xffff6e869a68cbff55345c210e5b65cc294e5f0c, Transitions: [Transition { name: "setOwner", params: [TransitionParam { name: "address", ty: "ByStr20" }] }, Transition { name: "set", params: [TransitionParam { name: "key", ty: "String" }, TransitionParam { name: "value", ty: "String" }] }, Transition { name: "unset", params: [TransitionParam { name: "key", ty: "String" }] }, Transition { name: "setMulti", params: [TransitionParam { name: "newRecords", ty: "List (0xffff6e869a68cbff55345c210e5b65cc294e5f0c.RecordKeyValue)" }] }]
contract address: 0xffffc120a1e5dbccff31533b195cd44d79d7f175
Address: 0xffffc120a1e5dbccff31533b195cd44d79d7f175, Transitions: [Transition { name: "BalanceOf", params: [TransitionParam { name: "tokenOwner", ty: "ByStr20" }] }, Transition { name: "TotalSupply", params: [] }, Transition { name: "Transfer", params: [TransitionParam { name: "to", ty: "ByStr20" }, TransitionParam { name: "tokens", ty: "Uint128" }] }, Transition { name: "TransferFrom", params: [TransitionParam { name: "from", ty: "ByStr20" }, TransitionParam { name: "to", ty: "ByStr20" }, TransitionParam { name: "tokens", ty: "Uint128" }] }, Transition { name: "Approve", params: [TransitionParam { name: "spender", ty: "ByStr20" }, TransitionParam { name: "tokens", ty: "Uint128" }] }, Transition { name: "Allowance", params: [TransitionParam { name: "tokenOwner", ty: "ByStr20" }, TransitionParam { name: "spender", ty: "ByStr20" }] }]
Scilla Docker process stopping with PID: 130606
Error: missing field `transitions` at line 5 column 1

Stack backtrace:
   0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
             at /home/chetan_zilliqa_com/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.93/src/backtrace.rs:27:14
   1: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/result.rs:1989:27
   2: z2lib::zq1::persistence::Transaction::from_proto
             at ./z2/src/zq1/persistence.rs:292:22
   3: z2lib::converter::convert_persistence::{{closure}}
chetan-zilliqa commented 2 days ago

Just an update, I did second round of converter test and the code crashes exactly for the same contract - 0xffffc120a1e5dbccff31533b195cd44d79d7f175

Address: 0xffffc120a1e5dbccff31533b195cd44d79d7f175, Transitions: [Transition { name: "BalanceOf", params: [TransitionParam { name: "tokenOwner", ty: "ByStr20" }] }, Transition { name: "TotalSupply", params: [] }, Transition { name: "Transfer", params: [TransitionParam { name: "to", ty: "ByStr20" }, TransitionParam { name: "tokens", ty: "Uint128" }] }, Transition { name: "TransferFrom", params: [TransitionParam { name: "from", ty: "ByStr20" }, TransitionParam { name: "to", ty: "ByStr20" }, TransitionParam { name: "tokens", ty: "Uint128" }] }, Transition { name: "Approve", params: [TransitionParam { name: "spender", ty: "ByStr20" }, TransitionParam { name: "tokens", ty: "Uint128" }] }, Transition { name: "Allowance", params: [TransitionParam { name: "tokenOwner", ty: "ByStr20" }, TransitionParam { name: "spender", ty: "ByStr20" }] }]
Scilla Docker process stopping with PID: 160560
Error: missing field `transitions` at line 5 column 1

Stack backtrace:
chetan-zilliqa commented 2 days ago

I have manually checked the parsing of the contract on scilla checker through scilla-ide and it passed well for contract -0xffffc120a1e5dbccff31533b195cd44d79d7f175