🚨 Breaking Changes in REST API (Release 9.3.0)
With the Blockscout Backend Release 9.3.0, breaking changes are being introduced for REST API. These changes expand the strict parameter validation framework that was partially rolled out in previous releases.
🔒 Expansion of Strict Parameter Validation
Strict parameter validation — previously applied to:
/api/v2/addresses/*/api/v2/blocks/*/api/v2/tokens/*
is now being expanded to almost all remaining REST API endpoints.
📍 Newly Affected Endpoints
The following endpoints will enforce strict validation rules starting in version 9.3.0:
/api/v2/transactions/*/api/v2/token-transfers/*/api/v2/internal-transactions/*/api/v2/config/*/api/v2/main-page/*/api/v2/smart-contracts/*/api/v2/stats/*/api/v2/search/*/api/v2/withdrawals/*
⚠️ What Strict Validation Means
Beginning with 9.3.0 (on those endpoints):
- Unexpected parameters will trigger validation errors.
- Unexpected or invalid parameter values will also generate errors.
❌ Example: Unexpected Parameter
Request:
api/v2/transactions/0xe45c00c5fb067719edbe93caf5373de87ac7e04ff079c53b00f7d6d93356467c/internal-transactions?limit=5
Response:
{
"errors": [
{
"title": "Invalid value",
"source": {
"pointer": "/limit"
},
"detail": "Unexpected field: limit"
}
]
}❌ Example: Unexpected Value Format
Request:
api/v2/transactions/0xe45c00c5fb067719edbe93caf5373de87ac7e04ff079c53b/internal-transactions
Response:
{
"errors": [
{
"title": "Invalid value",
"source": {
"pointer": "/transaction_hash_param"
},
"detail": "Invalid format. Expected ~r/^0x([A-Fa-f0-9]{64})$/"
}
]
}📘 Updated Swagger Documentation
- Swagger files for version 9.3.0:
https://github.com/blockscout/swaggers/tree/master/blockscout/9.3.0
💡 New environment variables
New environment variables list
| Variable | Description | Parameters |
|---|---|---|
INDEXER_DISABLE_HOT_SMART_CONTRACTS_FETCHER
| If true, Indexer.Fetcher.Stats.HotSmartContracts won't be started. Implemented in #13471.
| Version: v9.3.0+ Default: false Applications: Indexer |
MIGRATION_DELETE_ZERO_VALUE_INTERNAL_TRANSACTIONS_ENABLED
| Enable of delete zero-value calls migration. Implemented in #13305. | Version: v9.3.0+ Default: false Applications: Indexer |
MIGRATION_DELETE_ZERO_VALUE_INTERNAL_TRANSACTIONS_BATCH_SIZE
| Specifies the block batch size selected for the delete zero-value calls migration. Implemented in #13305. | Version: v9.3.0+ Default: 100 Applications: Indexer |
MIGRATION_DELETE_ZERO_VALUE_INTERNAL_TRANSACTIONS_STORAGE_PERIOD_DAYS
| Specifies the period for which recent zero-value calls won't be deleted in delete zero-value calls migration. Implemented in #13305. | Version: v9.3.0+ Default: 30 Applications: Indexer |
MIGRATION_DELETE_ZERO_VALUE_INTERNAL_TRANSACTIONS_CHECK_INTERVAL
| Specifies the interval between checking of new zero-value calls to be deleted in delete zero-value calls migration. Implemented in #13305. | Version: v9.3.0+ Default: 1m Applications: Indexer |
MARKET_DIA_BLOCKCHAIN
| Sets DIA platform from https://www.diadata.org/docs/reference/apis/token-prices/api-endpoints/blockchains. Implemented in #12678. | Version: v9.3.0+ Default: (empty) Applications: Indexer |
MARKET_DIA_BASE_URL
| If set, overrides the DIA API url. Implemented in #12678. | Version: v9.3.0+ Default: https://api.diadata.org/v1 Applications: API, Indexer |
MARKET_DIA_COIN_ADDRESS_HASH
| Sets address hash for native coin in DIA. Implemented in #12678. | Version: v9.3.0+ Default: (empty) Applications: API |
MARKET_DIA_SECONDARY_COIN_ADDRESS_HASH
| Sets address hash for secondary coin in DIA. Implemented in #12678. | Version: v9.3.0+ Default: (empty) Applications: API |
INDEXER_METRICS_ENABLED
| Flag to enable base indexer metrics. Implemented in #13539. | Version: v9.3.0+ Default: true Applications: Indexer |
INDEXER_METRICS_ENABLED_TOKEN_INSTANCES_NOT_UPLOADED_TO_CDN_COUNT
| Flag to enable indexer metric: the count of token instances not uploaded to CDN. Implemented in #13539. | Version: v9.3.0+ Default: false Applications: Indexer |
INDEXER_METRICS_ENABLED_FAILED_TOKEN_INSTANCES_METADATA_COUNT
| Flag to enable indexer metric: the count of token instances with failed metadata fetches. Implemented in #13539. | Version: v9.3.0+ Default: true Applications: Indexer |
INDEXER_METRICS_ENABLED_UNFETCHED_TOKEN_INSTANCES_COUNT
| Flag to enable indexer metric: the count of token instances pending to fetch. Implemented in #13539. | Version: v9.3.0+ Default: true Applications: Indexer |
INDEXER_METRICS_ENABLED_MISSING_CURRENT_TOKEN_BALANCES_COUNT
| Flag to enable indexer metric: the count of current token balances with missing values. Implemented in #13539. | Version: v9.3.0+ Default: true Applications: Indexer |
INDEXER_METRICS_ENABLED_MISSING_ARCHIVAL_TOKEN_BALANCES_COUNT
| Flag to enable indexer metric: the count of archival token balances with missing values. Implemented in #13539. | Version: v9.3.0+ Default: true Applications: Indexer |
INDEXER_OPTIMISM_L2_JOVIAN_TIMESTAMP
| Jovian upgrade L2 block timestamp. If set to 0, the Jovian is assumed to be active from genesis block. Implemented in #13538.
| Version: v9.3.0+ Default: (empty) Applications: API, Indexer |
INDEXER_ARC_NATIVE_TOKEN_DECIMALS
| Defines the number of decimals for Arc chain native token (e.g. USDC). Implemented in #13452. | Version: v9.3.0+ Default: 6 Applications: Indexer |
INDEXER_ARC_NATIVE_TOKEN_CONTRACT
| Arc chain native token contract address. Implemented in #13452. | Version: v9.3.0+ Default: 0x3600000000000000000000000000000000000000 Applications: Indexer |
INDEXER_ARC_NATIVE_TOKEN_SYSTEM_CONTRACT
| Arc chain system contract address emitting NativeCoinTransferred event. Implemented in #13452.
| Version: v9.3.0+ Default: 0x1800000000000000000000000000000000000000 Applications: Indexer |
🚀 Features
- Update InternalTransactionsAddressPlaceholder upserts (#13696)
- Internal transactions on demand fetcher (#13604)
- Indexer config API endpoint (#13679)
- Add DIA market source (#12678)
- Add metadata to eth bytecode DB lookup request (#13625)
- Support ZRC-2 tokens for
zilliqachain type (#13443) - Indexer monitor Prometheus metrics (#13539, #13668, #13670)
- Hot smart-contracts (#13471, #13669)
- Support OP Jovian upgrade, other enhancements (#13538)
- Scope celo under optimism chain type (#13375)
🐛 Bug Fixes
- Fix tests for on-demand internal transaction fetcher (#13744)
batch_numberinput param is now integer for OP and Scroll API endpoints (#13727)- Set timeout: :infinity for delete zero value migration (#13708)
- Limit batch size for placeholders insertion (#13699)
- Add missed reputation fetch (#13695)
- Fix NFTMediaHandler postgres parameters overflow error (#13694)
- Add smart contract preload to hot contracts query (#13691)
- Restore fetcher name to dev console output (#13681)
- JSON RPC encoding for signed authorizations (#13678)
- Fix 500 for pending tx in tokentx RPC API endpoint (#13666)
- Fix 500 for pending tx in gettxinfo RPC API endpoint(#13665)
Mix.env()inruntime.exs(#13641)- Celo aggregated election rewards migrator test (#13639)
- Fix filecoin web tests (#13634)
- Fix dialyzer test for filecoin chain type (#13623)
- Handle deposit status statement too complex (#13588)
- Beacon deposits: fallback to node (#13425, #13656)
- Fix logic of disable token exchange rate (#13414)
- Null-checks for distribution field in celo epochs api (#13457)
- Reset ResetSanitizeDuplicatedLogsMigration status (#13556)
- Duplicated block numbers in int txs queue (#13554)
- Fix coin balance history - related normalize_balances_by_day/2 function (#13515)
📚 Documentation
- Update API endpoints descriptions in OpenAPI (#13647)
⚡ Performance
- Improve performance of api/v2/main-page/indexing-status endpoint (#13730)
- Implement celo aggregated election rewards (#13418)
⚙️ Miscellaneous Tasks
- GitHub Actions workflows: stop using ELIXIR_VERSION & OTP_VERSION from org/repo variables (#13718)
- Refactoring of the application mode config (#13715)
- Eliminate warnings in the Swagger file (#13714)
- Change URL to Solidity binaries list (#13711)
- Add osaka to the default list of supported EVM versions (#13680)
- Filter out empty addresses from multichain export (#13674)
- Validate NFT_MEDIA_HANDLER_BUCKET_FOLDER env (#13671)
- Enhance RPC API errors logging (#13664)
- Use chain id
31337foranvil(#13644) - Update devcontainer image to use Elixir 1.19.4 (#13645)
- Elixir 1.19.3 -> 1.19.4 (#13643)
- Update devcontainer image to use Elixir 1.19 (#13637)
- Internal transaction, Token transfer, Withdrawal, Smart-contracts, Main Page, Stats, Config and Search controllers OpenAPI specs (#13557)
- Using own runner for build (#13624)
- Drop token_instances_token_id_index index (#13598)
- Add migration to drop unique tokens_contract_address_hash_index index (#13596, #13655)
- Elixir 1.17 -> 1.19 (#13566)
- Handle
NativeCoin*edevents on Arc chain to make dual token balances synced (#13452) - Improve DeleteZeroValueInternalTransactions migration (#13569)
- Remove address-related props from sending to multichain service (#13584)
- Move not auth cookies to headers (#13478)
- Transaction controller OpenAPI spec (#13419)
- Increase genesis file content fetch timeout (#13527)