xJonathanLEI / starkli

Starkli (/ˈstɑːrklaɪ/), a ⚡ blazing ⚡ fast ⚡ CLI tool for Starknet powered by 🦀 starknet-rs 🦀
https://book.starkli.rs
Apache License 2.0
155 stars 43 forks source link

feat: remove gateway fallback #49

Closed glihm closed 6 months ago

glihm commented 7 months ago

Some new users are starting to experience errors like:

[2023-11-28T04:41:06Z TRACE starknet_providers::sequencer] Response from sequencer API: {"code": "StarknetErrorCode.DEPRECATED_ENDPOINT", "message": "Endpoint is deprecated from version 0.12.3."}

I don't have official info but @xJonathanLEI you perhaps have some more accurate information about exact dates of Gateway deprecation. The warning is not enough for new users, and the use of --log-traffic is not obvious for non-experienced user so they are stuck until someone guide them to use RPC instead.

Any feedback on this would be appreciated. :pray:

glihm commented 7 months ago

Or perhaps only for the transactions, and we can keep the gateway for reading purposes? No idea what's you consider the best in this situation.

xJonathanLEI commented 6 months ago

Work is being done to replace the sequencer gateway fallback with free RPC service vendors. It's more work than it seems, as Starkli is currently stateless, and thus can't persist the chosen vendor (if we just randomly choose a vendor each time, UX would be super inconsistent). So persistence is being worked on first.

xJonathanLEI commented 6 months ago

Implemented in https://github.com/xJonathanLEI/starkli/commit/27402da9028f087b3868205abce7a9c9b1f538e7. --network mainnet etc. still Just Works, but instead with a random free vendor chosen under the hood. A message is printed to console the first time this happens for a network.

Initial support for profiles is added (though only a single default profile is supported at the moment).

Will close this once it's released.

xJonathanLEI commented 6 months ago

Free RPC vendor support is now available in release v0.2.1. A new section has also been added to the book.