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

Thiagodeev/rpcv08 final changes #644

Merged
merged 25 commits into from
Dec 20, 2024
Merged

Conversation

thiagodeev
Copy link
Collaborator

@thiagodeev thiagodeev commented Nov 6, 2024

#623

This PR aims to implement some RPC v0.8.0 updates to starknet.go. The ones addressed by this PR are:

Components
EXECUTION_RESOURCES
COMPUTATION_RESOURCES (remotion)

Note: As the RPC v0.8.0 has not yet been released, we can't fully test these changes as the nodes haven't implemented them yet. They will be updated before merging into main

@thiagodeev thiagodeev force-pushed the thiagodeev/rpcv08-finalChanges branch 2 times, most recently from 629890b to b7ce944 Compare November 7, 2024 12:59
@thiagodeev thiagodeev marked this pull request as ready for review November 8, 2024 02:31
@rianhughes rianhughes self-requested a review November 8, 2024 09:08
rpc/errors.go Outdated Show resolved Hide resolved
rpc/errors.go Outdated Show resolved Hide resolved
@thiagodeev thiagodeev force-pushed the v0.8.0 branch 2 times, most recently from baba9f4 to 9007483 Compare December 4, 2024 17:19
@thiagodeev thiagodeev force-pushed the thiagodeev/rpcv08-finalChanges branch from 0d21cbd to a65992c Compare December 18, 2024 03:57
@thiagodeev thiagodeev marked this pull request as draft December 18, 2024 03:58
@thiagodeev thiagodeev marked this pull request as ready for review December 19, 2024 14:46
@thiagodeev thiagodeev force-pushed the thiagodeev/rpcv08-finalChanges branch from 564b7af to b0f8dac Compare December 19, 2024 14:49
wojciechos and others added 6 commits December 19, 2024 12:36
Update test data post Juno bug fix
Create dependency_review.yml
* fix::> introduced comman AddTransaction function in account package

* fix::> replace all the instances of Add<Type>Transaction in example/test with AddTransaction

* fix::> func name and doc changes made

* fix::> account_test.go changed

* fix::> examples error solved

* fix::> Removed type assertions, created generic TransactionResponse struct, and transaction type converter

* fix::> removed unnecessary lines

* fix:> made required changes

* fix::> removed unnecessary comments

* fix::> renamed test function

---------

Co-authored-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Co-authored-by: Rian Hughes <ryanhughes4500@hotmail.com>
* General semantic updates and EncodeType adjustment

* Improvements and bug fixes

* Implements typedData unmarshal

* Adds Message support on Unmarshal typedData

* Rename files and create types file

* Creates TestGeneral_CreateMessageWithTypes

* Clears some curve methods and adds Poseidon method

* Adds revision.go file, new Revision field of TypedData

* Basic implementation working with a rev 0 typedData

* Rename files

* Some code adjustments

* Adds new examples from starknet.js and implements new mock logic

* init function on revision package

* Adds first version of Validate feature

* Adds revision 1 support to encodeType

* Adds 'selector' support in encodeData

* restructs encodeData

* adds handleStandardTypes and handleArrays functions

* support to arrays, new types and new Domain unmarshal

* fixed support to bool, new example being tested

* fixes errors in encodeType, 'example_presetTypes' supported

* implements merkletree encode

* adds support to 'mail_StructArray' json example

* Fixes error inStringToByteArrFelt func, 'v1Nested' example passing

* Started to refactor 'encodeType' func

* Fixes bug with merkletree

* Creates the verifyType func

* implements enum encoding

* Removes the validation method, it will be added later

* creates big example for testing purpose

* removes the types file

* adds code comments and descriptions

* rename folder and file names

* creates typedData example and change READMEs

* Update utils/Felt.go

Co-authored-by: Rian Hughes <ryanhughes4500@hotmail.com>

* Update utils/keccak.go

Co-authored-by: Rian Hughes <ryanhughes4500@hotmail.com>

* addresses Rian's comment about GetMessageHash

* Revert enum wrong encode as it was fixed by starknet.js

* Creates ValidationSignature helper

* Removes the StrToFelt utility

* Improves 'chainId' validation

* Changes private fields of TypedData to public

---------

Co-authored-by: Rian Hughes <ryanhughes4500@hotmail.com>
@thiagodeev thiagodeev force-pushed the thiagodeev/rpcv08-finalChanges branch from b0f8dac to 3f85e3b Compare December 19, 2024 15:42
@thiagodeev thiagodeev marked this pull request as draft December 19, 2024 15:42
@thiagodeev thiagodeev marked this pull request as ready for review December 19, 2024 16:02
@thiagodeev thiagodeev merged commit 9cb940b into v0.8.0 Dec 20, 2024
6 checks passed
@thiagodeev thiagodeev deleted the thiagodeev/rpcv08-finalChanges branch December 20, 2024 02:10
thiagodeev added a commit that referenced this pull request Dec 20, 2024
* Adjusts TransactionStatus

* Adjusts EstimateFee

* Fixes blockTest error

* Adds GetStorageProof method (#635)

* implement rpcv8 GetStorageProof method

* Adds GetMessagesStatus method (#634)

* Added GetMessagesStatus method

* PR comment fixes

* Fix MerkleNode type

* Updates PendingBlockReader type

* Updates ExecutionResources and remove ComputationResources

* Fixes failing tests and improves Error() resp

* Adds TODO comments and set a pointer to Marshal method

* Thiagodeev/rpcv08 write methods, blockHeader and error 53 (#626)

Update write methods, error 53 and block header for rpc08


* Adjusts EstimateFee
thiagodeev added a commit that referenced this pull request Dec 24, 2024
commit 9cb940b
Author: Thiago Ribeiro <62709592+thiagodeev@users.noreply.github.com>
Date:   Thu Dec 19 23:10:28 2024 -0300

    Thiagodeev/rpcv08 final changes (#644)

    * Adjusts TransactionStatus

    * Adjusts EstimateFee

    * Fixes blockTest error

    * Adds GetStorageProof method (#635)

    * implement rpcv8 GetStorageProof method

    * Adds GetMessagesStatus method (#634)

    * Added GetMessagesStatus method

    * PR comment fixes

    * Fix MerkleNode type

    * Updates PendingBlockReader type

    * Updates ExecutionResources and remove ComputationResources

    * Fixes failing tests and improves Error() resp

    * Adds TODO comments and set a pointer to Marshal method

    * Thiagodeev/rpcv08 write methods, blockHeader and error 53 (#626)

    Update write methods, error 53 and block header for rpc08

    * Adjusts EstimateFee

commit 4ca79eb
Merge: 9007483 8ecf779
Author: Thiago Ribeiro <62709592+thiagodeev@users.noreply.github.com>
Date:   Wed Dec 18 00:35:32 2024 -0300

    Merge branch 'main' into v0.8.0

commit 8ecf779
Author: Thiago Ribeiro <62709592+thiagodeev@users.noreply.github.com>
Date:   Fri Dec 13 10:30:35 2024 -0300

    Implements SNIP-12 (#637)

    * General semantic updates and EncodeType adjustment

    * Improvements and bug fixes

    * Implements typedData unmarshal

    * Adds Message support on Unmarshal typedData

    * Rename files and create types file

    * Creates TestGeneral_CreateMessageWithTypes

    * Clears some curve methods and adds Poseidon method

    * Adds revision.go file, new Revision field of TypedData

    * Basic implementation working with a rev 0 typedData

    * Rename files

    * Some code adjustments

    * Adds new examples from starknet.js and implements new mock logic

    * init function on revision package

    * Adds first version of Validate feature

    * Adds revision 1 support to encodeType

    * Adds 'selector' support in encodeData

    * restructs encodeData

    * adds handleStandardTypes and handleArrays functions

    * support to arrays, new types and new Domain unmarshal

    * fixed support to bool, new example being tested

    * fixes errors in encodeType, 'example_presetTypes' supported

    * implements merkletree encode

    * adds support to 'mail_StructArray' json example

    * Fixes error inStringToByteArrFelt func, 'v1Nested' example passing

    * Started to refactor 'encodeType' func

    * Fixes bug with merkletree

    * Creates the verifyType func

    * implements enum encoding

    * Removes the validation method, it will be added later

    * creates big example for testing purpose

    * removes the types file

    * adds code comments and descriptions

    * rename folder and file names

    * creates typedData example and change READMEs

    * Update utils/Felt.go

    Co-authored-by: Rian Hughes <ryanhughes4500@hotmail.com>

    * Update utils/keccak.go

    Co-authored-by: Rian Hughes <ryanhughes4500@hotmail.com>

    * addresses Rian's comment about GetMessageHash

    * Revert enum wrong encode as it was fixed by starknet.js

    * Creates ValidationSignature helper

    * Removes the StrToFelt utility

    * Improves 'chainId' validation

    * Changes private fields of TypedData to public

    ---------

    Co-authored-by: Rian Hughes <ryanhughes4500@hotmail.com>

commit 1c399f4
Author: Thiago Ribeiro <62709592+thiagodeev@users.noreply.github.com>
Date:   Wed Dec 11 12:13:13 2024 -0300

    Merge PR #592 to main (#647)

    * fix::> introduced comman AddTransaction function in account package

    * fix::> replace all the instances of Add<Type>Transaction in example/test with AddTransaction

    * fix::> func name and doc changes made

    * fix::> account_test.go changed

    * fix::> examples error solved

    * fix::> Removed type assertions, created generic TransactionResponse struct, and transaction type converter

    * fix::> removed unnecessary lines

    * fix:> made required changes

    * fix::> removed unnecessary comments

    * fix::> renamed test function

    ---------

    Co-authored-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
    Co-authored-by: Rian Hughes <ryanhughes4500@hotmail.com>

commit 9007483
Author: Thiago Ribeiro <62709592+thiagodeev@users.noreply.github.com>
Date:   Wed Nov 6 11:26:01 2024 -0300

    starknet_getCompiledCasm (#642)

    * implement starknet_getCompiledCasm for RPCv8

commit 98d2b5c
Author: Thiago Ribeiro <62709592+thiagodeev@users.noreply.github.com>
Date:   Mon Oct 28 11:24:53 2024 -0300

    Adds GetMessagesStatus method (#634)

    * Added GetMessagesStatus method

    * PR comment fixes

commit ae6e233
Author: Thiago Ribeiro <62709592+thiagodeev@users.noreply.github.com>
Date:   Mon Oct 28 07:20:01 2024 -0300

    Adds GetStorageProof method (#635)

    * implement rpcv8 GetStorageProof method

commit 75425d3
Author: thiagodeev <thiagodeev@gmail.com>
Date:   Mon Sep 30 10:08:19 2024 -0300

    Fixes blockTest error

commit de722c1
Author: thiagodeev <thiagodeev@gmail.com>
Date:   Mon Sep 30 10:07:56 2024 -0300

    Adjusts EstimateFee

commit b97a149
Author: thiagodeev <thiagodeev@gmail.com>
Date:   Mon Sep 30 09:31:31 2024 -0300

    Adjusts TransactionStatus
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.

6 participants