paritytech / srtool

A fork of chevdor's srtool
MIT License
64 stars 18 forks source link

Version improperly stringified #54

Closed wischli closed 1 year ago

wischli commented 1 year ago

Using paritytech/srtool:1.64.0-0.9.23, the version numbers of our WASMs are unfortunately not stringified properly and just displayed as [object] instead of displaying the spec version:

✨ Your Substrate WASM Runtime is ready! ✨
Summary generated with srtool v0.9.23 using the docker image paritytech/srtool:1.64.0:
 Package     : peregrine-runtime v{
 "workspace": true
}
 No GIT information. You are likely running srtool on an archive.
 Rustc       : rustc 1.64.0 (a55dd71d5 2022-09-19)
 Time        : 2022-11-14T16:40:20Z
== Compact
 Version          : [object]

Since others haven't posted this issue yet, it appears to be something off on our side. However, in 1.60.0 it worked fine. We upgraded from 1.60.0 to 1.64.0 roughly a month ago.

Any help would be appreciated!

Update: Running subwasm v0.18.0 works fine:

subwasm version peregrine_runtime.compact.compressed.wasm
Running subwasm v0.18.0
specifications : mashnet-node v10901
implementation : mashnet-node v0
transaction    : v5
authoring      : v4

Our environment

chevdor commented 1 year ago

Thanks for reporting this issue @wischli.

I am still checking but I am pretty confident the issue is NOT on your side. There are several ways to use srtool and I think this problem only occures when using the default output.

The issue is related to subwasm no longer reporting the version as a string. You can see the fix I did in the polkadot release note. A similar fix is required in the default templates of srtool.