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

Yaml format to support shard ids and environment addresses. #44

Open
poemm opened this issue Feb 24, 2020 · 2 comments
Open

Yaml format to support shard ids and environment addresses. #44

poemm opened this issue Feb 24, 2020 · 2 comments

Comments

@poemm
Copy link

poemm commented Feb 24, 2020

The following is a proposed sample yaml file which supports both shards ids and environment addresses. (I should write a schema, which yaml schema definition language is preferred?)

prestates: # list of envs (envid, shardid, wasm filename, pre_state)
 - envid: 0x1000000000000000000000000000000000000000000000000000000000000000
   shardid: 1
   code: helloshards.wasm
   stateroot: 0x0000000000000000000000000000000000000000000000000000000000000000
 - envid: 0x2000000000000000000000000000000000000000000000000000000000000000
   shardid: 2
   code: helloshards.wasm
   stateroot: 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
timeslots: # list of time slots each with a list of shard_blocks (envid, calldata)
 - slot:
   - envid: 0x1000000000000000000000000000000000000000000000000000000000000000
     inputdata: 0x0200000000000000000000000000000000000000000000000000000000000000
   - envid: 0x2000000000000000000000000000000000000000000000000000000000000000
     inputdata: 0x0100000000000000000000000000000000000000000000000000000000000000
 - slot:
   - envid: 0x1000000000000000000000000000000000000000000000000000000000000000
     inputdata: 0x0000000000000000000000000000000000000000000000000000000000000000
poststates: # list of envs (envid, shardid, post_state)
 - envid: 0x1000000000000000000000000000000000000000000000000000000000000000
   shardid: 0
   stateroot: 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
 - envid: 0x2000000000000000000000000000000000000000000000000000000000000000
   shardid: 1
   stateroot: 0x0000000000000000000000000000000000000000000000000000000000000000

Before I extend C, C++, and Python Scout yaml parsers, I am soliciting feedback.

This is a dependency to test shard-aware host functions proposed here #38 .

@s1na
Copy link
Collaborator

s1na commented Mar 13, 2020

I'd say let's change envaddr either to address or contract or a combination, get rid of EE terminology. Also rename timeslots to blocks?

@axic
Copy link
Member

axic commented Mar 13, 2020

The version I use locally is the following:

beacon_state:
  execution_scripts:
    - scripts/helloworld/target/wasm32-unknown-unknown/release/phase2_helloworld.wasm
shards:
  - id: 0
    pre_states:
      - "0000000000000000000000000000000000000000000000000000000000000000"
    transitions:
      - env: 0
        data: ""
    post_states:
      - "0000000000000000000000000000000000000000000000000000000000000000"
    depost_receipts:

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

No branches or pull requests

3 participants