Code Monkey home page Code Monkey logo

Comments (8)

EtherBots avatar EtherBots commented on September 7, 2024

This was intentional to minimise storage costs. We'll look further into it but it's definitely not a bug ATM. Thanks!

from etherbots-bug-bounty.

ricky-dunn avatar ricky-dunn commented on September 7, 2024

Noted. I guess just be aware that at some point it will become a bug in that it just won't return, one of CK's guys mentioned that their similar implementation stopped working completely on Geth after 100k tokens.

For example, our implementation of tokensOfOwner() has been entirely non-functional on geth (and I assume other full nodes) ever since we crossed 100k NFTs or so.

From ethereum/EIPs#721

from etherbots-bug-bounty.

EtherBots avatar EtherBots commented on September 7, 2024

@ricky-dunn Ah that is very interesting (and if we change we will indeed award this bounty!) Thank you.

from etherbots-bug-bounty.

RobbieFerguson avatar RobbieFerguson commented on September 7, 2024

@ricky-dunn Just looking at this -- is it a problem if it is never called by a contract? We only intend to use it for reading state.

from etherbots-bug-bounty.

DanielRX avatar DanielRX commented on September 7, 2024

@ricky-dunn @RobbieFerguson it's explicitly listed as not to be called by a contract in any other code I have see, as it is gas hungry. It's a web3 utility function, NOT a contract to contract call. I don't see a use contract -> contract for it.

from etherbots-bug-bounty.

RobbieFerguson avatar RobbieFerguson commented on September 7, 2024

@DanielMReed Yep, we have the same understanding and would never use it an inter-contract call.
My question is, will the web3 view function fail given a big enough data set to loop over? (For reasons unrelated to gas). Still confused about this. Thanks!

from etherbots-bug-bounty.

ricky-dunn avatar ricky-dunn commented on September 7, 2024

@RobbieFerguson - even off-chain this will eventually prove problematic once a certain number of tokens is reached given it's a straight up loop over the entire supply.

In CryptoKitties case it looks like after reaching 100k tokens it no longer became functional off-chain via a full node, although not sure if they had tried to access this using a dedicated node or an Infura shared node, I suspect that may vary your mileage.

I appreciate as it's not used on-chain there's probably not a huge amount of focus, but if you did want to make if functional but not incur the overhead of storing part indexes on a per user basis (which would be a fair challenge given storage costs) you could consider including a function where you can pass in a startIndex and limit so off-chain callers can at least paginate their result sets, although this may be susceptible to race conditions so there is a trade-off there, but that's quite often the case with most things on the blockchain.

from etherbots-bug-bounty.

RobbieFerguson avatar RobbieFerguson commented on September 7, 2024

@ricky-dunn We've made changes to the code based on this issue and so will discuss an appropriate bounty! Thanks.

from etherbots-bug-bounty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.