devgrants
                                
                                
                                
                                    devgrants copied to clipboard
                            
                            
                            
                        RFP Application: Integration test of the Ethereum JSON-RPC API in Lotus
RFP Application: Integration test of the Ethereum JSON-RPC API in Lotus
Name of Project: Integration test of Lotus’s JSON-RPC API
Link to RFP: Please link to the RFP that you are submitting a proposal for.
This document serves as both the RFP and the application.
RFP Category: fvm, integration-testing
Proposer: @tchataigner @PhilippeMts
Do you agree to open source all work you do on behalf of this RFP and dual-license under MIT, GPL, and APACHE2 licenses?: Yes we do.
Project Description
References
While initial support for the Ethereum JSON-RPC API has been introduced in Lotus with the FVM Copper (r03) release, almost all methods have now been implemented since the Iron (r04) release.
This RFP aims at writing an integration test of the Ethereum JSON-RPC API implemented in Lotus.
This development has been suggested by @ychiaoli18 who owns a large part of this implementation.
Development Roadmap & Deliverables
Technical scope:
- Our deliverable will connect to a Lotus network to run the two following test suites.
- First test suite, around deployment of and interactions with a contract without input parameters in the constructor signature. Test cases are:
- Deploy a SimpleCoin contract using eth_sendRawTransaction. Use eth_getTransactionCount to get nonce. Use eth_maxPriorityFeePerGas to get priority fee. Transaction must be a EIP-1559 tx. Include the nonce and prioritiy fee in the tx. Use 1000000000 for gasLimit.
 - eth_getTransactionReceipt and eth_getTransactionByHash should return correct value BEFORE the tx is mined
 - eth_getTransactionReceipt and eth_getTransactionByHash should return correct value AFTER the tx is mined
 - Use the block number and block hash from the eth_getTransactionReceipt. Make sure that the tx is included in the eth_getBlockByHash and eth_getBlockByNumber
 - Verify that the response from eth_getBlockTransactionCountByHash/Number should be correct
 - Use eth_call to interact with the deployed contract
 - Use eth_getCode to get the contract byte code at the deployed address
 - Use eth_getStorageAt to verify the state of the storage is the same as the result from https://www.evm.codes/playground
 
 - Second test suite uses the same test cases with a contract having input parameters in the constructor signature.
 
 - First test suite, around deployment of and interactions with a contract without input parameters in the constructor signature. Test cases are:
 
Deliverables:
- The integration tests will be implemented using (1) the ethers.js library and (2) the web3.js library concurrently.
 - Further addition of test cases will be facilitated.
 
Roadmap
This application revolves around one unique milestone and the following roadmap
The proposed timeline below would allow for the development of the discussed features with the integration of a review and community discussion phase by the end of August 2022. A split with other dates would make it more difficult for the proposed development team to meet this deadline.
| Phase | Dates | Workforce | 
|---|---|---|
| Set-up of the integration test environment Fast development of the first test suite using the ethers.js library. | Oct 4 - 6 (3 man-days) | 1 full-time developer | 
| Development of the second test suite. Integration of the web3.js library. | Oct 7 - 14 (3 man-days) | 1 half-time developer | 
Pricing
Total: ( 3 + 3 ) * $1.5k == $9k
Maintenance and Upgrade Plans
Further test cases could be added, for instance to test the few API methods currently missing. This should be arranged either at a later time or in another program.
Team
Contact Info
Filecoin Slack handles:
- Thomas
 - Philippe Métais
 
Team Members
- Thomas Chataigner: @tchataigner
 - Philippe Métais: @PhilippeMts
 
Team Member LinkedIn Profiles
- Thomas Chataigner: https://linkedin.com/in/thomas-chataigner-877935111
 
Team Website
https://polyphene.io
Relevant Experience
The Poyphene team has followed the FVM specification work and development since its premises. They participated in the creation of an integration test framework and of a high-level rust SDK for the the development of actors.
Team code repositories
Thanks for the RFP! I'm signing off on this scope.
Hi @PhilippeMts, thank you for your proposal. This grant has been approved! Do you have a preferred email for discussing next steps?
Thank you Erin. Contacting you on Slack 👍 (my handle there is @Philippe Métais)
Hi @PhilippeMts, since the project is complete, I have closed this issue. Please contact [email protected] with any new updates or questions.