Skip to content

wasm-substitutes: Use unique hash per substitute to fix caching issues#1416

Merged
bkchr merged 1 commit intoparitytech:masterfrom
moonbeam-foundation:cem-fix-wasm-substitute-caching
Sep 6, 2023
Merged

wasm-substitutes: Use unique hash per substitute to fix caching issues#1416
bkchr merged 1 commit intoparitytech:masterfrom
moonbeam-foundation:cem-fix-wasm-substitute-caching

Conversation

@rimbi
Copy link
Copy Markdown
Contributor

@rimbi rimbi commented Sep 6, 2023

Fix the wasm substitute caching bug.

When there exist multiple code substitutes in the spec, the substrate used to keep only one. The current solution fixes this bug by creating a unique hash for each wasm blob.

@bkchr bkchr added the T0-node This PR/Issue is related to the topic “node”. label Sep 6, 2023
@bkchr bkchr requested a review from a team September 6, 2023 09:34
@bkchr bkchr changed the title Fix the wasm runtime substitute caching bug wasm-substitutes: Use unique hash per substitute to fix caching issues Sep 6, 2023
@bkchr bkchr enabled auto-merge (squash) September 6, 2023 09:35
code_fetcher: &WrappedRuntimeCode((&code).into()),
heap_pages: None,
hash: Vec::new(),
hash: make_hash(&code),
Copy link
Copy Markdown
Contributor

@michalkucharczyk michalkucharczyk Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this doc is outdated (guess that scale-encoding is not really needed)?

@bkchr bkchr merged commit dc28df0 into paritytech:master Sep 6, 2023
ordian added a commit that referenced this pull request Sep 6, 2023
* master: (24 commits)
  GHW for building and publishing docker images (#1391)
  pallet asset-conversion additional quote tests (#1371)
  Remove deprecated `pallet_balances`'s `set_balance_deprecated` and `transfer` dispatchables (#1226)
  Fix PRdoc check (#1419)
  Fix the wasm runtime substitute caching bug (#1416)
  Bump enumn from 0.1.11 to 0.1.12 (#1412)
  RFC 14: Improve locking mechanism for parachains (#1290)
  Add PRdoc check (#1408)
  fmt fixes (#1413)
  Enforce a decoding limit in MultiAssets (#1395)
  Remove dynamic dispatch using `Ext` (#1399)
  Remove redundant calls to `borrow()` (#1393)
  Get rid of polling in `WarpSync` (#1265)
  Bump actions/checkout from 3 to 4 (#1398)
  Bump thiserror from 1.0.47 to 1.0.48 (#1396)
  Move Relay-Specific Shared Code to One Place (#1193)
  rust docs: add simple analytics (#1377)
  Contracts: Update read_sandbox (#1390)
  Extract block announce validation from `ChainSync` (#1170)
  [ci] Remove runtime-benchmarks from tests (#1335)
  ...
ordian added a commit that referenced this pull request Sep 7, 2023
* master: (28 commits)
  Adds base benchmark for do_tick in broker pallet (#1235)
  zombienet: use another collator image for the slashing test (#1386)
  Prevent a fail prdoc check to block (#1433)
  Fix nothing scheduled on session boundary (#1403)
  GHW for building and publishing docker images (#1391)
  pallet asset-conversion additional quote tests (#1371)
  Remove deprecated `pallet_balances`'s `set_balance_deprecated` and `transfer` dispatchables (#1226)
  Fix PRdoc check (#1419)
  Fix the wasm runtime substitute caching bug (#1416)
  Bump enumn from 0.1.11 to 0.1.12 (#1412)
  RFC 14: Improve locking mechanism for parachains (#1290)
  Add PRdoc check (#1408)
  fmt fixes (#1413)
  Enforce a decoding limit in MultiAssets (#1395)
  Remove dynamic dispatch using `Ext` (#1399)
  Remove redundant calls to `borrow()` (#1393)
  Get rid of polling in `WarpSync` (#1265)
  Bump actions/checkout from 3 to 4 (#1398)
  Bump thiserror from 1.0.47 to 1.0.48 (#1396)
  Move Relay-Specific Shared Code to One Place (#1193)
  ...
Ank4n pushed a commit that referenced this pull request Sep 8, 2023
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
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.

5 participants