Phala-Network / phat-offchain-rollup

Phat Contract Offchain Rollup implementation
Apache License 2.0
18 stars 13 forks source link

Cleanup and fixes for latest devphase and cargo contract #31

Closed l00k closed 11 months ago

l00k commented 12 months ago
h4x3rotab commented 12 months ago

Thank you so much! I'm going to review it later today.

l00k commented 11 months ago

@h4x3rotab I also tried to fix tests but seems there is code issue While trying to upload code to cluster I'm getting following errors in pruntime

DEBUG prpc{id=1463}: phala_mq: mq dispatching message: sender=Pallet("PhalaPhatContracts"), dest=phala/cluster/key    
DEBUG prpc{id=1463}:pink{blk=264}: runtime::contracts: new code rejected: use of floating point type in locals is forbidden    
ERROR prpc{id=1463}: phactory::system: Error processing message: Failed to upload code: "Module(ModuleError { index: 4, error: [26, 0, 0, 0], message: Some(\"CodeRejected\") })"

I thought it is related to phat/contracts/sub_price_feed/lib.rs:148 but it's not. Must be something in phat_offchain_rollup -> phat/crates/rollup cuz when I remove deps to it, uploading code works.