Network

Life cycle of a block

Transactions from unfinalised blocks only live in cache, so new transactions will usually be in the cache first (for a couple blocks), then live in both the cache and the subQuery, later, after the cache expires, they only live in subQuery.
Developers who run a mandala node and eth-rpc-adaptor locally, won’t need to start any subQuery or database services for testing, deploying or calling the smart contracts, since new transactions will be in cache and findable without subQuery, as long as there is no need for querying the transactions older than 200 blocks.
Cache vs. SubQuery representation

Checking if a transaction exists

In subQuery

1
GET https://tc7-eth.aca-dev.network
2
{
3
"id": 0,
4
"jsonrpc": "2.0",
5
"method": "eth_getTransactionReceipt",
6
"params": ["0x10a36bbfa18cbb2b470a5d301a548feca6279de91013a5bd99e1654976ac013e"]
7
}
8
9
##### or see all of the transactions in the database
10
POST https://tc7-graphql.aca-dev.network
11
query {
12
transactionReceipts{
13
nodes {
14
transactionHash
15
}
16
},
17
}
Copied!

In cache

1
GET https://tc7-eth.aca-dev.network
2
{
3
"id": 0,
4
"jsonrpc": "2.0",
5
"method": "net_cacheInfo",
6
"params": []
7
}
Copied!