MIT IEEE URTC 2023. GSET 2023. Repository for "SeBRUS: Mitigating Data Poisoning in Crowdsourced Datasets with Blockchain". Using Ethereum smart contracts to stop AI security attacks on crowdsourced datasets.
Currently, we need a way to interface with a dataset on the client side with the blockchain. DatasetPage.jsx Will act as a display for a particular dataset. It will display all of the data belonging to a dataset being queried from the Dataset smart contract. This issue should be tackled with #7 and #15. This will also depend on #26.
Proposed Solution
DatasetPage.jsx will involving interfacing mostly with web3.js and React.js to display the items belonging to a particular Dataset smart contract.
Action Items
[ ] create an Image.jsx component which renders a singular image based on props based from the smart contract. Make sure to include a button that toggles between Verified and Not Verified for each Image
[ ] construct a state that is a list filled with image objects obtained from the smart contract. Create a map between objects in this list and Image.jsx components to render all of the images in the dataset.
[ ] style this page appropriately to create a grid of images in the dataset
[x] get contract address and database metadata. This information can be hard coded to start but will eventually be
[x] Use the ABI to instantiate a new contract Dataset object and await until the contract is deployed() and hydrated with values from the blockchain. This should most likely be done in a useEffect.
[x] get smart contract ABI. This is a JSON that can be retrieved from /api/abi/<id> that is the main interface defined for web3.eth.Contract.
[ ] (optional) add a drop down menu that allows filtering by whether or not the data is approved or not and whether or not an image belongs to a certain class. We may also add filtering by whether or not the data is augmented once we add that feature later on. This may require using the HTML <option> tag.
[x] (optional) another interesting feature to have would be to allow easy downloading of the entire dataset in a zip file. This may become increasingly difficult as the scale of the dataset grows but maybe adding a download button or looking into how zipping in the browser may work.
Use Case
Currently, we need a way to interface with a dataset on the client side with the blockchain.
DatasetPage.jsx
Will act as a display for a particular dataset. It will display all of the data belonging to a dataset being queried from theDataset
smart contract. This issue should be tackled with #7 and #15. This will also depend on #26.Proposed Solution
DatasetPage.jsx
will involving interfacing mostly withweb3.js
andReact.js
to display the items belonging to a particularDataset
smart contract.Action Items
Image.jsx
component which renders a singular image based on props based from the smart contract. Make sure to include a button that toggles betweenVerified
andNot Verified
for each Imagemap
between objects in this list andImage.jsx
components to render all of the images in the dataset.Dataset
object andawait
until the contract isdeployed()
and hydrated with values from the blockchain. This should most likely be done in auseEffect
./api/abi/<id>
that is the main interface defined forweb3.eth.Contract
.<option>
tag.(optional) another interesting feature to have would be to allow easy downloading of the entire dataset in a zip file. This may become increasingly difficult as the scale of the dataset grows but maybe adding a download button or looking into how zipping in the browser may work.Resources
https://docs.metamask.io/wallet/reference/provider-api/
This is a :rocket: Feature Request