skalenetwork / filestorage Goto Github PK
View Code? Open in Web Editor NEWSKALE filestorage extension to EVM
License: GNU Affero General Public License v3.0
SKALE filestorage extension to EVM
License: GNU Affero General Public License v3.0
Allow SKALE Chain Config to let contracts call the reserve space function internally. So essentially whitelist contracts (and addresses) if that is your preference.
The actual solution would involve a whitelist mapping with potentially different access levels, amounts that can be reserved, and other config SKALE sees internally.
┆Issue is synchronized with this Jira Task
We need to allow users to download files from FileStorage through URL. Solidity contracts will have access to FileStorage through FileStorage contract and readChunk functionality.
Proposed solution:
┆Issue is synchronized with this Jira Story
For File storage UI, we need to display file timestamps. Now there are difficulties with displaying time stamps in UI due to in the file storage contract we don’t save the time stamp field and don’t emit this event.
Solution:
Emit event in all functions which modify the state:
createFile
createDirectory
deleteFile
...
Hi, this is not a high priority but can you check if we can have a preview of an image in file storage for NFT's? This link only downloads the image:
https://docs.skale.network/filestorage/web3-server
Preview like this:
https://cdn-images-1.medium.com/max/1200/1*TojC4sESgiExOvUPiGoAOA.png
┆Issue is synchronized with this Jira Task
In the latest version of the package web3py 6.0.0, several method names were deprecated such as solidityKeccak, toChecksumAddress, isConnected and so on. This should be changed to the actual method names.
Filestorage should support 80 port for http connection and 443 for https connection by default
┆Issue is synchronized with this Jira Task
Followed the process in the https://docs.skale.network/filestorage/web3-server documentation for FileStorage
Currently, it doesn't work because of the following issues.
There were 3 problems that caused this issue:
┆Issue is synchronized with this Jira Task
When a file is uploaded to a SKALE chain, the owner is the individual who uploads the file. If that file is then used to support metadata or NFT data, what happens if the NFT is listed and sold or if the NFT is send or gifted to someone else? The answer is that the File still technically belongs to the original owner.
The simplest solution theoretically, is to have a transfer ownership function within the storage contract that moves the chunks and locations to the new owner address. This would result in the highest level of mutable, yet irreversible file storage in existence. However, by looking at the existing smart contract that may not be a "simple" solution.
An alternative solution is to change how the data is pointed to initially. Currently, chunks are stored within directories that are by default linked to an address. It could make more sense to create files outside of directories by default and have them floating in a "bucket" or just the general mapping. From there they could be linked to an address or a unique identifier that could in turn be switched by the contract on transfer.
Additionally, regardless of the solution; a contract once again would need to have access to control this contract functionality so an NFT contract could make this call on a send or a marketplace could on a sale.
┆Issue is synchronized with this Jira Task
Currentl schain owner has 2 administrative functionality:
With multisig we need to give permission for (2) to separate account and Marionette contract and for (1) only for Marionette contract. For this purpose need to implement accessControl for Filestorage.sol
tx.origin
needs to be changed with msg.sender
to support control by smart contract
┆Issue is synchronized with this Jira Task
Also user should be able to check file validity before they download it from node. Solution:
┆Issue is synchronized with this Jira Task
┆Issue is synchronized with this Jira Task
Allow the SKALE File Storage configuration to have a simple tracker that holds total space reserved. The total space reserved of all individuals can never exceed the total space available for the SKALE chain. Additionally, a user can reserve X amount of space and only utilize Y% of the space at any given time. This in itself I see as a problem, however, I believe it can be solved by allowing the FileStorage contract to be configured by the sChain owner to customize the abilities of the solution to the generated problem. This can be done by only allowing an individual to owner up to W amount at any given time, only allow a user to own Z percentage of the total file storage. Another example is having a starting block at at a value of B and then the FileStorage can only expand in increments of C.
The client application calls upload file to file storage contract. The file storage contract checks the user uploading the file and if the user has allocated, yet unused space; the file will upload successfully. If not, the user will be prompted to unlock additional storage according to the platform structure.
┆Issue is synchronized with this Jira Task
Investigate possibilities when skaled's crash in the middle of filestorage operation could lead to unrecoverable error. Use UnsafeRegion in these places:
{
UnsafeRegion::lock ur_lock;
...
}
With this, if crash happens inside ur_lock's scope, skaled will exit with code 200 (causing restart fro snapshot).
┆Issue is synchronized with this Jira Task
We need to add reserveSpace API in filestorage.js to allow sChain owners reserve filestorage space for certain addresses.
┆Issue is synchronized with this Jira Task
Add getter to reservedStorageSpace in filestorage
┆Issue is synchronized with this Jira Task
Decided to modify standard function royaltyInfo of ERC2981 - to return an array of receivers and commissions. So its unblocks double commission development for Fireside
┆Issue is synchronized with this Jira Task
skalenetwork/internal-support#27
ABIs are published to npm, but should also be published in github release, e.g. https://github.com/skalenetwork/config-controller/blob/b440e96c239342255443914f04cb6820a9cc335e/.github/workflows/publish.yml#L52-L58
Move filestorage repo workflows testing and npm deployment to github actions
┆Issue is synchronized with this Jira Task
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.