Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metachain ts suites checklist #2167

Closed
79 tasks done
canonbrother opened this issue Jul 10, 2023 · 1 comment
Closed
79 tasks done

Metachain ts suites checklist #2167

canonbrother opened this issue Jul 10, 2023 · 1 comment
Labels

Comments

@canonbrother
Copy link
Contributor

canonbrother commented Jul 10, 2023

Summary

Open issue to track metachain ts suites.

1. Genesis Block

  • genesis balance is setup correctly
  • balance to be updated after transfer

2. Metachain RPC (BlockNumber tags)

  • earliest returns genesis
  • latest returns BlockchainInfo::best_hash number

not ready yet

- [ ] finalized uses BlockchainInfo::finalized_hash number
- [ ] safe is an alias for finalized in Polkadot

3. Metachain RPC (Block)

  • should be at block 1
  • should return genesis block by number
  • should have empty uncles and correct sha3Uncles
  • should have empty transactions and correct transactionRoot
  • should be at block 2 after block production (block 1 is at beginning in defi ecosys)
  • should have valid timestamp after block production
  • should return current block by latest
  • genesis block should be already available by hash
  • retrieve block information
  • get block by hash
  • get block by number
  • should include previous block hash as parent

4. Metachain RPC (Bloom)

  • receipt data should be in bloom

5. Metachain RPC (Contract Methods)

  • get transaction by hash
  • should return contract method result
  • should get correct environmental block number
  • should get correct environmental block gaslimit

blockhashcount not ready yet

- [ ] should get correct environmental block hash

err message mapping

- [ ] should fail for missing parameters
- [ ] should fail for too many parameters
- [ ] should fail for invalid parameters

5a. Metachain RPC (Contract)

  • eth_getStorageAt
  • SSTORE cost should properly take into account transaction initial value**
  • contract creation should return transaction hash
  • eth_call contract create should return code
  • eth_call at missing block returns error

6. Metachain RPC (Deprecated)

  • eth_getCompilers should be deprecated
  • eth_compileLLL should be deprecated
  • eth_compileSolidity should be deprecated
  • eth_compileSerpent should be deprecated

7. Metachain RPC (estimate gas historically)

not from origin test.. re-investigate after basic

- [ ] estimate gas historically should work

8. Metachain RPC (RPC execution)

  • should call with gas limit under block gas limit
  • should call with gas limit up to 10x block gas limit
  • should estimateGas with gas limit under block gas limit
  • input field alias is properly deserialized

No config and validation yet

- [ ] shouldn't call with gas limit up higher than 10x block gas limit
- [ ] should estimateGas with gas limit up to 10x block gas limit
- [ ] shouldn't estimateGas with gas limit up higher than 10x block gas limit
- [ ] should use the gas limit multiplier fallback

9. Metachain RPC (Fee History)

  • should return error on non-existent blocks
  • result length should match spec
  • should calculate percentiles

10. Metachain RPC (EthFilterApi)

  • should create a Log filter and return the ID
  • should increment filter ID
  • should create a Block filter and return the ID
  • should return unsupported error for Pending Transaction filter creation
  • should return responses for Block filter polling.
  • should return responses for Log filter polling.
  • should return response for raw Log filter request.
  • should uninstall created filters.

no block lifespan threshold configuration
- [ ] should drain the filter pool.

no pool max size configuration
- [ ] should have a filter pool max size of 500.

11. Metachain RPC (Gas)

  • eth_estimateGas for contract creation

Skip by default

- [ ] block gas limit over 5M
- [ ] gas limit should decrease on next block if gas unused
- [ ] gas limit should increase on next block if gas fully used

11a. Estimate Gas

  • eth_estimateGas for contract call
  • eth_estimateGas without gas_limit should pass
  • eth_estimateGas should handle AccessList alias
  • eth_estimateGas 0x0 gasPrice is equivalent to not setting one

11b. Gas Limit

  • tx gas limit below ETH_BLOCK_GAS_LIMIT
  • tx gas limit equal ETH_BLOCK_GAS_LIMIT
  • tx gas limit larger ETH_BLOCK_GAS_LIMIT

12. Metachain RPC (Invalid opcode estimate gas)

test is for estimate mode on

- [ ] should estimate gas with invalid opcode

13. Metachain RPC (Log filtering)

  • EthFilterApi::getFilterLogs - should filter out non-matching cases.
  • EthApi::getLogs - should filter out non-matching cases.

14. Metachain RPC (Log BlockNumber tags)

  • PREV PASSED: EthFilterApi::getFilterLogs - should handle earliest and latest tags
  • EthApi::getLogs - should handle earliest and latest tags

15. Metachain RPC (Max Priority Fee Per Gas)

  • should default to zero on genesis
  • should default to zero on empty blocks
  • maxPriorityFeePerGas should suggest the percentile 60 tip
  • maxPriorityFeePerGas should suggest zero if there are recent empty blocks

16. Metachain RPC (Net)

  • should return net_version

Not ready yet
- [ ] should return peer_count in hex directly using the provider
- [ ] should format peer_count as decimal using web3.net

17. Metachain RPC (Nonce)

  • get nonce

18. Metachain RPC (Pending Pool)

Not ready yet
- [ ] should return a pending transaction

19. Metachain RPC (Pending Transaction Count)

tags is not working on eth_getTransactionCount
- [ ] should return pending transaction count

20. Metachain RPC (Precompile)

  • should perform ecrecover
  • should perform identity directly

21. Metachain RPC (Revert Reason)

  • should fail with revert reason

22. Metachain RPC (Constructor Revert)

  • should provide a tx receipt after successful deployment
  • should provide a tx receipt after failed deployment

23. Metachain RPC (Constant)

  • should have 0 hashrate
  • should have chainId
  • should have no account

Block author is removed
- [ ] block author should be 0x0000000000000000000000000000000000000000

24. Metachain RPC (StateOverride)

not ready yet
- [x] should have balance above 1000 tether without state override
- [ ] should have a sender balance of 4500 with state override
- [x] should have availableFunds of 100 without state override
- [ ] should have availableFunds of 500 with state override
- [x] should have allowance of 10 without state override
- [ ] should have allowance of 50 with state override
- [ ] should have allowance of 50 but availableFunds 0 with full state override
- [ ] should set MultiplyBy7 deployedBytecode with state override

25. Metachain RPC (State root hash)

26. Metachain RPC (Subscription)

not ready yet
- [ ] should connect
- [ ] should subscribe
- [ ] should get newHeads stream
- [ ] should get newPendingTransactions stream
- [ ] should subscribe to all logs
- [ ] should subscribe to logs by multiple addresses
- [ ] should subscribe to logs by topic
- [ ] should get past events 1: by topic
- [ ] should get past events 2: by address
- [ ] should get past events 3: by address + topic
- [ ] should get past events 4: multiple addresses
- [ ] should support topic wildcards
- [ ] should support single values wrapped around a sequence
- [ ] should support topic conditional parameters
- [ ] should support multiple topic conditional parameters
- [ ] should combine topic wildcards and conditional parameters

27. Metachain RPC (Transaction Cancellation)

  • should cancel the pre-transaction whilst sending tx with same nonce
  • should prioritize transaction with the higher gasPrice

28. Metachain RPC (Transaction cost)

  • should take transaction cost into account and not submit it to the pool

29. Metachain RPC (Transaction Version)

  • should handle Legacy transaction type 0
  • should handle EIP-2930 transaction type 1
  • should handle EIP-1559 transaction type 2

30. Metachain RPC (Web3Api)

Not ready yet
- [ ] should get client version
- [ ] should remote sha3

@canonbrother
Copy link
Contributor Author

canonbrother commented Aug 28, 2023

remaining check list:

SSTORE

1. PREV PASSED: SSTORE cost should properly take into account transaction initial value

eth_feeHistory

2. result length should match spec
3. should calculate percentiles

eth_getFilterChanges

4. should return responses for Log filter polling.
5. should drain the filter pool.

eth_getFilterLogs

6. PREV PASSED: EthFilterApi::getFilterLogs - should handle earliest and latest tags

eth_maxPriorityFeePerGas

7. maxPriorityFeePerGas should suggest the percentile 60 tip
8. maxPriorityFeePerGas should suggest zero if there are recent empty blocks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant