Comments (8)
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.
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.
@ricky-dunn Ah that is very interesting (and if we change we will indeed award this bounty!) Thank you.
from etherbots-bug-bounty.
@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.
@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.
@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.
@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.
@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)
- A method to lock bots or force attackers to win HOT 3
- _applyBonuses calls getPartBonus with move id, not part id
- Defender's moves aren't validated
- Optimized version of `_applyBonusTree` HOT 3
- Function defenderRevealMoves is susceptible to front-running; can be exploited to guarantee attacker win HOT 3
- Potential Dutch Auction Issue? HOT 1
- Impossible to click 'My Defenders' due to an overlay.
- Nothing happens when clicking 'N Shards' button upon opening a crate
- Loading times on many screens is too long, a spinner / loading indicator is required
- Multiple charges for reward crate HOT 1
- Battle screen improvements HOT 1
- Bots get locked if transaction is stuck
- In order for EVM to optimize the read write of storage, pack variables as tightly as possible. HOT 1
- addExperience seems to have no validation HOT 1
- Incorrectly using parts.length as the new part id HOT 1
- Incorrect Property Change Message in setMaxAttackers HOT 1
- I cannot deploy the contract using Truffle and Ganache HOT 1
- Update to support EIP-1102
- unused variable in _allocateExperience
- Part experience appears overstated. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etherbots-bug-bounty.