ScatterWebExtension icon indicating copy to clipboard operation
ScatterWebExtension copied to clipboard

Additional requests while preparing transaction

Open sim31 opened this issue 7 years ago • 3 comments

When making eos.transaction() call with eos returned from scatter it makes a bunch of get_info/get_block/get_abi requests: image

When using [email protected] directly, however it's much better: image

Plus I was able to reduce additional requests to just only one get_abi call, by providing transaction headers myself. Through scatter only one get_block request is saved this way.

Is where anyway to reduce the overhead?

Btw, does scatter have it's own version of eosjs which it uses? Because it looks a lot like this issue, which appears to be almost fixed in newest eosjs.

sim31 avatar Jul 19 '18 05:07 sim31

I'd suggest tagging onto the ticket I created on eosjs (https://github.com/EOSIO/eosjs/issues/208). There's really nothing Scatter can do about this. Scatter already caches ABIs on our side but all those requests are coming from eosjs alone. I agree, it's a problem which needs a solution.

nsjames avatar Jul 26 '18 15:07 nsjames

Why I don't see that many unnecessary requests when using eosjs directly?

sim31 avatar Jul 26 '18 16:07 sim31

Hmm, let me run some tests. Scatter shouldn't be doing anything with get_block or get_info, and even if it does it does so through your injected eosjs which will match your version. I'll reopen for now and debug though.

nsjames avatar Jul 27 '18 03:07 nsjames