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

Add events to transaction submission in support of performance testing #3438

Closed
benjamincburns opened this issue Mar 30, 2020 · 5 comments · Fixed by #3550
Closed

Add events to transaction submission in support of performance testing #3438

benjamincburns opened this issue Mar 30, 2020 · 5 comments · Fixed by #3550
Labels
1.x 1.0 related issues 2.x 2.0 related issues Enhancement Includes improvements or optimizations Feature Request

Comments

@benjamincburns
Copy link
Contributor

benjamincburns commented Mar 30, 2020

It would be helpful if the PromiEvent that is returned when sending transactions fired off events that provided finer-grained detail on the transaction submission process. There are numerous benefits to this:

Expected behavior

PromiEvents for transactions would fire the following events

Event Description
sending Fired immediately before transmitting the transaction request - connection to provider must be open when this is fired. Intermediate requests such as eth_chainId, eth_estimateGas, or eth_gasPrice must be completed prior this event being fired.
sent Fired immediately after the request body has been written to the client, but before the transaction hash is received
transactionHash Behaves as it does today
confirmation Behaves as it does today, but includes the block hash for the latest block in the event handler arguments
receipt Behaves as it does today
error Behaves as it does today

Actual behavior

Events are only fired for transactionHash, receipt, confirmation, and error. Confirmation events don't include the current block hash, meaning that applications must fetch it if they need that information.

Versions

Applies to all versions in existence today (<=v1.2.6, v2.0.0-alpha, and v2.0.0-alpha.1).

Related Issues

@cgewecke cgewecke added 1.x 1.0 related issues 2.x 2.0 related issues Enhancement Includes improvements or optimizations Feature Request labels Mar 31, 2020
@cgewecke
Copy link
Collaborator

@benjamincburns Thanks for proposing and for the design work. LGTM.

@benjamincburns
Copy link
Contributor Author

@cgewecke glad to see you're working on web3 these days! Hope you're doing well!

If you're happy with this I'll go ahead and move forward with a PR. Is web3 on a particular release cadence at the moment? Which branch should I target to minimize the time that it'll take to get this into a release? If I were to get a PR in and approved today, when should I expect that it would be released?

@cgewecke
Copy link
Collaborator

cgewecke commented Mar 31, 2020

@benjamincburns Hi :)

The cadence is slow - Web3 1.x is trying to make changes conservatively. For example, every PR has at least 3 days of open public review and every formal release is preceded by a beta release with a week long "request for comment" .

At the moment we are publishing from 1.x and will hopefully release 1.2.7-rc.0 within a couple weeks.

Fair warning: it's possible that only things currently in the PR queue will be included in the next patch (sorry) but if you'd like to open a PR that would wonderful.

@benjamincburns
Copy link
Contributor Author

OK, thanks for setting expectations. Fortunately I have a workaround for now for websocket connections so I'm able to move forward with my perf testing in the short term with that. For more info you might want to see my comments on the PR containing my workaround (hyperledger/caliper#780).

@cgewecke
Copy link
Collaborator

Ok awesome! Thanks @benjamincburns.

@cgewecke cgewecke added this to To do in v1.2.8 Apr 25, 2020
@cgewecke cgewecke added this to To do in v1.2.9 May 8, 2020
@ryanio ryanio moved this from To do to In progress in v1.2.9 May 29, 2020
@ryanio ryanio moved this from In progress to In Review in v1.2.9 Jun 2, 2020
@ryanio ryanio moved this from In Review to Done in v1.2.9 Jun 2, 2020
@ryanio ryanio mentioned this issue Jun 2, 2020
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues 2.x 2.0 related issues Enhancement Includes improvements or optimizations Feature Request
Projects
No open projects
v1.2.8
  
To do
v1.2.9
  
Done
2 participants