Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Fixed Gas Integration #265

Merged
merged 62 commits into from
Jul 14, 2021
Merged

Fixed Gas Integration #265

merged 62 commits into from
Jul 14, 2021

Conversation

neysofu
Copy link
Contributor

@neysofu neysofu commented Jul 9, 2021

This PR draft tackles the integration of two features within the SVM runtime:

  • Fixed gas compiler. This allows users to submit WASM modules with a formal verification of expected pricing.
  • SVM-dialect WASM validation. By SVM dialect, we mean a WASM subset that disallows non-terminating programs and opcodes that would compromise the otherwise fully determinstic nature of WASM sandboxing.

@YaronWittenstein YaronWittenstein self-requested a review July 11, 2021 13:25
@YaronWittenstein YaronWittenstein added this to the July 5 Sprint milestone Jul 11, 2021
@YaronWittenstein YaronWittenstein linked an issue Jul 11, 2021 that may be closed by this pull request
@neysofu neysofu marked this pull request as ready for review July 14, 2021 12:22
@neysofu neysofu requested review from YaronWittenstein and removed request for YaronWittenstein July 14, 2021 12:23
neysofu added a commit that referenced this pull request Jul 14, 2021
commit c501320
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 14:17:11 2021 +0200

    Move local variable out of loop

commit 9afc2da
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 14:02:45 2021 +0200

    Better docs for Outcome

commit 1b4cb39
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:46:25 2021 +0200

    Remove Clone bound from PriceResolver

commit 7b85224
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:36:48 2021 +0200

    Rename StandardPriceResolrver to V0PriceResolver

commit 13c5f6d
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:32:26 2021 +0200

    Add intra-doc links in a doc comment

commit de1f8e8
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:27:59 2021 +0200

    Better local variable name

commit 383a9e9
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:25:34 2021 +0200

    More descriptive test name

commit 57e1fd6
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:25:05 2021 +0200

    Use more consistent # Safety notices

commit 2d3258d
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:24:40 2021 +0200

    Remove unnecessary cast

commit b54888e
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:08:25 2021 +0200

    Rename the AddressLocator trait

commit 44473f9
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:04:02 2021 +0200

    Rename gas metering -related argument

commit aac94ec
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:02:20 2021 +0200

    Reorder import- and export-related items in svm-gas

commit 2ca2217
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 13:00:35 2021 +0200

    Use a better name for struct field

commit 5455c97
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 12:58:38 2021 +0200

    Fix typo in comment

commit 0f744f2
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 12:58:14 2021 +0200

    Refactor the opcode validation logic with an .all()

commit efb6800
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 12:52:46 2021 +0200

    Wrap gas calculation utils in a module

commit f8ebedb
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 12:49:04 2021 +0200

    Make svm_alloc error detection more generic

commit a293766
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 12:43:39 2021 +0200

    Add a global dependency to `thiserror`

commit e5a6d99
Merge: 3cd1271 1ae86f1
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 11:30:40 2021 +0200

    Merge branch 'master' into fixed-gas

commit 3cd1271
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 01:40:28 2021 +0200

    Fix failing test due to price resolver issue

commit 7cfdbb9
Author: Filippo Costa <filippo@neysofu.me>
Date:   Wed Jul 14 01:36:51 2021 +0200

    Add a pricing mechanism to the SVM runtime

commit 69a64a3
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Tue Jul 13 23:43:49 2021 +0200

    Change the error type on invalid CTORs

commit 9ffccbf
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Tue Jul 13 23:32:00 2021 +0200

    Check ctor price before spawning an App

commit 5fdcc78
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Tue Jul 13 19:38:11 2021 +0200

    Add price resolving draft to spawn_app

commit 435d98f
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Tue Jul 13 16:17:41 2021 +0200

    Refactor the new_store utility function

commit 41727a0
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Tue Jul 13 16:00:49 2021 +0200

    Rename 'compue_address.rs' file

commit a532bfe
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Tue Jul 13 15:49:54 2021 +0200

    Unify address and app locator traits

commit 3159bd5
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Tue Jul 13 15:29:06 2021 +0200

    Fix typo in comment

commit ad1c9b6
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Tue Jul 13 14:18:09 2021 +0200

    WIP

commit cc11f26
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 12:55:28 2021 +0200

    Change some allow's into warn's and fix lint warnings

commit 5f36983
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 12:23:55 2021 +0200

    Add rustdoc links in context.rs

commit 0168c9b
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 12:16:01 2021 +0200

    Reduce macro usage in runtime-ffi

commit 78226f4
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 11:50:10 2021 +0200

    Fix crate name in doc comment

commit fb2d347
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 11:48:38 2021 +0200

    deny some lints in svm-query

commit 120a6b5
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 11:05:27 2021 +0200

    Improve doc commenting style in svm-query

commit 110c70c
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 10:24:28 2021 +0200

    Integrate svm_alloc checks before deployment

commit 53204e6
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 10:02:36 2021 +0200

    Small change to comment

commit 13c42b2
Merge: d80eb94 d3fb418
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 09:56:27 2021 +0200

    Merge branch 'master' into fixed-gas

commit d80eb94
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Mon Jul 12 09:54:47 2021 +0200

    Check for svm_alloc when deploying a template

commit 435b3fb
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 19:20:54 2021 +0200

    WIP

commit e95592b
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 15:48:21 2021 +0200

    Add documentation

commit d6ce6b6
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 15:35:57 2021 +0200

    Make TemplateHash a typedef, not a struct

commit 33de4c9
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 15:23:24 2021 +0200

    Switch to thiserror

commit 6b0cfc3
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 14:15:46 2021 +0200

    WIP

commit af22dcf
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 12:00:26 2021 +0200

    Move module docs to top of files within runtime

commit 3a5cc30
Merge: 207b6ba 062de28
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 11:56:55 2021 +0200

    Merge branch 'styling' into fixed-gas

commit 207b6ba
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 11:27:41 2021 +0200

    Remove redundant Option for cycle examples

commit 2f55919
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 11:20:19 2021 +0200

    Remove too simple utility testing function

commit 5f6463b
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 11:17:50 2021 +0200

    Reorder some imports

commit 02fc226
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Fri Jul 9 11:14:13 2021 +0200

    Draft the integration of gas metering

commit bb1b4c1
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 13:58:04 2021 +0200

    Replace utility macro with a function

commit bbf7af8
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 13:55:08 2021 +0200

    Remove blank lines between struct fields

commit 1e58245
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 13:48:31 2021 +0200

    Automatically derive Default for Program

commit 3a61165
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 12:28:17 2021 +0200

    Move module documentation to the top

commit 062de28
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 11:53:12 2021 +0200

    Fix wrongly run doctest

commit 1a5847f
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 11:19:12 2021 +0200

    Remove duplicated Call API (getters and pub attributes)

commit fee2174
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 11:13:36 2021 +0200

    Simplify Config initialization patterns

commit d054e1d
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 11:06:40 2021 +0200

    Unify impl blocks of Outcome

commit e27e0b2
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 11:06:27 2021 +0200

    Improve documentation for RuntimePtr

commit e586df7
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 10:44:25 2021 +0200

    Make imports ordering more consistent and use //! docs

commit 00dfd62
Author: Filippo Costa <filippocosta.italy@gmail.com>
Date:   Thu Jul 8 10:29:22 2021 +0200

    Replace `get_` prefix in many getters
@neysofu neysofu closed this Jul 14, 2021
@neysofu neysofu reopened this Jul 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
svm svm-core SVM core change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fixed-Gas Integration
2 participants