Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
I
ink
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
parity
ink
Commits
abf92a92
Commit
abf92a92
authored
Feb 18, 2019
by
Hero Bird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[pdsl_model] Add note to clarify current Key([0x0; 32]) usage
parent
905a71be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
model/src/contract.rs
model/src/contract.rs
+11
-0
No files found.
model/src/contract.rs
View file @
abf92a92
...
...
@@ -233,6 +233,17 @@ where
},
};
let
state
:
State
=
unsafe
{
// Note that it is totally fine here to start with a key
// offset of `0x0` as long as we only consider having one
// contract instance per execution. Otherwise their
// associated storage could overlap.
//
// This can later be solved by having an implementation for
// `AllocateUsing` for `ContractDecl` to actually instantiate
// them using an already existing allocator. Note that then
// all contracts always have to be allocated in the same
// order which could be achieved by simply putting all contracts
// into a contract struct that itself implements `AllocateUsing`.
let
mut
alloc
=
BumpAlloc
::
from_raw_parts
(
Key
([
0x0
;
32
]));
AllocateUsing
::
allocate_using
(
&
mut
alloc
)
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment