RFC: Decouple Protostar from StarkNet
See original GitHub issueProtostar is heavily coupled with StarkNet which:
- increases maintenance and modification cost
- delays releases relatively to
cairo-lang
- makes the boundary between Protostar and StarkNet vague
This proposal suggest:
- introducing an abstract module (protostar.blockchain) between Protostar and StarkNet
- StarkNet internals are unstable, hence shouldn’t be used as a dependency
The dependencies between packages should be in the direction of the stability of the packages. A package should only depend upon packages that are more stable than it is. https://wiki.c2.com/?StableDependenciesPrinciple
- Abstraction represents Protostar’s expectations from StarkNet, which could allow us to move some parts of the adapter to the
cairo-lang
package reducing the maintenance cost - better modularity improves work separation / code ownership
- improved testability removes the need for creating integration tests when it’s not necessary resulting in faster tests
- recreating Protostar and StarkNet in Rust is going to be easier if both teams know interface ahead
- StarkNet internals are unstable, hence shouldn’t be used as a dependency
- keeping Protostar state in the
TestExecutionState
rather than in the adapter module- currently, part of the state is kept in the
TestExecuteState
(e.g.TestContext
) and other part inCheatableState
for unknown reasons
- currently, part of the state is kept in the
Issue Analytics
- State:
- Created a year ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Testing StarkNet contracts made easy with Protostar
Testing StarkNet contracts made easy with Protostar. In this article, I would like to introduce you to using Protostar for writing smart contracts...
Read more >Journey Through Cairo VIII — Writing And Deploying your first ...
Write a simple Starknet contract with Cairo. Understand Events, Constructors, External and View functions. Deploy your contract using Protostar.
Read more >Testing your StarkNet contracts with Protostar — Only Dust
In this article, I will give some tips to write unit tests with Protostar efficiently, and some proposal to design complicated tests and...
Read more >Deploy a simple storage smart contract on StarkNet - Chainstack
From the project main directory, run the following command to compile. You will receive a success message if the contract is compiled correctly....
Read more >StarkNet - Starkware
StarkNet is a permissionless decentralized Validity-Rollup (often referred to as ZK-Rollup). It operates as an L2 network over Ethereum, enabling any dApp ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have to discuss this F2F soon.
I’d say
Commander
is an abstraction overCheaters
.BlockInfoCheater
leaksStarkNet
implementation details in its name.