-
Notifications
You must be signed in to change notification settings - Fork 5
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
route websocket proxy traffics to different destinations #119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taokayan looks like this PR is forking from a commit that is not including
if( found_next_block == true ) { | ||
while(this.reversible_blocks.length > 1024) { // protection of memory grow in case leap rpc not working | ||
this.remove_front_block(); | ||
} | ||
|
||
if( found_next_block == true && this.reversible_blocks.length > 180 + 30) { // reduce frequency of calling get_evm_lib | ||
const evm_lib = await this.get_evm_lib(); | ||
while(this.reversible_blocks.length > 0 && this.reversible_blocks.peek().number < evm_lib) { | ||
// keep at least 180 blocks in case evm-node is out of sync with leap | ||
while(this.reversible_blocks.length > 180 && this.reversible_blocks.peek().number < evm_lib) { | ||
this.remove_front_block(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case we are on a minority fork, we will be having different behaviors from the client perspective based on how long the fork takes to solve (since we will be removing reversible blocks from our queue)
Are we ok with this?
Resolves #91
add web3_rpc_test_endpoint in config
add miner_rpc_endpoint in config
add whitelist_methods in config
always group all requests in a batch to send to either rpc endpoint or rpc test endpoint.
reduce frequency of get eos lib
add minmum (180) size in this.reversible_blocks as protection in case of evm-rpc is out of sync with leap endpoint