https://github.com/accenture/off-chain-storage-verification
A Blockchain-based Auditing Framework for Off-chain Storage
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.7%) to scientific vocabulary
Keywords
blockchain
proof-of-data-possession
quorum
smart-contracts
storage
Last synced: 5 months ago
·
JSON representation
Repository
A Blockchain-based Auditing Framework for Off-chain Storage
Basic Info
Statistics
- Stars: 5
- Watchers: 9
- Forks: 2
- Open Issues: 0
- Releases: 0
Topics
blockchain
proof-of-data-possession
quorum
smart-contracts
storage
Created about 5 years ago
· Last pushed about 5 years ago
https://github.com/Accenture/Off-chain-storage-verification/blob/main/
# Off-chain Storage Verification
An experimental implementation of [Audita: A Blockchain-based Auditing Framework for Off-chain Storage](https://arxiv.org/pdf/1911.08515.pdf)
## Building the libpdp library :
Follow instructions in the [libpdp](https://github.com/Accenture/libpdp) project.
## Running the storage on different machines for each network participant
### Get the blockchain running :
Get the nodes of a blockchain running using [Quorum Maker](https://github.com/synechron-finlabs/quorum-maker)
### Get the installations done :
Install and start the server by following the commands below:
npm i
npm run compile
In the file ```node_modules/web3-core-helpers/src/formatters.js```,
replace line 239 ```block.timestamp = utils.hexToNumber(block.timestamp)``` by
``` block.timestamp = Number.parseInt(parseInt(block.timestamp).toString().substring(0,10))```
npm start
### Deploy contracts
Open a Postman page and on the address you're running the script you can send:
A POST request to
/API/Init/Deploy
with the following JSON for example where :
- k the number of chunks that will be send to the storage node,
- n the total number of chunks,
- l the number of storage nodes that will be challenged at each round
- m the number of storage nodes that will store the chunks.
{
"k": 5,
"n": 10,
"l": 2,
"m": 2
}
Expected response : a Json with the addresses of the contracts deployed :
{
"root": "0x76C114B173C114A26F26129930Cd7703d86199b0",
"constants": "0x191b10cEBaF40a5499C6FCbAb9a11f2046C5d3f3",
"identity": "0x6B66d3740cB1AA67afd8262fFBff44b067C662D1",
"storageFactory": "0xa1cf827Ee7D84a3009DeC4aC77bd58400c8Ec0cD",
"validationFactory": "0x55c0BeAAA657Aafa6d9C8075a7a36bEC84335349"
}
### Get the constants from the nework
A GET request to
/API/Constants/GetAll
You should get a respons like :
{
"0": "5",
"1": "10",
"2": "2",
"3": "2",
"k": "5",
"n": "10",
"l": "2",
"m": "2"
}
### Register to the network
A POST request to
/API/Init/SetId
with the following JSON for example :
{
"endpoint": "10.112.50.214",
"address": "0xFB7240bf328B98d34AB6b92F473465cd1Ef17d56",
"role": "StorageNode"
}
If the registration is well processed you should get a response in this form :
{
'0': '10.112.50.214',
'1': '0xFB7240bf328B98d34AB6b92F473465cd1Ef17d56',
msgEndPoint: '10.112.50.214',
ethAddress: '0xFB7240bf328B98d34AB6b92F473465cd1Ef17d56'
}
If the person is already in the system you get :
{ error: 'Identity already registrated' }
If the role is not well specified you get :
{ error: 'This role does not exist in the network. Available roles: TrustedDealer, Validator, StorageNode' }
### Store a file
A POST request to
/API/StorageFactory/StoreFile
with the following JSON for example :
{
"path": "app/modules/libpdp/data/testfile"
}
You get the following result if the storage is correctly done :
{
"result": [
{
"SNSelected ": "0xFB7240bf328B98d34AB6b92F473465cd1Ef17d56",
"Indexs ": "1"
},
{
"SNSelected ": "0xFB7240bf328B98d34AB6b92F473465cd1Ef17d56",
"Indexs ": "3"
},
{
"SNSelected ": "0xFB7240bf328B98d34AB6b92F473465cd1Ef17d56",
"Indexs ": "5"
},
{
"SNSelected ": "0xFB7240bf328B98d34AB6b92F473465cd1Ef17d56",
"Indexs ": "6"
},
{
"SNSelected ": "0xFB7240bf328B98d34AB6b92F473465cd1Ef17d56",
"Indexs ": "9"
},
{
"SNSelected ": "0x519cAd907605346E3FD11228085fb34BB9b4D910",
"Indexs ": "0"
},
{
"SNSelected ": "0x519cAd907605346E3FD11228085fb34BB9b4D910",
"Indexs ": "3"
},
{
"SNSelected ": "0x519cAd907605346E3FD11228085fb34BB9b4D910",
"Indexs ": "4"
},
{
"SNSelected ": "0x519cAd907605346E3FD11228085fb34BB9b4D910",
"Indexs ": "7"
},
{
"SNSelected ": "0x519cAd907605346E3FD11228085fb34BB9b4D910",
"Indexs ": "8"
}
]
}
If the path is not right you get :
{error: "No file in such directory"}
### Run validation process
The validation process can be run by sending a POST request without args to :
/API/ValidationFactory/Init
## Running with docker
Please make sure you've got docker installed and clone the docker branch from this repository
### Running command :
On the right folder you can get up the nodes (2 validators, 3 storage nodes and 1 trusted file dealer) with the following command:
docker-compose up
### Testing scenario :
1. Get the Blockchain running
2. Deploy the contracts
Deployment : POST request to
/API/Init/Deploy
With the following JSON :
{
"k": 5,
"n": 10,
"l": 2,
"m": 3
}
3. Set Ids
Set IDs : POST request to :
/API/Init/SetId
With the following JSON :
A. For the trusted dealer :
{
"endpoint": "10.112.50.215:3001",
"address": "0x5b3d95b176019eb94f6f226be4b5aa2669523d7e",
"role": "TrustedDealer"
}
B. For the Storage nodes :
{
"endpoint": "10.112.50.215:3002",
"address": "0x92e6b532deda7062ea811ef6f6056d669a43bbb4",
"role": "StorageNode"
}
{
"endpoint": "10.112.50.215:3003",
"address": "0xd473527fa8f071e9bc7bba0598f720faf2fe24d3",
"role": "StorageNode"
}
{
"endpoint": "10.112.50.215:3006",
"address": "0xe9091599589cb20e7c370ad45264eba11bd7e22e",
"role": "StorageNode"
}
C. For the validators :
{
"endpoint": "10.112.50.215:3004",
"address": "0xe286a951832a997081d4527f5cf8054be6724a60",
"role": "Validator"
}
{
"endpoint": "10.112.50.215:3005",
"address": "0xa77e72324ea0bbd7305dd42e8e0ecf7d1808ff74",
"role": "Validator"
}
4. Run the docker-compose
docker-compose up
5. Send a file
Sending a file : a POST request to :
/API/StorageFactory/StoreFile
With the following JSON :
{
"path": "app/modules/libpdp/data/testfile"
}
6. Initiate the validation process
With a POST request to :
/API/ValidationFactory/Init
Owner
- Name: Accenture
- Login: Accenture
- Kind: organization
- Website: https://accenture.github.io
- Repositories: 185
- Profile: https://github.com/Accenture
Accenture Github site
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- abdfaye (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
package.json
npm
- docker-compose ^0.9.2 development
- body-parser ^1.15.2
- dateformat ^3.0.3
- express ^4.16.3
- express-form-data ^2.0.6
- lodash ^4.17.20
- my-team-tools my-team-tools.tar.gz
- neat-csv ^2.1.0
- pug ^2.0.0-rc.4
- secure-random ^1.1.1
- sleep ^5.2.3
- socket.io ^2.0.4
- solc 0.4.19
- truffle-artifactor ^3.0.0
- truffle-contract ^3.0.1
- truffle-hdwallet-provider 0.0.3
- uuid ^3.1.0
- web3 1.0.0-beta.34
- winston ^3.0.0-rc1