Integrate IPFS for Historical Data Storage and Retrieval #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This pull request integrates IPFS to manage the storage and retrieval of historical data within our learning ABCI agents. By leveraging IPFS, our agents can now store data in a decentralized manner and fetch it as needed, enhancing data availability and integrity. This integration involves updates to behaviors, rounds, payloads, and introduces new functions for interacting with IPFS.
Changes
Detailed changes to the agent framework to incorporate IPFS are as follows:
Modified Files
behaviours.py:
send_historical_data_to_ipfs
in theEvolutionBehaviour
class for data upload.get_historical_data_from_ipfs
in theTxPreparationBehaviour
class for data retrieval.rounds.py:
historical_data_ipfshash
andcomparison_data
attributes in theSynchronizedRound
class to handle data synchronization and comparison based on the data fetched from IPFS.payload.py:
EvolutionPayload
to manage the payload structure for transactions involving IPFS interactions.IPFS Integration
send_historical_data_to_ipfs
function, which returns an IPFS hash stored in thehistorical_data_ipfshash
.get_historical_data_from_ipfs
function during transaction preparations.Impact
This integration: