Skip to content

Commit

Permalink
Add BlockHeader deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Sep 25, 2024
1 parent 21626dd commit eeab057
Show file tree
Hide file tree
Showing 23 changed files with 429 additions and 1,024 deletions.
1 change: 0 additions & 1 deletion .codespellignore

This file was deleted.

4 changes: 4 additions & 0 deletions .trunk/configs/cspell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: "0.2"
# Suggestions can sometimes take longer on CI machines,
# leading to inconsistent results.
suggestionsTimeout: 5000 # ms
4 changes: 3 additions & 1 deletion .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ runtimes:
system_version: allowed
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
disabled:
- codespell
files:
- name: cairo
extensions:
Expand Down Expand Up @@ -53,13 +55,13 @@ lint:
read_output_from: stdout
run_linter_from: workspace
enabled:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- cairo@SYSTEM
- [email protected]
- clippy@SYSTEM
- [email protected]
- git-diff-check
- [email protected]
- [email protected]
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"python.testing.pytestArgs": ["cairo"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"jupyter.notebookFileRoot": "${workspaceFolder}/cairo"
"jupyter.notebookFileRoot": "${workspaceFolder}/cairo",
"githubPullRequests.remotes": ["kakarot", "upstream"]
}
18 changes: 0 additions & 18 deletions cairo/programs/fibonacci.cairo

This file was deleted.

260 changes: 0 additions & 260 deletions cairo/programs/fibonacci.json

This file was deleted.

15 changes: 2 additions & 13 deletions cairo/programs/os.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,8 @@ from starkware.cairo.common.memcpy import memcpy
from src.model import model

func main{output_ptr: felt*}() {
tempvar block_info: model.BlockInfo* = cast(nondet %{ segments.add() %}, model.BlockInfo*);
%{ block_info %}

assert [output_ptr] = block_info.coinbase;
assert [output_ptr + 1] = block_info.timestamp;
assert [output_ptr + 2] = block_info.number;
assert [output_ptr + 3] = block_info.prev_randao.low;
assert [output_ptr + 4] = block_info.prev_randao.high;
assert [output_ptr + 5] = block_info.gas_limit;
assert [output_ptr + 6] = block_info.chain_id;
assert [output_ptr + 7] = block_info.base_fee;

let output_ptr = output_ptr + 8;
tempvar block_header: model.BlockHeader*;
%{ block_header %}

return ();
}
Loading

0 comments on commit eeab057

Please sign in to comment.