Skip to content

Allow web3 provider options for bitcore.config.js#2744

Merged
matiu merged 1 commit intobitpay:masterfrom
Hexlant:master
Mar 13, 2020
Merged

Allow web3 provider options for bitcore.config.js#2744
matiu merged 1 commit intobitpay:masterfrom
Hexlant:master

Conversation

@rlaace423
Copy link
Contributor

There's web3 provider issue when rpc result is too big it fails to keep connection (especially WS provider)
For example,

  • a lot of transactions (ex: ropsten 599275th block)
  • a lot of trace_block

For this issue, we can pass Web3 constructor's options when initiate Web3.
I edited small amount of codes which can allow web3 can have options.
Now we can append options to Web3 like below.
image

FYI, here's my original issue #2735
And here's web3 issue about clientConfig web3/web3.js#1217 (comment)

Always, thank you @micahriggan :)

Copy link
Contributor

@micahriggan micahriggan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Tricky one to find

@micahriggan
Copy link
Contributor

Is the number 1073741824 based off of what you needed for the ropsten block to be processed, or can a smaller number be used?

If this is bytes, then that'd be a gig right?

@rlaace423
Copy link
Contributor Author

Is the number 1073741824 based off of what you needed for the ropsten block to be processed, or can a smaller number be used?

If this is bytes, then that'd be a gig right?

That number is just for my test :) maxReceivedFrameSize and max ReceivedMessageSize are based off bytes.
Much smaller number can be used.

@micahriggan
Copy link
Contributor

okay, great thanks!

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.

3 participants