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

Add Basic Types + Memory walkthrough to Write your own Cairo VM section #8

Merged
merged 19 commits into from
Aug 1, 2023

Conversation

fmoletta
Copy link
Member

@fmoletta fmoletta commented Jul 31, 2023

This PR is analogous to lambdaclass/cairo-vm.c#37

Contains code from unmerged PRs #9 #6 #5

Removes code related to negative-indexed relocatables (temp memory) as its better to handle this later on

@fmoletta fmoletta changed the base branch from main to add-documentation-from-c-repo July 31, 2023 14:05
@fmoletta fmoletta changed the title [WIP]Add Basic Types + Memory walkthrough to Write your own Cairo VM section Add Basic Types + Memory walkthrough to Write your own Cairo VM section Jul 31, 2023
…ction (#12)

* Add RunContext

* Add VM structure
Base automatically changed from add-documentation-from-c-repo to main July 31, 2023 20:12
@gabrielbosio gabrielbosio merged commit b00a613 into main Aug 1, 2023
1 check passed
@gabrielbosio gabrielbosio deleted the write-your-own-vm-basic-types branch August 1, 2023 16:13
jrchatruc added a commit that referenced this pull request Aug 3, 2023
* Add roadmap to README (#17)

* Add roadmap to README

* Small typo

* Add felt documentation (#16)

* Add Basic Types + Memory walkthrough to Write your own Cairo VM section  (#8)

* Add non c-specific project guidelines

* Copy the rest of the file

* Copy + adapt introduction

* Copy doc in C repo PR

* Replace relocatable structure with go structure

* Make Relocatable fields public

* Update MaybeRelocatable section with go version

* Remove leftover comment

* Update Memory structure

* Add Insert code (minus temp segments comment)

* Add Get code (minus temp segments comment)

* Add MemorySegmentManager section

* Add maybeRelocatable convenience methods

* Add missing language keyword

* Fix typo

* fmt

* Replace hashmap for map

* Add `RunContext` & `VirtualMachine` structres to Write your own VM section (#12)

* Add RunContext

* Add VM structure

* First draft OpcodeAssertions

* First draft OpcodeAssertions

* Testing

* TestOpcodeAssertionsResUnconstrained

* Testing

* Mini improvment in README (#34)

Co-authored-by: Pablo Deymonnaz <[email protected]>

* Review PR #1
- Removes useless methods
- Formats variables name
- Removes useless pointers

* Review PR #1
- Removes useless methods
- Formats variables name
- Removes useless pointers
- Deletes again mock function
- Rename function names

* Removed error difference.

---------

Co-authored-by: Javier Rodríguez Chatruc <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
pablodeymo added a commit that referenced this pull request Aug 4, 2023
* WIP: Lambdaworks wrapper

* Wrapper around lambdaworks library

* Execution functionality

* compute addresses

* Compute Operands

* Fix tests

* Decode operands tests

* Fixing test

* Test compute operands

* Opcode assertions (#32)

* Add roadmap to README (#17)

* Add roadmap to README

* Small typo

* Add felt documentation (#16)

* Add Basic Types + Memory walkthrough to Write your own Cairo VM section  (#8)

* Add non c-specific project guidelines

* Copy the rest of the file

* Copy + adapt introduction

* Copy doc in C repo PR

* Replace relocatable structure with go structure

* Make Relocatable fields public

* Update MaybeRelocatable section with go version

* Remove leftover comment

* Update Memory structure

* Add Insert code (minus temp segments comment)

* Add Get code (minus temp segments comment)

* Add MemorySegmentManager section

* Add maybeRelocatable convenience methods

* Add missing language keyword

* Fix typo

* fmt

* Replace hashmap for map

* Add `RunContext` & `VirtualMachine` structres to Write your own VM section (#12)

* Add RunContext

* Add VM structure

* First draft OpcodeAssertions

* First draft OpcodeAssertions

* Testing

* TestOpcodeAssertionsResUnconstrained

* Testing

* Mini improvment in README (#34)

Co-authored-by: Pablo Deymonnaz <[email protected]>

* Review PR #1
- Removes useless methods
- Formats variables name
- Removes useless pointers

* Review PR #1
- Removes useless methods
- Formats variables name
- Removes useless pointers
- Deletes again mock function
- Rename function names

* Removed error difference.

---------

Co-authored-by: Javier Rodríguez Chatruc <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>

* Fix merge conflicts

* merge main

* Fix comments

* fix typos

* Delete circular dependency

* Delete unused struct

* leave comment code for once deductions is done

* Fix felt usage

* refactor Add felt in maybe relocatable add

* Delete duplicated function

* Update pkg/vm/run_context.go

Co-authored-by: fmoletta <[email protected]>

* Update pkg/vm/memory/relocatable.go

Co-authored-by: fmoletta <[email protected]>

* Update pkg/vm/memory/relocatable.go

Co-authored-by: fmoletta <[email protected]>

---------

Co-authored-by: toni-calvin <[email protected]>
Co-authored-by: Antonio Calvín García <[email protected]>
Co-authored-by: Javier Rodríguez Chatruc <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
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.

3 participants