Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

dev: remove usage of Feeder Gateway in estimateGas and simulateTransaction, replace by RPC #649

Closed
5 tasks
Eikix opened this issue Nov 10, 2023 · 2 comments
Closed
5 tasks
Labels
enhancement Enhancement of the code, not introducing new features.

Comments

@Eikix
Copy link
Member

Eikix commented Nov 10, 2023

Describe the enhancement request

Since Madara and Pathfinder implement simulateTx route, stop using the SequencerGateway for testing, simulating a tx, and estimating gas.

Tasks

Preview Give feedback
@Eikix Eikix added the enhancement Enhancement of the code, not introducing new features. label Nov 10, 2023
@github-project-automation github-project-automation bot moved this to 🆕 Backlog in Kakarot on Starknet Nov 10, 2023
@Eikix
Copy link
Member Author

Eikix commented Nov 20, 2023

Waiting for Madara to implement simulateTransaction

@Eikix
Copy link
Member Author

Eikix commented Nov 27, 2023

Waiting on keep-starknet-strange/madara#1281

@Eikix Eikix closed this as completed Jan 10, 2024
@github-project-automation github-project-automation bot moved this from 🆕 Backlog to ✅ Done in Kakarot on Starknet Jan 10, 2024
anukkrit149 pushed a commit to karnotxyz/kakarot-rpc that referenced this issue Aug 9, 2024
…s#655)

<!--- Please provide a general summary of your changes in the title
above -->

<!-- Give an estimate of the time you spent on this PR in terms of work
days. Did you spend 0.5 days on this PR or rather 2 days? -->

Time spent on this PR: 0.01

## Pull request type



- [X] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

kkrt-labs#649 changes the ability for testing to mock a nonce as a precondition
for an assert.

Resolves kkrt-labs#654 

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by
this PR. -->

- We separate the further testing of deterministic addresses by a range
of nonces to be done directly on `CreateHelper.get_create_address`,
instead of the previous way which depended on the ability to establish a
mock nonce value before running `SystemOperations.exec_create`

-
-

## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Currently there is a redundancy of only testing the zero case of nonce
for the `test_create`, we can factor out all nonce/address assertions in
`test_create` and have them done in a separate test,
`test_create_has_deterministic_address`

---------

Co-authored-by: kakarot CI <[email protected]>
anukkrit149 pushed a commit to karnotxyz/kakarot-rpc that referenced this issue Aug 9, 2024
This pr removes nonce management and uses starknet nonce wherever nonce
is required.

## Pull request type

<!-- Please try to limit your pull request to one type, submit multiple
pull requests if needed. -->

Please check the type of change your PR introduces:

- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

We currently manage nonce ourselves which causes multiple issues,
migrating to starknet nonce is a better solution and the PR implements
the required changes for that.

Resolves kkrt-labs#648 

## What is the new behavior?

- nonce management has been removed
- we now use starknet nonce wherever required

## Other information

- The rpc is already [using starknet
nonce](https://github.com/kkrt-labs/kakarot-rpc/blob/d6e3676de6fc9e804dc751aa3493810c95957bba/crates/core/src/client/mod.rs#L338),
which means that the current transactions by tools like metamask are
already being signed with starknet nonce and not our own nonce when RPC
is being used.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Enhancement of the code, not introducing new features.
Projects
No open projects
Archived in project
Development

No branches or pull requests

1 participant