Skip to content

Add rpc api for viction#82

Draft
thinhC98 wants to merge 5 commits intoBuildOnViction:developfrom
thinhC98:feature/rpc-api-for-viction
Draft

Add rpc api for viction#82
thinhC98 wants to merge 5 commits intoBuildOnViction:developfrom
thinhC98:feature/rpc-api-for-viction

Conversation

@thinhC98
Copy link
Copy Markdown
Contributor

Description:

  • This PR adds and fixes Viction-specific RPC methods under the eth namespace for PoSV full nodes.

Root Cause:

  • Vic-Geth is missing several RPC APIs for PoSV, including APIs to retrieve attestors, rewards, and snapshots....

Resolution:

  • This PR completes the BackendViction implementation on EthAPIBackend and ensures Viction RPCs are registered
  • Enable the posv RPC API to support PoSV-related queries

- Introduced new API methods for retrieving rewards and voter capabilities in the Viction blockchain.
- Added support for epoch-based operations and improved network information structure.
- Implemented caching for block hashes and added functionality to check if two blocks are on the same path.
- Updated Viction configuration to include limit time finality.
- Enhanced comments and documentation for clarity.
- Implemented methods to retrieve attestors pairs and penalties at checkpoint for both hash and block number.
- Enhanced error handling in existing reward retrieval methods to improve robustness.
- Updated API to reflect new functionalities, ensuring better integration with the Viction blockchain.
- Removed obsolete methods for retrieving block hashes from cache and checking block paths.
- Updated viction.json to include new block parameters for TomoX and lending features.
- Simplified the types.go file by eliminating the EpochNumber type and related JSON unmarshalling logic.
… field from VictionConfig

- Updated comments in the GetBlockByNumber function for better clarity and consistency.
- Removed the LimitTimeFinality field from the VictionConfig struct as it is no longer needed.
- Reformatted the viction.json file to ensure consistent indentation and structure.
- No functional changes were made; this update improves readability and maintainability of the configuration file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant