Skip to content

Commit

Permalink
release: starknet v1.6.0 (#358)
Browse files Browse the repository at this point in the history
### Summary

starknet: v1.6.0
  • Loading branch information
fracek authored Apr 9, 2024
2 parents 7990dde + 1265ab9 commit 21cc2d7
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 139 deletions.
46 changes: 23 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ reqwest = { version = "0.11.16", default-features = false, features = [
regex = "1.9.1"
serde = "1.0.155"
serde_json = "1.0.94"
# starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "6cadb1986" }
starknet = { git = "https://github.com/fracek/starknet-rs", rev = "e6c4a21a7ce5" }
starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "7153d0e42" }
# starknet = { git = "https://github.com/fracek/starknet-rs", rev = "e6c4a21a7ce5" }
thiserror = "1.0.32"
tempfile = "3.3.0"
tempdir = "0.3.7"
Expand Down
56 changes: 55 additions & 1 deletion core/proto/starknet/v1alpha2/starknet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ message BlockHeader {
string starknet_version = 7;
// Price of L1 gas in the block.
ResourcePrice l1_gas_price = 8;
// Price of L1 data gas in the block.
ResourcePrice l1_data_gas_price = 9;
// L1 data availability mode.
L1DataAvailabilityMode l1_data_availability_mode = 10;
}

enum L1DataAvailabilityMode {
// Unknown DA.
L1_DATA_AVAILABILITY_MODE_UNSPECIFIED = 0;
// Data published via blobs.
L1_DATA_AVAILABILITY_MODE_BLOB = 1;
// Data published via calldata.
L1_DATA_AVAILABILITY_MODE_CALLDATA = 2;
}

// Status of a block.
Expand Down Expand Up @@ -228,7 +241,7 @@ message TransactionReceipt {
// Transaction's indexe in the list of transactions in a block.
uint64 transaction_index = 2;
// Feed paid.
FieldElement actual_fee = 3 [ deprecated = true ];
FieldElement actual_fee = 3;
// Messages sent to L1 in the transactions.
repeated L2ToL1Message l2_to_l1_messages = 4;
// Events emitted in the transaction.
Expand All @@ -241,6 +254,8 @@ message TransactionReceipt {
string revert_reason = 8;
// Feed paid.
FeePayment actual_fee_paid = 9;
// The resources consumed by the transaction.
ExecutionResources execution_resources = 10;
}

// Message sent from L2 to L1 together with its transaction and receipt.
Expand Down Expand Up @@ -393,6 +408,45 @@ enum PriceUnit {
PRICE_UNIT_FRI = 2;
}

// Execution resources.
message ExecutionResources {
// Computation resources.
ComputationResources computation = 1;
// Data availability resources.
DataAvailabilityResources data_availability = 2;
}

// Computation resources.
message ComputationResources {
// The number of Cairo steps used.
uint64 steps = 1;
// The number of unused memory cells.
uint64 memory_holes = 2;
// The number of RANGE_CHECK builtin instances.
uint64 range_check_builtin_applications = 3;
// The number of Pedersen builtin instances.
uint64 pedersen_builtin_applications = 4;
// The number of Poseidon builtin instances.
uint64 poseidon_builtin_applications = 5;
// The number of EC_OP builtin instances.
uint64 ec_op_builtin_applications = 6;
// The number of ECDSA builtin instances.
uint64 ecdsa_builtin_applications = 7;
// The number of BITWISE builtin instances.
uint64 bitwise_builtin_applications = 8;
// The number of KECCAK builtin instances.
uint64 keccak_builtin_applications = 9;
// The number of accesses to the segment arena.
uint64 segment_arena_builtin = 10;
}

message DataAvailabilityResources {
// The gas consumed by this transaction's data, 0 if it uses data gas for DA.
uint64 l1_gas = 1;
// The data gas consumed by this transaction's data, 0 if it uses gas for DA.
uint64 l1_data_gas = 2;
}

message ResourceBoundsMapping {
// Maximum amount and price of L1 gas.
ResourceBounds l1_gas = 1;
Expand Down
16 changes: 16 additions & 0 deletions starknet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ The format is based on [Common Changelog](https://common-changelog.org/), and
this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.6.0] - 2024-04-09

_Add support for RPC v0.7.1._

### Added

- Add fields related to the new blob DA layer.
- Add execution resources fields to `TransactionReceipt`. You can use this fields to
retrieve how many resources (like Cairo steps, builtin applications, or L1 gas) each
transaction used.

### Changed

- The ingestion service now uses Starknet RPC v0.7.1. To ensure that you're using
the right version, append `/rpc/v0_7` to the RPC url.

## [1.5.0] - 2024-03-15

_Stream reverted transactions and events._
Expand Down
2 changes: 1 addition & 1 deletion starknet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apibara-starknet"
version = "1.5.0"
version = "1.6.0"
edition.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
Loading

0 comments on commit 21cc2d7

Please sign in to comment.