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

fixed: typo in starknet_estmateFee + added concensus on Starknet (rather than StarkNet) #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#0C3511",
"titleBar.activeBackground": "#114A18",
"titleBar.activeForeground": "#F3FCF4"
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# StarkNet Specifications
# Starknet Specifications

This repository publishes different technical specifications pertaining to the implementation and interaction with StarkNet.
This repository publishes different technical specifications pertaining to the implementation and interaction with Starknet.

## API

Expand Down
2 changes: 1 addition & 1 deletion api/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Goal

Our goal is to allow collaboration on definition of the API specification for a StarkNet full node, while at the same time provide a reliable framework for understanding existing releases and ongoing work.
Our goal is to allow collaboration on definition of the API specification for a Starknet full node, while at the same time provide a reliable framework for understanding existing releases and ongoing work.
This document outlines how releases for the node API specification is managed and released.

## General Scheme
Expand Down
20 changes: 10 additions & 10 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openrpc": "1.0.0-rc1",
"info": {
"version": "0.6.0",
"title": "StarkNet Node API",
"title": "Starknet Node API",
"license": {}
},
"servers": [],
Expand Down Expand Up @@ -533,7 +533,7 @@
},
{
"name": "starknet_call",
"summary": "call a starknet function without creating a StarkNet transaction",
"summary": "call a starknet function without creating a Starknet transaction",
"description": "Calls a function in a contract and returns the return value. Using this call will not create a transaction; hence, will not change the state",
"params": [
{
Expand Down Expand Up @@ -581,7 +581,7 @@
},
{
"name": "starknet_estimateFee",
"summary": "estimate the fee for of StarkNet transactions",
"summary": "estimate the fee for Starknet transactions",
"description": "Estimates the resources required by a given sequence of transactions when applied on a given state. If one of the transactions reverts or fails due to any reason (e.g. validation failure or an internal error), a TRANSACTION_EXECUTION_ERROR is returned. For v0-2 transactions the estimate is given in wei, and for v3 transactions it is given in fri.",
"params": [
{
Expand Down Expand Up @@ -730,7 +730,7 @@
},
{
"name": "starknet_chainId",
"summary": "Return the currently configured StarkNet chain id",
"summary": "Return the currently configured Starknet chain id",
"params": [],
"result": {
"name": "result",
Expand Down Expand Up @@ -934,7 +934,7 @@
},
"EVENT": {
"title": "Event",
"description": "A StarkNet event",
"description": "A Starknet event",
"allOf": [
{
"title": "Event emitter",
Expand Down Expand Up @@ -1123,7 +1123,7 @@
},
"CHAIN_ID": {
"title": "Chain id",
"description": "StarkNet chain id, given in hex representation.",
"description": "Starknet chain id, given in hex representation.",
"type": "string",
"pattern": "^0x[a-fA-F0-9]+$"
},
Expand Down Expand Up @@ -1299,7 +1299,7 @@
},
"TXN_HASH": {
"$ref": "#/components/schemas/FELT",
"description": "The transaction hash, as assigned in StarkNet",
"description": "The transaction hash, as assigned in Starknet",
"title": "Transaction hash"
},
"FELT": {
Expand Down Expand Up @@ -1403,7 +1403,7 @@
},
"sequencer_address": {
"title": "Sequencer address",
"description": "The StarkNet identity of the sequencer submitting this block",
"description": "The Starknet identity of the sequencer submitting this block",
"$ref": "#/components/schemas/FELT"
},
"l1_gas_price": {
Expand Down Expand Up @@ -1445,7 +1445,7 @@
},
"sequencer_address": {
"title": "Sequencer address",
"description": "The StarkNet identity of the sequencer submitting this block",
"description": "The Starknet identity of the sequencer submitting this block",
"$ref": "#/components/schemas/FELT"
},
"l1_gas_price": {
Expand Down Expand Up @@ -3347,7 +3347,7 @@
},
"DEPRECATED_CONTRACT_CLASS": {
"title": "Deprecated contract class",
"description": "The definition of a StarkNet contract class",
"description": "The definition of a Starknet contract class",
"type": "object",
"properties": {
"program": {
Expand Down
2 changes: 1 addition & 1 deletion api/starknet_trace_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openrpc": "1.0.0-rc1",
"info": {
"version": "0.5.0",
"title": "StarkNet Trace API",
"title": "Starknet Trace API",
"license": {}
},
"servers": [],
Expand Down
2 changes: 1 addition & 1 deletion api/starknet_write_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openrpc": "1.0.0-rc1",
"info": {
"version": "0.5.0",
"title": "StarkNet Node Write API",
"title": "Starknet Node Write API",
"license": {}
},
"servers": [],
Expand Down
20 changes: 10 additions & 10 deletions starknet_vs_ethereum_node_apis.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General

This document provides information to developers who wish to work with StarkNet's node RPC API and
This document provides information to developers who wish to work with Starknet's node RPC API and
are familiar with Ethereum's RPC API. The document focuses on existing APIs, specifically targeting
distributed application developers.

Expand All @@ -12,21 +12,21 @@ Below you can find a summary of the changes, whether cross-cutting or method-spe
provide a mapping of methods.

We currently compare Ethereum 1.0 API, as defined [here](https://github.com/ethereum/execution-apis),
and [StarkNet's API](https://github.com/starkware-libs/starknet-specs/blob/master/api/starknet_api_openrpc.json).
and [Starknet's API](https://github.com/starkware-libs/starknet-specs/blob/master/api/starknet_api_openrpc.json).

Familiarity with Ethereum and [StarkNet](https://starkware.co/product/starknet/) is assumed herein.
Familiarity with Ethereum and [Starknet](https://starkware.co/product/starknet/) is assumed herein.

## Cross-Cutting Changes

Some differences are more fundamental and manifest in different API methods.

**Block and Transaction objects:** Block and transaction objects have a somewhat different structure
compared to Ethereum. These changes are mainly due to different network mechanics, e.g., no proof
of work in StarkNet.
of work in Starknet.

**Block Tags:** In some cases, the API refers to a block using relative tags that point to a block
in a specific position in the chain or state (latest, earliest, pending). Where applicable,
StarkNet allows referring only to the latest block, using the `latest` tag.
Starknet allows referring only to the latest block, using the `latest` tag.

## Naming Conventions

Expand All @@ -35,18 +35,18 @@ The `eth` prefix is replaced with `starknet`.

## Types

The fundamental data type in StarkNet is a field element. As a corollary, all resulting blocks and
The fundamental data type in Starknet is a field element. As a corollary, all resulting blocks and
transactions' hashes are also field elements. When referring to a block/transaction type or an
address, StarkNet uses a field element, not a 256-bit number.
address, Starknet uses a field element, not a 256-bit number.

The field element type in StarkNet is based on the field in the underlying Cairo VM.
The field element type in Starknet is based on the field in the underlying Cairo VM.
In other words, a value x of a field element type is an integer in the range of `0≤x<P`. `P` is currently defined as `2^251+17*2^192+1`

# Mapping of Methods

We list below the methods in Ethereum's API and their corresponding StarkNet methods.
We list below the methods in Ethereum's API and their corresponding Starknet methods.

|Ethereum Method|StarkNet Method|Differences From Ethereum|
|Ethereum Method|Starknet Method|Differences From Ethereum|
|---------------|---------------|-------------------------|
|eth_blockNumber|starknet_blockNumber|Will return only the block number |
|eth_chainId|starknet_chainId| |
Expand Down