Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take cheaper-instantiation XDR #346

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Take cheaper-instantiation XDR #346

merged 1 commit into from
Mar 22, 2024

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Feb 29, 2024

Changes in support of stellar/rs-soroban-env#1359 -- see that PR for explanation and links to underlying bugs.

@graydon graydon force-pushed the cheaper-instantiation branch from 7079b90 to 579b5be Compare February 29, 2024 10:13
@graydon graydon force-pushed the cheaper-instantiation branch 4 times, most recently from afb7533 to e5af69d Compare March 8, 2024 01:01
@graydon graydon force-pushed the cheaper-instantiation branch 2 times, most recently from 2128711 to 11bca74 Compare March 15, 2024 05:15
@graydon graydon force-pushed the cheaper-instantiation branch from 11bca74 to 5edb037 Compare March 22, 2024 02:52
@graydon graydon force-pushed the cheaper-instantiation branch from ef61624 to 8892476 Compare March 22, 2024 23:13
@graydon graydon marked this pull request as ready for review March 22, 2024 23:13
@graydon graydon enabled auto-merge March 22, 2024 23:18
@graydon graydon added this pull request to the merge queue Mar 22, 2024
Merged via the queue into main with commit 44b7e2d Mar 22, 2024
10 checks passed
@graydon graydon deleted the cheaper-instantiation branch March 22, 2024 23:40
github-merge-queue bot pushed a commit to stellar/rs-soroban-env that referenced this pull request Mar 26, 2024
This is a sketch of the first step in the plan for addressing #1292 and
eventually #827 and #1313, namely:

- add a bunch of cost types that decompose the current "worst case" VM
instantiation cost type
  - continue to charge the worst case on initial contract upload
- _store_ the decomposed cost-type inputs in the ledger, since we can
observe them after the initial upload parse
- _use_ those decomposed cost-type inputs when doing runtime
instantiation
  - add a module cache
  - populate the module cache with all modules on host startup
  - use cached modules during instantiation

This PR has accompanying changes in XDR and wasmi:

  - stellar/stellar-xdr#177
  - stellar/rs-stellar-xdr#346

Remaining to do:

  - [x] determine what the correct set of decomposed cost types even is
  - [ ] ~add more code to wasmi to enable observing more inputs~
- [x] add cost-type runners / calibrations for all the decomposed
cost-types
  - [x] protocol-gate this new behaviour
- [x] make the linker-loop do less work to match the tighter cost model
(i.e. complete #1292)
- [x] possibly _duplicate_ the set of cost types added here, so we have
a cached and uncached version of each, and implement a solution to #827
- [ ] possibly decompose the set sufficiently to model what will happen
when we take wasmi 0.32 and enable lazy translation (i.e. complete
#1313)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants