Releases: eqlabs/pathfinder
v0.3.5
This release fixes an issue with the starknet_estimateFee
call. Previously a version 0 invoke transaction with a version field set to a query version (>2**128) caused an internal error.
Changed
- Improved performance for operations involving a lot of Stark hash calculations, like syncing.
- Improved performance for
starknet_call
andstarknet_estimateFee
calls for transactions involving a lot of storage accesses.
Fixes
starknet_estimateFee
now works for version 0 invoke transactions using a query version.
Added
- New metrics for external python subprocesses
extpy_processes_launched_total
extpy_processes_exited_total
extpy_processes_failed_total
Full Changelog: v0.3.4...v0.3.5
v0.3.4
This release upgrades our internal starknet-vm from 0.9.1 to 0.10. It should now be possible to use starknet_call
and starknet_estimateFee
on the new transaction types
In addition, this release also performs a database migration to remove some extra bogus events that slipped in with the StarkNet 0.10 update on testnet. This migration may take a while to perform, and depends on how many blocks you sync'd during the affected period. The migration will log progress and an ETA.
Changed
- internal starknet-vm upgrade to latest 0.10 version
entry_point_selector
is now an optional parameter forstarknet_estimateFee
in order to allow for the new StarkNet 0.10 invoke transaction type.
Fixed
starknet_estimateFee
does not acceptnonce
parameter- V1 invoke transactions returned
0
fornonce
andversion
fields - Some
starknet_call
andstarknet_estimateFee
queries return internal error involving'compiler_version': ['Unknown field.']
- This was less a bug, and more a result of upgrading our internal-vm
- add a work-around for StarkNet gateway bug where the
nonce
field is missing for historicL1_HANDLER
transactions - blocks with a hash mismatch are accepted
Full Changelog: v0.3.3...v0.3.4
v0.3.3
Class hash mismatch bug
The focus of this minor release is to fix a bug in our class hash algorithm introduced by some backwards incompatible changes from StarkNet 0.10
. You may have seen this bug preventing your sync from progressing, with this warning being logged:
WARN L2 sync process terminated with: Deploying new contracts for block StarknetBlockNumber(322614)
Caused by:
0: Download and compress contract ContractAddress(0x03DA98FD5A98D49819E38840D0AED1D5A61E14753358456C61224A5850E841C1)
1: Class hash mismatch for contract ContractAddress(0x03DA98FD5A98D49819E38840D0AED1D5A61E14753358456C61224A5850E841C1)
This has now been fixed.
Fixed
- class hash mismatch
Full Changelog: v0.3.2...v0.3.3
v0.3.2
StarkNet 0.10 support
This release enables support for StarkNet 0.10. This version is compatible with both StarkNet 0.9.1 and 0.10 and we urge you to update before StarkNet 0.10 is released.
Previous versions of pathfinder will no longer be able to sync on blocks from StarkNet version 0.10 and onwards.
JSON-RPC changes
We have attempted to keep changes to the JSON-RPC API minimal in order to stay aligned with the JSON-RPC specification version 0.1.0. However, this was not 100% possible as StarkNet 0.10 adds new features incompatible with the specification.
This situation will be improved once version 0.2.0 of the JSON-RPC specification is released.
The changes and impacts are detailed below.
L1 Handler
transaction
StarkNet 0.10 introduces a new transaction type; L1 Handler
-- we have added this to our transaction enum list where applicable. We have taken the new type from the release candidate of the JSON-RPC specification v0.2.0 which you can see here.
starknet_call
and starknet_estimateFee
Our internal version of the starknet-vm is still lagging behind on v0.9.1. This means that newer StarkNet transactions (version 1) are unlikely to work when calling starknet_call
and starknet_estimateFee
. We will address this in an upcoming release.
Prometheus metrics support
We now provide Prometheus metrics! These are available via the route <monitoring-address>/metrics
when the monitoring API is enabled.
Monitoring can be enabled by specifying the --monitor-address
.
Currently metrics comprise the rpc_method_calls_total
counters, where label key method
should be used to point to the counter for a particular RPC method, for example: rpc_method_calls_total{method="starknet_getBlockWithTxs"}
.
Added
- Support for
StarkNet 0.10
- Support for Prometheus metrics
Fixed
- Potential DoS loop when gateway responses are not parseable (e.g. due to a major StarkNet update :P).
- JSON-RPC
starknet_getEvents
does not use snake case forfrom_block
andto_block
. This was incorrectly usingfromBlock
andtoBlock
-- these are still allowed in order to not break anyone using the old form. This compatibility may be removed in a future breaking release. - various readme documentation fixes
- document monitoring API
- update starknet discord link (previous one was no longer valid)
- improve docker instructions to use the same UID/GID
Full Changelog: v0.3.1...v0.3.2
Acknowledgements
@fracek for the first attempt at introducing metrics to the project.
v0.3.1
Important bug fix update
This point release contains an important fix for a state hash collision and should be applied as fast as possible.
This update also contains a couple of smaller features like a basic monitoring API.
The bug
The bug occurs due to a rare hash collision in the merkle state tree. Unfortunately, it silently corrupts the database in a non-recoverable way. This means that all databases should be considered suspect and you should re-sync from scratch after updating. To make this process easier, we have provided snapshots for both mainnet and testnet.
While this bug has been present in all versions of pathfinder
, it only became possible to trigger this bug in the past week on StarkNet.
Naming change
You may have noticed that we have dropped the -alpha
suffix from this release. This was mistakenly used in our prior releases due to a misunderstanding of how this semantic versioning naming worked. According to semver it is meant to indicate a pre-release of that version i.e. v0.1.1-alpha
is a pre-release and one should expect a non-alpha v0.1.1
to follow at some stage. However, we simply wanted to use it to indicate that pathfinder
is still in alpha -- this is however adequately indicated by the 0.x.y
version number already.
We have therefore decided to drop the -alpha
suffix in order to cause less confusion :)
Added
Monitoring endpoint
You can now enable a monitoring endpoint using --monitor-address IP:PORT
. This adds /health
and /ready
queries which can be used to monitor the health and readiness of your pathfinder
node. For more information see our readme.
Changed
- No longer store leaf nodes. This is a minor (1-2%) reduction in database size.
Fixed
- Minimum Rust version by @haritowa in 506
- Rare database migration bug for the events schema
- Less rare database migration bug involving
max fee
for historical blocks
New Contributors
Full Changelog: v0.3.0-alpha...v0.3.1
v0.3.0-alpha
⚠️ This release contains breaking changes ⚠️
Database
This release adds support for starknet_getStateUpdate
. Unfortunately the data required to serve this data is not present in existing pathfinder databases. This means that in order to support this query for all blocks, you will need to re-sync your node. If you do not do this, then this query won't succeed for blocks that your node has already downloaded.
We will provide updated snapshots in order to speed up this re-sync process.
JSON-RPC API
The JSON-RPC API has been updated to conform to the first formal StarkNet JSON-RPC specification. Our readme contains all the relevant information and links to the new API.
The specific changes, additions and removals are listed in the relevant sections below.
pending
support
Pathfinder supports querying the pending
StarkNet state. See our readme for specifics on what this is.
The breaking change is two-fold:
- Previously, pathfinder simply proxied
pending
queries to the gateway. This is fundamentally against how pathfinder is supposed to operate as no validation or verification of the result was possible. Instead, pathfinder now periodically polls thepending
data and verifies it locally in-so-far as possible. pending
support is disabled by default and can be enabled with--poll-pending=true
option
Sqlite-WAL
We've had the --sqlite-wal=true|false
option available for a while now. In this release we've changed the default from false
to true
. The only reason to keep this set to false
should be if you are using network storage. Enabling this option improves our database's read and write concurrency.
added
- JSON-RPC API
starknet_getBlockWithTxHashes
starknet_getBlockWithTxs
starknet_getStateUpdate
starknet_getTransactionByBlockIdAndIndex
starknet_getBlockTransactionCount
starknet_getNonce
starknet_blockHashAndNumber
starknet_pendingTransactions
starknet_getEvents
- docker-compose by @sven-hash #487
- Support
pending
locally (see our readme for more info)
changed
- JSON-RPC API
starknet_getStorageAt
starknet_getClassHashAt
starknet_getClassAt
starknet_call
starknet_estimateFee
starknet_addDeployTransaction
(now accepts optionalabi
field)starknet_addDeclareTransaction
(now accepts optionalabi
field)
removed
- JSON-RPC API
starknet_getBlockByHash
starknet_getBlockByNumber
starknet_getTransactionByBlockHashAndIndex
starknet_getTransactionByBlockNumberAndIndex
starknet_getCode
starknet_getBlockTransactionCountByHash
starknet_getBlockTransactionCountByNumber
- proxying
pending
queries to the gateway
fixed
- rare database locked error when spawning python processes
- broken pipe exceptions from python processes
New Contributors
- @sven-hash made their first contribution in #487
Full Changelog: v0.2.6-alpha...v0.3.0-alpha
v0.2.6-alpha
The release upgrades cairo-lang
used in starknet_call
and starknet_estimateFee
to the latest version.
Changed
- fix(sync): write transactions are started as write transactions instead of deferred #454
- chore(py): upgrade to cairo-lang 0.9.1 #463
Full Changelog: v0.2.5-alpha...v0.2.6-alpha
v0.2.5-alpha
Release aiming to support upcoming starknet-0.9.1, no external changes. Everyone must upgrade to this version before testnet and mainnet are upgraded in order to not break syncing to latest blocks.
added
- support for starknet 0.9.1 release #448
changed
- feat: reduce mainnet poll interval from 15 minutes to 5 minutes #443
fixed
- fix: wal config in
--help
suggests wrong options #442
Full Changelog: v0.2.4-alpha...v0.2.5-alpha
v0.2.4-alpha
v0.2.4-alpha
added
--sqlite-wal
option for more concurrent database access #405, #413- this improves the RPC throughput for non-cairo-vm queries, and prevents high latency spikes during block update writes
- option must not be turned on when data is on network filesystem (nfs)
- option defaults to false, but may become true in a future release
- verify database matches the given Ethereum network #397
- verify that the data directory is writeable by pathfinder #421
- provide a hint with
address already in use
solutions #427 - log
starknet_call
andstarknet_estimateFee
failures #416- these logs can be enabled by adding
pathfinder_lib::cairo::ext_py[stderr]=debug
to theRUST_LOG
environment variable, e.g.RUST_LOG=info,pathfinder_lib::cairo::ext_py[stderr]=debug
- these logs can be enabled by adding
changed
- more informative error messages with hints #423
removed
- additional debug information for L1 sync issue #435
- documentation referring to already removed ethereum.user-agent option #414
fixed
- event ordering #434
- event's were being ordered by transaction hash instead of index
- download missing declare-only classes #407, #436
- the missing classes will be downloaded on startup
- fix
gas_consumed
ofstarknet_estimateFee
#429 - stop retrying when fetching initial L1 chain_id on permission denied #423
starknet_getClass
andstarknet_getClassAt
wrong return type #408
v0.2.3-alpha
Big feature release, added new rpc endpoints and configurability.
Added
- feat(rpc):
starknet_estimateFee
#388 #400- Note: there is a known issue where contracts involving a
library_call
are currently not supported. This limitation also applies tostarknet_call
. A fix for this is planned for the next release.
- Note: there is a known issue where contracts involving a
- feat(sync): Verify block hashes #308
- feat(rpc):
starknet_{call,estimateFee}
will now returnINVALID_ENTRY_POINT
errors #396 - feat(storage): use a connection pool for RPC queries #347
- This improves the performance of the RPC server significantly, and should see a large CPU usage reduction when under load.
- feat(sync): support sequencer url configuration #379
- This is useful if using a proxy in front of the Starknet Gateway.
- feat(rpc):
starknet_{getClass,getClassHashAt,getClassAt}
#350 - feat(cli):
--python-subprocesses <NUM>
configuration option #385
Changed
Full Changelog: v0.2.2-alpha...v0.2.3-alpha