Skip to content

Conversation

@jarkkojs
Copy link
Contributor

@jarkkojs jarkkojs commented Nov 18, 2024

Bump polkavm to 0.18.0, and update sc-polkavm-executor to be compatible with the API changes. In addition, bump also polkavm-derive and polkavm-linker in order to make sure that the all parts of the Polkadot SDK use the exact same ABI for .polkavm binaries.

Purely relying on RV32E/RV64E ABI is not possible, as PolkaVM uses a RISCV-V alike ISA, which is derived from RV32E/RV64E but it is still its own microarchitecture, i.e. not fully binary compatible.

@jarkkojs jarkkojs self-assigned this Nov 18, 2024
@jarkkojs jarkkojs added the T0-node This PR/Issue is related to the topic “node”. label Nov 18, 2024
Signed-off-by: Jarkko Sakkinen <[email protected]>
@jarkkojs jarkkojs marked this pull request as ready for review November 20, 2024 03:58
@jarkkojs jarkkojs requested a review from koute as a code owner November 20, 2024 03:58
@jarkkojs jarkkojs requested a review from athei November 20, 2024 04:00
Signed-off-by: Jarkko Sakkinen <[email protected]>
@jarkkojs
Copy link
Contributor Author

BTW, please help me to interpret the CI errors...

jarkkojs and others added 2 commits November 21, 2024 00:12
Co-authored-by: Koute <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
@jarkkojs
Copy link
Contributor Author

@koute no further answers needed despite some questions. I'll ping you at chat if anything. After taking yesterday off comments feel somewhat clear.

@jarkkojs jarkkojs requested a review from koute November 21, 2024 21:04
@jarkkojs
Copy link
Contributor Author

I'm sure I missed something but did my best ;-)

@jarkkojs
Copy link
Contributor Author

2x oldlinux tests failing

@jarkkojs
Copy link
Contributor Author

I guess it's produced during the std (native) runtime build, so just putting the min_stack_size! call under the same #[cfg] conditions should be enough. Btw, it would be good to have succinct macros to generate those cfgs, copy-pasting them over the code does not add to readability.

Yeah should be good enough for the moment. Otherwise this becomes two-crate problem and that weights worse for the time being...

Signed-off-by: Jarkko Sakkinen <[email protected]>
@jarkkojs
Copy link
Contributor Author

OK great. After expanding to 32 kB stack does not overrun. I have now node running.

@jarkkojs jarkkojs enabled auto-merge December 14, 2024 11:56
@s0me0ne-unkn0wn
Copy link
Contributor

Running and not doing much useful work, right? I bet if you put it under some load, it'll start overflowing again. I'd use some conservative stack limit like 2 Mb. Given that we currently use a 256 Mb stack limit for Wasm PVFs, that doesn't sound like too much. Curious to hear @koute's opinion on that. And definitely needs a burn-in before going any closer to production ;)

@jarkkojs jarkkojs disabled auto-merge December 14, 2024 12:00
Signed-off-by: Jarkko Sakkinen <[email protected]>
@jarkkojs
Copy link
Contributor Author

Running and not doing much useful work, right? I bet if you put it under some load, it'll start overflowing again. I'd use some conservative stack limit like 2 Mb. Given that we currently use a 256 Mb stack limit for Wasm PVFs, that doesn't sound like too much. Curious to hear @koute's opinion on that. And definitely needs a burn-in before going any closer to production ;)

Increased to 2 MiB

@jarkkojs
Copy link
Contributor Author

Running and not doing much useful work, right? I bet if you put it under some load, it'll start overflowing again. I'd use some conservative stack limit like 2 Mb. Given that we currently use a 256 Mb stack limit for Wasm PVFs, that doesn't sound like too much. Curious to hear @koute's opinion on that. And definitely needs a burn-in before going any closer to production ;)

Increased to 2 MiB

It's not the only thing that needs to be possibly tuned after this PR. Node starting is good enough DoD.

@jarkkojs jarkkojs enabled auto-merge December 14, 2024 13:36
Jarkko Sakkinen added 4 commits December 14, 2024 15:47
Signed-off-by: Jarkko Sakkinen <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
@jarkkojs jarkkojs requested review from a team as code owners December 14, 2024 14:06
@jarkkojs jarkkojs added this pull request to the merge queue Dec 14, 2024
Merged via the queue into paritytech:master with commit bd2c35f Dec 14, 2024
196 of 199 checks passed
@jarkkojs jarkkojs deleted the bump-polkavm-version branch December 14, 2024 19:52
dudo50 pushed a commit to paraspell-research/polkadot-sdk that referenced this pull request Jan 4, 2025
Bump `polkavm` to 0.18.0, and update `sc-polkavm-executor` to be
compatible with the API changes. In addition, bump also `polkavm-derive`
and `polkavm-linker` in order to make sure that the all parts of the
Polkadot SDK use the exact same ABI for `.polkavm` binaries.

Purely relying on RV32E/RV64E ABI is not possible, as PolkaVM uses a
RISCV-V alike ISA, which is derived from RV32E/RV64E but it is still its
own microarchitecture, i.e. not fully binary compatible.

---------

Signed-off-by: Jarkko Sakkinen <[email protected]>
Co-authored-by: Koute <[email protected]>
Co-authored-by: Alexander Theißen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants