ChainSafe / gossamer

🕸️ Go Implementation of the Polkadot Host
https://chainsafe.github.io/gossamer
GNU Lesser General Public License v3.0
427 stars 110 forks source link

fix(wazero): remove panic from offchain submit transaction #3988

Closed jimjbrettj closed 1 month ago

jimjbrettj commented 1 month ago

Changes

When calling ext_offchain_submit_transaction_version_1 our node would panic. This was due to us not initializing the TransactionState causing it to be nil. However, fixing this highlighted that we do not correctly handle this function, though this is outside this PR's scope (see links below for issue representing this work effort).

This PR simply initialized the TransactionState (to prevent future bugs caused by this) and removes the problematic code (since it is optional) and leaves the further off-chain workers investigation to future work represented by the issue linked above.

To summarize, this PR fixes the panic happening during tip sync, and two issues have been created to represent future work. 1) Offchain worker investigation #3986 2) Equivocation investigation #3987

Issues

Closes: #3853, #3706