flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

importing contracts is counted as read every time they are read not once

Open bjartek opened this issue 4 years ago • 3 comments

🐞 Bug Report

When reading an imported contract TotalBytesRead is incremented every time this is done, even if the same contract is read twice in the same transaction.

So given the following scenario:

A imports B
A imports C
B imports C

Then C is counted as read twice.

What is the severity of this bug?

Should have: * It would be better if we do this before we ship, but it's OK if we don't (product functions without this, but it's a better user experience). Consider adding to a future sprint.

Expected behaviour

I would expect C to be count as read once.

bjartek avatar Apr 07 '22 18:04 bjartek

@janezpodhostnik @ramtinms

turbolent avatar Apr 07 '22 21:04 turbolent

Today I removed the "B imports C" part in my code and then I am below the limit again. C in my case here is FIND and that contract is 50k.

bjartek avatar Apr 08 '22 06:04 bjartek

Duplicate of https://github.com/onflow/cadence/issues/1684

j1010001 avatar Oct 13 '22 18:10 j1010001