Commit Graph

199 Commits

Author SHA1 Message Date
Vadim Filin
5414e06e46 Add support for Algorand Virtual Machine (AVM) blockchain (#813)
* add AVM blockchain type support for Algorand

Introduce a new blockchain type `avm` (Algorand Virtual Machine) so
Algorand-based chains (Mainnet, Testnet, Betanet) declared in chains.yaml
can be parsed and driven through dshackle's generic polling pipeline.

Key additions:
- BlockchainType.AVM (JSON_RPC) and `avm` mapping in chain codegen
- AvmChainSpecific: polls `algod_getBlock` for latest block and uses
  `algod_status` / `algod_genesis` for health and settings validation
- DefaultAvmMethods: allowed algod_* RPC surface with send-transaction
  broadcast quorum and hardcoded `algod_chainId` / `algod_genesisId`
- AvmLowerBoundService / AvmLowerBoundStateDetector for lower-bound tracking
- Registration in ChainSpecificRegistry and CallTargetsHolder
- Unit tests for block parsing, sync validation and method policies

https://claude.ai/code/session_01TZ64DZis9YaJSU3oMwtRLe

* inline DummyChainReader in AVM test

Match the Starknet test pattern and drop the dedicated DummyChainReader
file; instead pass an anonymous ChainReader directly where needed.

https://claude.ai/code/session_01TZ64DZis9YaJSU3oMwtRLe

* fix AVM network validation logic

Validation used AND across all conditions, so when netVersion was 0
(typical for non-EVM chains) the check short-circuited and allowed a
mismatching chain.chainId through. Simplify to the Cosmos pattern:
reject when chain.chainId is set and doesn't match genesis.network.

https://claude.ai/code/session_01TZ64DZis9YaJSU3oMwtRLe

* switch AVM to REST transport for native algod nodes

Native Algorand algod nodes expose a REST API (/v2/status, /v2/blocks,
/v2/transactions, ...) rather than JSON-RPC, so drive AVM upstreams
through dshackle's REST reader instead:

- BlockchainType.AVM is now ApiType.REST
- AvmChainSpecific polls GET#/v2/status for latest block info and uses
  GET#/v2/genesis for chain-id validation, both via RestParams
- DefaultAvmMethods exposes the algod /v2 endpoints with VERB#/path
  identifiers (POST#/v2/transactions uses BroadcastQuorum for sends)
- Tests updated to match the REST-based method names

https://claude.ai/code/session_01TZ64DZis9YaJSU3oMwtRLe

* align AVM endpoints with algod OpenAPI spec

Validated the AVM method surface against the official algod spec
(algorand/go-algorand algod.oas3.yml) and corrected mismatches:

Wrong paths removed:
- GET /v2/genesis, /v2/versions, /v2/health, /v2/ready, /v2/metrics
  (these exist at root level, not under /v2/)
- GET /v2/blocks/{round}/header (use header-only query on /v2/blocks/{round})
- GET /v2/blocks/{round}/transactions (no such path)
- GET /v2/lightheader/{round} (real path is /v2/blocks/{round}/lightheader/proof)
- POST /v2/transactions/dryrun (real path is /v2/teal/dryrun, already listed)

Added real endpoints:
- Root: GET /genesis, /health, /ready, /metrics, /versions, /swagger.json
- /v2/blocks/*/txids, /v2/blocks/*/logs, /v2/blocks/*/lightheader/proof
- /v2/accounts/*/transactions/pending
- /v2/deltas/*, /v2/deltas/*/txn/group, /v2/deltas/txn/group/*

Also fixed AvmChainSpecific settings validator: use GET#/genesis (root)
instead of the non-existent GET#/v2/genesis.

Added regression test asserting the spurious paths are NOT callable.

https://claude.ai/code/session_01TZ64DZis9YaJSU3oMwtRLe

* fetch real AVM block data via chained api.read

parseBlock now uses the ChainReader passed through AbstractPollChainSpecific
to fetch GET#/v2/blocks/{lastRound}?header-only=true after /v2/status,
so BlockContainer.timestamp comes from block.ts and hash/parentHash
decode from block.seed/block.prev (base64 -> 32 raw bytes) instead of
being synthesized from the round number.

Also differentiate quorum per method in DefaultAvmMethods: single-
resource lookups (/v2/blocks/{round}, /v2/accounts/{addr}, etc.) now
use NotNullQuorum so a single replica returning empty/404 doesn't
shadow a valid response from another upstream. List and status
endpoints keep AlwaysQuorum; send endpoints keep BroadcastQuorum.

https://claude.ai/code/session_01TZ64DZis9YaJSU3oMwtRLe

* Update submodules

* Update chains

* Fix settings validation

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 13:10:56 +02:00
msizov
e8232231df add lower bound cronos (#810) 2026-04-16 18:20:46 +05:00
msizov
f38bc660c3 update public repo (#809) 2026-04-16 17:26:15 +05:00
Anton
56f6bb3a7b Add Robinhood and TAC Chains (#804)
* add Robinhood Chain testnet support

Update emerald-grpc submodule with CHAIN_ROBINHOOD__TESTNET = 10190.

* update submodules to include TAC chain merge

Sync emerald-grpc and public submodules to latest.
2026-03-17 19:31:18 +03:00
msizov
d259c3933a update polygon's chains.yaml entry (#803) 2026-03-17 15:41:18 +05:00
Vadim Filin
9a72a3232c Introduce Morph chain (#802)
* Introduce Morph chain

* Temp bind app type to ETHEREUM
2026-03-13 16:00:52 +01:00
KirillPamPam
fc85b68175 New pub (#798) 2026-03-02 17:43:47 +04:00
KirillPamPam
7d73099e72 New pub (#797) 2026-02-26 17:39:00 +04:00
Anton
b375fd34b4 Update saigon chain id (#791) 2026-02-06 00:15:11 +03:00
Vadim Filin
ee72ca37be Update saigon chain id (#790) 2026-02-06 00:10:48 +03:00
Anton
1c4b0e93d2 feat: add Moca mainnet and testnet chain (#789) 2026-02-05 16:17:59 +03:00
Artem Rootman
21d36f07af update chains.yaml (#786) 2026-01-30 19:20:42 +03:00
Artem Rootman
4d4a2ed655 add aztec networks (#785)
* add aztec networks

* fix linter errors & checkout from main (public)

* fix AztecLowerBoundService
2026-01-30 19:04:05 +03:00
Vadim Filin
116807054a Add tempo support (#784) 2026-01-29 21:12:40 +07:00
Vadim Filin
5b4e8884ba Handle 429 error (#782) 2026-01-28 18:06:14 +07:00
KirillPamPam
3b5940cc20 Integrate rx/receipts gold bounds (#781) 2026-01-28 12:54:50 +04:00
KirillPamPam
897d98dfb1 MegaETH support (#779) 2026-01-23 13:49:58 +04:00
msizov
40fdabe790 add tempo moderato testnet (#778) 2026-01-21 16:31:22 +05:00
Anton
cd57300751 Solana Head Detection: slotSubscribe (#772)
* Implement Solana head detection strategies with metrics tracking and testing

* Add benchmark tests for Solana BlockSubscribe and SlotSubscribe strategies

* Implement metrics logging and strategy configuration for Solana head detection

* Add metrics logging and comparison for SLOT_SUBSCRIBE strategy

* Refactor SolanaChainSpecificTest: Consolidate tests for slotSubscribe strategy, remove BlockSubscribe tests, and enhance caching logic. Delete SolanaStrategyBenchmark for performance comparison.

* add synthetic parentHash, improve tests

* Fix linter

* Optimize Solana getLatestBlock to use single getEpochInfo call
Replace two separate RPC calls (getSlot + getBlockHeight) with a single getEpochInfo call that returns both absoluteSlot and blockHeight

* Enhance height estimation logic in SolanaChainSpecific: Implement optimistic height estimation and improve error handling for RPC failures. Update tests to validate new behavior.

* Refactor height verification in SolanaChainSpecific: Replace getBlockHeight with getEpochInfo for improved efficiency and accuracy in height estimation. Update logic to handle actual slot and height retrieval.
2026-01-19 11:25:16 +03:00
KirillPamPam
4a9de83815 New chains (#769) 2026-01-08 17:42:29 +04:00
KirillPamPam
536c663b2a Update dependencies (#767) 2026-01-06 16:32:03 +04:00
Anton
9d4f4a185e add tempo tesnet and update xlayer testnet (#764) 2025-12-24 11:59:13 +03:00
KirillPamPam
0f42f34061 Update pub (#753) 2025-12-09 15:12:42 +04:00
a10zn8
080d92a6c1 update public (#748) 2025-12-02 14:26:52 +03:00
EugeneDrpc
ea7e8ef07c public submodule update (#747) 2025-12-01 16:12:58 +01:00
KirillPamPam
1381400a98 Update deps (#742) 2025-11-11 18:44:54 +04:00
KirillPamPam
a491983a87 Fix bsc state bound detection (#741) 2025-11-06 13:46:19 +04:00
a10zn8
8d042f4a10 update taiko chainid (#735) 2025-10-28 15:52:34 +03:00
a10zn8
475829249e add arc (#734) 2025-10-27 00:32:17 +03:00
a10zn8
fba0b139c3 add sophor support (#732) 2025-10-10 16:07:24 +03:00
a10zn8
3bd4ab3b28 add doma network (#731) 2025-10-09 00:12:29 +03:00
Anton
b7f6f4b0d4 0g upd chainid (#729) 2025-10-01 14:35:05 +03:00
Anton
cb1dbc9510 Add Taiko Hoodi & fix katana testnet (#728) 2025-09-30 13:06:13 +03:00
Anton
d41e5eac78 katana (#727) 2025-09-29 15:33:09 +03:00
a10zn8
da347d9de3 add plasma (#726) 2025-09-19 23:38:23 +03:00
msizov
50158b0a5c Update zetachain netversion (#724) 2025-09-18 14:52:07 +05:00
KirillPamPam
097995ce2a Add shibarium (#723) 2025-09-16 17:57:34 +04:00
KirillPamPam
650fa5cf0e Monad mainnet (#720) 2025-09-09 13:37:20 +04:00
EugeneDrpc
68cbeaad7f plume updates - submodule update (#718)
* plume updates

* fix linter
2025-09-03 13:02:59 +02:00
Anton
bf935cf527 gnosis-beacon-chain (#710) 2025-08-22 16:18:39 +03:00
Anton
9a5c3e986e sonic testnet (#708) 2025-08-22 14:48:59 +03:00
Termina1
a6ba521dd8 update chains.yml 2025-08-20 19:56:40 +03:00
msizov
31b0b8a324 Add celo sepolia (#705)
* add monad nonretryable error

* add celo sepolia
2025-08-15 18:09:48 +05:00
KirillPamPam
cf2851201b Update public (#701) 2025-08-12 19:14:11 +04:00
EugeneDrpc
a34f2186cc Log index validator (#699)
* log index validator - wip

* fix: Handle edge cases in LogIndexValidator and fix GitHub Actions

gix critical edge case: when first transaction has no logs, second transaction starting at logIndex=0 is VALID behavior
 null handling
fix  'repo_token' parameter

* - Use Mono.empty() instead of Mono.just(null)
- Use defaultIfEmpty for handling empty results

* wip : add tests for LogIndexValidator

* test fixes

* fix: Fix ktlint issues in LogIndexValidatorTest

- Remove wildcard import
- Fix trailing spaces
- Add missing trailing commas
- Fix import order
- Add newline at end of file

* add disable option

* add logs for error case

* save prevState on doOnNext

* also check for first tx log index order

* add not continius indexes test

* make code thread safe

* use upstream.getHead

* search CHECK_TX_COUNT instead of 0 and 1 indexes

* refactor double rpc call
2025-08-08 18:03:10 +02:00
Anton
7b5ae7b8c3 upd bsc config (#688) 2025-07-17 12:12:34 +03:00
KirillPamPam
c371239747 Update pub (#685) 2025-07-16 14:28:08 +04:00
Vyacheslav
b940ce9efa erigon bug detector (#683) 2025-07-14 16:51:43 +02:00
msizov
c025cbd840 add hemi support (#681) 2025-07-10 20:08:03 +05:00
Andrey Bronin
a435ca72d9 MegaETH testnet support (#676) 2025-06-19 15:47:18 +03:00