From 702e51462012eb3f1b7c3587d5c29e1fc92c3e16 Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Tue, 13 Aug 2024 21:52:40 +0530 Subject: [PATCH 01/15] feat: support for upgraded protocol state contract architecture. first commit --- bootstrap.sh | 14 ++++---- docker-compose-dev.yaml | 3 +- env.example | 3 +- snapshotter/core_api.py | 11 +++--- snapshotter/processor_distributor.py | 18 +++------- snapshotter/system_event_detector.py | 20 ++++++----- snapshotter/utils/data_utils.py | 40 ++++++++++++---------- snapshotter/utils/generic_worker.py | 4 +-- snapshotter/utils/models/settings_model.py | 1 + snapshotter/utils/snapshot_worker.py | 1 + snapshotter_autofill.sh | 7 +++- 11 files changed, 64 insertions(+), 58 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 1a8b28f..d36abe3 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,11 +1,11 @@ source .env -echo "setting up codebase..."; +echo "setting up codebase..." -rm -rf snapshotter-lite-local-collector; -git clone https://github.com/PowerLoom/snapshotter-lite-local-collector.git; -cd ./snapshotter-lite-local-collector; -git checkout simulation_node_bi; -cd ..; +rm -rf snapshotter-lite-local-collector +git clone https://github.com/PowerLoom/snapshotter-lite-local-collector.git +cd ./snapshotter-lite-local-collector +git checkout feat/trusted-relayers +cd .. -echo "bootstrapping complete!"; +echo "bootstrapping complete!" diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml index b04708e..c971289 100755 --- a/docker-compose-dev.yaml +++ b/docker-compose-dev.yaml @@ -20,7 +20,7 @@ services: - PROST_CHAIN_ID=$PROST_CHAIN_ID - REDIS_HOST=${REDIS_HOST:-redis} - REDIS_PORT=${REDIS_PORT:-6379} - - SEQUENCER_ID=$SEQUENCER_ID + - SEQUENCER_MULTIADDR=$SEQUENCER_MULTIADDR - RELAYER_RENDEZVOUS_POINT=$RELAYER_RENDEZVOUS_POINT - LOCAL_COLLECTOR_PORT=$LOCAL_COLLECTOR_PORT - CLIENT_RENDEZVOUS_POINT=$CLIENT_RENDEZVOUS_POINT @@ -47,6 +47,7 @@ services: - RELAYER_HOST=$RELAYER_HOST - PROST_RPC_URL=$PROST_RPC_URL - IPFS_URL=$IPFS_URL + - DATA_MARKET_CONTRACT=$DATA_MARKET_CONTRACT - IPFS_API_KEY=$IPFS_API_KEY - IPFS_API_SECRET=$IPFS_API_SECRET - PROTOCOL_STATE_CONTRACT=$PROTOCOL_STATE_CONTRACT diff --git a/env.example b/env.example index 572acd5..86290dc 100755 --- a/env.example +++ b/env.example @@ -5,11 +5,12 @@ SIGNER_ACCOUNT_PRIVATE_KEY= SLOT_ID= PROST_RPC_URL=https://rpc-prost1h-proxy.powerloom.io PROTOCOL_STATE_CONTRACT=0x10c5E2ee14006B3860d4FdF6B173A30553ea6333 +DATA_MARKET_CONTRACT= RELAYER_HOST=https://prost1h-relayer-public.powerloom.io NAMESPACE=UNISWAPV2 POWERLOOM_REPORTING_URL=https://nms-testnet-reporting.powerloom.io PROST_CHAIN_ID=11165 -SEQUENCER_ID=QmSHDGMY6DydSPAuyxCbrTgmfAi4Zfg7arrw2SbRZC22Jb +SEQUENCER_MULTIADDR=/dns/proto-snapshot-listener.aws2.powerloom.io/tcp/9100/p2p/QmTK9e9QNEotPkjWAdZT5bbYKV7PEJVu7iXzdVn3VZDEk9 RELAYER_RENDEZVOUS_POINT=Relayer_POP_test_simulation_phase_1 CLIENT_RENDEZVOUS_POINT=POP_Client_simulation_test_alpha LOCAL_COLLECTOR_PORT=50051 diff --git a/snapshotter/core_api.py b/snapshotter/core_api.py index 085dabe..57cbcf8 100644 --- a/snapshotter/core_api.py +++ b/snapshotter/core_api.py @@ -104,7 +104,7 @@ async def get_current_epoch( """ try: [current_epoch_data] = await request.app.state.anchor_rpc_helper.web3_call( - [request.app.state.protocol_state_contract.functions.currentEpoch()], + [request.app.state.protocol_state_contract.functions.currentEpoch(Web3.to_checksum_address(settings.data_market))], ) current_epoch = { 'begin': current_epoch_data[0], @@ -145,7 +145,7 @@ async def get_epoch_info( """ try: [epoch_info_data] = await request.app.state.anchor_rpc_helper.web3_call( - [request.app.state.protocol_state_contract.functions.epochInfo(epoch_id)], + [request.app.state.protocol_state_contract.functions.epochInfo(Web3.to_checksum_address(settings.data_market), epoch_id)], ) epoch_info = { 'timestamp': epoch_info_data[0], @@ -190,7 +190,7 @@ async def get_project_last_finalized_epoch_info( # find from contract epoch_finalized = False [cur_epoch] = await request.app.state.anchor_rpc_helper.web3_call( - [request.app.state.protocol_state_contract.functions.currentEpoch()], + [request.app.state.protocol_state_contract.functions.currentEpoch(Web3.to_checksum_address(settings.data_market))], ) epoch_id = int(cur_epoch[2]) while not epoch_finalized and epoch_id >= 0: @@ -210,7 +210,7 @@ async def get_project_last_finalized_epoch_info( 'message': f'Unable to find last finalized epoch for project {project_id}', } [epoch_info_data] = await request.app.state.anchor_rpc_helper.web3_call( - [request.app.state.protocol_state_contract.functions.epochInfo(project_last_finalized_epoch)], + [request.app.state.protocol_state_contract.functions.epochInfo(Web3.to_checksum_address(settings.data_market), project_last_finalized_epoch)], ) epoch_info = { 'epochId': project_last_finalized_epoch, @@ -313,6 +313,7 @@ async def get_finalized_cid_for_project_id_epoch_id( try: data = await get_project_finalized_cid( request.app.state.protocol_state_contract, + settings.data_market, request.app.state.anchor_rpc_helper, epoch_id, project_id, @@ -371,7 +372,7 @@ async def get_task_status_post( try: [last_finalized_epoch] = await request.app.state.anchor_rpc_helper.web3_call( - [request.app.state.protocol_state_contract.functions.lastFinalizedSnapshot(project_id)], + [request.app.state.protocol_state_contract.functions.lastFinalizedSnapshot(Web3.to_checksum_address(settings.data_market), project_id)], ) except Exception as e: diff --git a/snapshotter/processor_distributor.py b/snapshotter/processor_distributor.py index 5b59149..1c8cd4d 100644 --- a/snapshotter/processor_distributor.py +++ b/snapshotter/processor_distributor.py @@ -56,7 +56,6 @@ def __init__(self): self._rpc_helper = None self._source_chain_id = None self._projects_list = None - self._initialized = False self._upcoming_project_changes = defaultdict(list) self._project_type_config_mapping = dict() @@ -112,7 +111,7 @@ async def init(self): abi=protocol_abi, ) try: - source_block_time = self._protocol_state_contract.functions.SOURCE_CHAIN_BLOCK_TIME().call() + source_block_time = self._protocol_state_contract.functions.SOURCE_CHAIN_BLOCK_TIME(Web3.to_checksum_address(settings.data_market)).call() except Exception as e: self._logger.error( 'Exception in querying protocol state for source chain block time: {}', @@ -123,7 +122,7 @@ async def init(self): self._logger.debug('Set source chain block time to {}', self._source_chain_block_time) try: - epoch_size = self._protocol_state_contract.functions.EPOCH_SIZE().call() + epoch_size = self._protocol_state_contract.functions.EPOCH_SIZE(Web3.to_checksum_address(settings.data_market)).call() except Exception as e: self._logger.error( 'Exception in querying protocol state for epoch size: {}', @@ -132,16 +131,6 @@ async def init(self): else: self._epoch_size = epoch_size - try: - slots_per_day = self._protocol_state_contract.functions.SLOTS_PER_DAY().call() - except Exception as e: - self._logger.error( - 'Exception in querying protocol state for slots per day: {}', - e, - ) - else: - self._slots_per_day = slots_per_day - try: snapshotter_address = self._protocol_state_contract.functions.slotSnapshotterMapping(settings.slot_id).call() if snapshotter_address != to_checksum_address(settings.instance_id): @@ -197,16 +186,19 @@ async def _load_projects_metadata(self): self._source_chain_epoch_size = await get_source_chain_epoch_size( rpc_helper=self._anchor_rpc_helper, state_contract_obj=protocol_state_contract, + data_market=Web3.to_checksum_address(settings.data_market), ) self._source_chain_id = await get_source_chain_id( rpc_helper=self._anchor_rpc_helper, state_contract_obj=protocol_state_contract, + data_market=Web3.to_checksum_address(settings.data_market), ) submission_window = await get_snapshot_submision_window( rpc_helper=self._anchor_rpc_helper, state_contract_obj=protocol_state_contract, + data_market=Web3.to_checksum_address(settings.data_market), ) self._submission_window = submission_window diff --git a/snapshotter/system_event_detector.py b/snapshotter/system_event_detector.py index c7323c3..3fb819f 100644 --- a/snapshotter/system_event_detector.py +++ b/snapshotter/system_event_detector.py @@ -88,7 +88,7 @@ def __init__(self, name, **kwargs): } EVENT_SIGS = { - 'EpochReleased': 'EpochReleased(uint256,uint256,uint256,uint256)', + 'EpochReleased': 'EpochReleased(address,uint256,uint256,uint256,uint256)', 'DayStartedEvent': 'DayStartedEvent(uint256,uint256)', 'DailyTaskCompletedEvent': 'DailyTaskCompletedEvent(address,uint256,uint256,uint256)', @@ -166,14 +166,16 @@ async def get_events(self, from_block: int, to_block: int): latest_epoch_id = - 1 for log in events_log: if log.event == 'EpochReleased': - event = EpochReleasedEvent( - begin=log.args.begin, - end=log.args.end, - epochId=log.args.epochId, - timestamp=log.args.timestamp, - ) - latest_epoch_id = max(latest_epoch_id, log.args.epochId) - events.append((log.event, event)) + self._logger.info(f"EpochReleased: {log.args.dataMarketAddress}!") + if log.args.dataMarketAddress == settings.data_market: + event = EpochReleasedEvent( + begin=log.args.begin, + end=log.args.end, + epochId=log.args.epochId, + timestamp=log.args.timestamp, + ) + latest_epoch_id = max(latest_epoch_id, log.args.epochId) + events.append((log.event, event)) elif log.event == 'DayStartedEvent': event = DayStartedEvent( diff --git a/snapshotter/utils/data_utils.py b/snapshotter/utils/data_utils.py index 982ef44..ea83382 100644 --- a/snapshotter/utils/data_utils.py +++ b/snapshotter/utils/data_utils.py @@ -6,6 +6,7 @@ from tenacity import retry_if_exception_type from tenacity import stop_after_attempt from tenacity import wait_random_exponential +from web3 import Web3 from snapshotter.utils.default_logger import logger @@ -26,7 +27,7 @@ def retry_state_callback(retry_state: tenacity.RetryCallState): # TODO: warmup cache to reduce RPC calls overhead -async def get_project_finalized_cid(state_contract_obj, rpc_helper, epoch_id, project_id): +async def get_project_finalized_cid(state_contract_obj, data_market, rpc_helper, epoch_id, project_id): """ Get the CID of the finalized data for a given project and epoch. @@ -41,12 +42,12 @@ async def get_project_finalized_cid(state_contract_obj, rpc_helper, epoch_id, pr """ project_first_epoch = await get_project_first_epoch( - state_contract_obj, rpc_helper, project_id, + state_contract_obj, Web3.to_checksum_address(data_market), rpc_helper, project_id, ) if epoch_id < project_first_epoch: return None - cid, _ = await w3_get_and_cache_finalized_cid(state_contract_obj, rpc_helper, epoch_id, project_id) + cid, _ = await w3_get_and_cache_finalized_cid(state_contract_obj, Web3.to_checksum_address(data_market), rpc_helper, epoch_id, project_id) if 'null' not in cid: return cid @@ -62,6 +63,7 @@ async def get_project_finalized_cid(state_contract_obj, rpc_helper, epoch_id, pr ) async def w3_get_and_cache_finalized_cid( state_contract_obj, + data_market, rpc_helper, epoch_id, project_id, @@ -79,8 +81,8 @@ async def w3_get_and_cache_finalized_cid( Tuple[str, int]: The CID and epoch ID if the consensus status is True, or the null value and epoch ID if the consensus status is False. """ tasks = [ - state_contract_obj.functions.snapshotStatus(project_id, epoch_id), - state_contract_obj.functions.maxSnapshotsCid(project_id, epoch_id), + state_contract_obj.functions.snapshotStatus(Web3.to_checksum_address(data_market), project_id, epoch_id), + state_contract_obj.functions.maxSnapshotsCid(Web3.to_checksum_address(data_market), project_id, epoch_id), ] [consensus_status, cid] = await rpc_helper.web3_call(tasks) @@ -91,7 +93,7 @@ async def w3_get_and_cache_finalized_cid( return f'null_{epoch_id}', epoch_id -async def get_project_last_finalized_cid_and_epoch(state_contract_obj, rpc_helper, project_id): +async def get_project_last_finalized_cid_and_epoch(state_contract_obj, data_market, rpc_helper, project_id): """ Get the last epoch for a given project ID. @@ -113,7 +115,7 @@ async def get_project_last_finalized_cid_and_epoch(state_contract_obj, rpc_helpe # getting finalized cid for last finalized epoch last_finalized_cid = await get_project_finalized_cid( - state_contract_obj, rpc_helper, last_finalized_epoch, project_id, + state_contract_obj, data_market, rpc_helper, last_finalized_epoch, project_id, ) if last_finalized_cid and 'null' not in last_finalized_cid: @@ -123,7 +125,7 @@ async def get_project_last_finalized_cid_and_epoch(state_contract_obj, rpc_helpe # TODO: warmup cache to reduce RPC calls overhead -async def get_project_first_epoch(state_contract_obj, rpc_helper, project_id): +async def get_project_first_epoch(state_contract_obj, data_market, rpc_helper, project_id): """ Get the first epoch for a given project ID. @@ -136,7 +138,7 @@ async def get_project_first_epoch(state_contract_obj, rpc_helper, project_id): int: The first epoch for the given project ID. """ tasks = [ - state_contract_obj.functions.projectFirstEpochId(project_id), + state_contract_obj.functions.projectFirstEpochId(Web3.to_checksum_address(data_market), project_id), ] [first_epoch] = await rpc_helper.web3_call(tasks) @@ -199,7 +201,7 @@ async def get_submission_data(cid, ipfs_reader, project_id: str) -> dict: async def get_project_epoch_snapshot( - state_contract_obj, rpc_helper, ipfs_reader, epoch_id, project_id, + state_contract_obj, data_market, rpc_helper, ipfs_reader, epoch_id, project_id, ) -> dict: """ Retrieves the epoch snapshot for a given project. @@ -214,7 +216,7 @@ async def get_project_epoch_snapshot( Returns: dict: The epoch snapshot data. """ - cid = await get_project_finalized_cid(state_contract_obj, rpc_helper, epoch_id, project_id) + cid = await get_project_finalized_cid(state_contract_obj, data_market, rpc_helper, epoch_id, project_id) if cid: data = await get_submission_data(cid, ipfs_reader, project_id) return data @@ -222,7 +224,7 @@ async def get_project_epoch_snapshot( return dict() -async def get_source_chain_id(state_contract_obj, rpc_helper): +async def get_source_chain_id(state_contract_obj, data_market, rpc_helper): """ Retrieves the source chain ID from the state contract. @@ -234,7 +236,7 @@ async def get_source_chain_id(state_contract_obj, rpc_helper): int: The source chain ID. """ tasks = [ - state_contract_obj.functions.SOURCE_CHAIN_ID(), + state_contract_obj.functions.SOURCE_CHAIN_ID(data_market), ] [source_chain_id] = await rpc_helper.web3_call(tasks) @@ -242,7 +244,7 @@ async def get_source_chain_id(state_contract_obj, rpc_helper): return source_chain_id -async def get_snapshot_submision_window(state_contract_obj, rpc_helper): +async def get_snapshot_submision_window(state_contract_obj, data_market, rpc_helper): """ Get the snapshot submission window from the state contract. @@ -254,7 +256,7 @@ async def get_snapshot_submision_window(state_contract_obj, rpc_helper): submission_window (int): The snapshot submission window. """ tasks = [ - state_contract_obj.functions.snapshotSubmissionWindow(), + state_contract_obj.functions.snapshotSubmissionWindow(data_market), ] [submission_window] = await rpc_helper.web3_call(tasks) @@ -262,7 +264,7 @@ async def get_snapshot_submision_window(state_contract_obj, rpc_helper): return submission_window -async def get_source_chain_epoch_size(state_contract_obj, rpc_helper): +async def get_source_chain_epoch_size(state_contract_obj, data_market, rpc_helper): """ This function retrieves the epoch size of the source chain from the state contract. @@ -274,7 +276,7 @@ async def get_source_chain_epoch_size(state_contract_obj, rpc_helper): int: The epoch size of the source chain. """ tasks = [ - state_contract_obj.functions.EPOCH_SIZE(), + state_contract_obj.functions.EPOCH_SIZE(data_market), ] [source_chain_epoch_size] = await rpc_helper.web3_call(tasks) @@ -282,7 +284,7 @@ async def get_source_chain_epoch_size(state_contract_obj, rpc_helper): return source_chain_epoch_size -async def get_source_chain_block_time(state_contract_obj, rpc_helper): +async def get_source_chain_block_time(state_contract_obj, data_market, rpc_helper): """ Get the block time of the source chain. @@ -294,7 +296,7 @@ async def get_source_chain_block_time(state_contract_obj, rpc_helper): int: Block time of the source chain. """ tasks = [ - state_contract_obj.functions.SOURCE_CHAIN_BLOCK_TIME(), + state_contract_obj.functions.SOURCE_CHAIN_BLOCK_TIME(data_market), ] [source_chain_block_time] = await rpc_helper.web3_call(tasks) diff --git a/snapshotter/utils/generic_worker.py b/snapshotter/utils/generic_worker.py index f9563a3..14264ab 100644 --- a/snapshotter/utils/generic_worker.py +++ b/snapshotter/utils/generic_worker.py @@ -554,7 +554,7 @@ async def _init_protocol_meta(self): # TODO: combine these into a single call try: source_block_time = await self._anchor_rpc_helper.web3_call( - [self.protocol_state_contract.functions.SOURCE_CHAIN_BLOCK_TIME()], + [self.protocol_state_contract.functions.SOURCE_CHAIN_BLOCK_TIME(Web3.to_checksum_address(settings.data_market)], ) except Exception as e: self.logger.exception( @@ -567,7 +567,7 @@ async def _init_protocol_meta(self): self.logger.debug('Set source chain block time to {}', self._source_chain_block_time) try: epoch_size = await self._anchor_rpc_helper.web3_call( - [self.protocol_state_contract.functions.EPOCH_SIZE()], + [self.protocol_state_contract.functions.EPOCH_SIZE(Web3.to_checksum_address(settings.data_market))], ) except Exception as e: self.logger.exception( diff --git a/snapshotter/utils/models/settings_model.py b/snapshotter/utils/models/settings_model.py index 163545b..ccd2404 100644 --- a/snapshotter/utils/models/settings_model.py +++ b/snapshotter/utils/models/settings_model.py @@ -101,6 +101,7 @@ class Settings(BaseModel): simulation_submission_url: str pair_contract_abi: str protocol_state: EventContract + data_market: str relayer: Relayer ipfs: IPFSConfig web3storage: Web3Storage diff --git a/snapshotter/utils/snapshot_worker.py b/snapshotter/utils/snapshot_worker.py index 1675049..8f36cf0 100644 --- a/snapshotter/utils/snapshot_worker.py +++ b/snapshotter/utils/snapshot_worker.py @@ -171,6 +171,7 @@ async def process_task(self, msg_obj: SnapshotProcessMessage, task_type: str, et self._submission_window = await get_snapshot_submision_window( rpc_helper=self._anchor_rpc_helper, state_contract_obj=self.protocol_state_contract, + data_market=settings.data_market, ) self.logger.debug( diff --git a/snapshotter_autofill.sh b/snapshotter_autofill.sh index 8b44d7f..082130d 100755 --- a/snapshotter_autofill.sh +++ b/snapshotter_autofill.sh @@ -49,6 +49,10 @@ if [ "$SLACK_REPORTING_URL" ]; then echo "Found SLACK_REPORTING_URL ${SLACK_REPORTING_URL}"; fi +if [ "$DATA_MARKET_CONTRACT" ]; then + echo "Found DATA_MARKET_CONTRACT ${DATA_MARKET_CONTRACT}"; +fi + if [ "$POWERLOOM_REPORTING_URL" ]; then echo "Found SLACK_REPORTING_URL ${POWERLOOM_REPORTING_URL}"; fi @@ -88,6 +92,7 @@ echo "Using Prost RPC URL: ${PROST_RPC_URL}" echo "Using IPFS URL: ${ipfs_url}" echo "Using IPFS API KEY: ${ipfs_api_key}" echo "Using protocol state contract: ${PROTOCOL_STATE_CONTRACT}" +echo "Using data market contract: ${DATA_MARKET_CONTRACT}" echo "Using slack reporting url: ${slack_reporting_url}" echo "Using powerloom reporting url: ${powerloom_reporting_url}" echo "Using web3 storage token: ${web3_storage_token}" @@ -112,7 +117,7 @@ sed -i'.backup' "s#ipfs-reader-key#$ipfs_api_key#" config/settings.json sed -i'.backup' "s#ipfs-reader-secret#$ipfs_api_secret#" config/settings.json sed -i'.backup' "s#protocol-state-contract#$PROTOCOL_STATE_CONTRACT#" config/settings.json - +sed -i'.backup' "s#data-market-contract#$DATA_MARKET_CONTRACT#" config/settings.json sed -i'.backup' "s#https://slack-reporting-url#$slack_reporting_url#" config/settings.json sed -i'.backup' "s#https://powerloom-reporting-url#$powerloom_reporting_url#" config/settings.json From 09e09abdb77d2e8f7b1e5377f7342d4ebee29e71 Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Thu, 15 Aug 2024 16:03:54 +0530 Subject: [PATCH 02/15] chore: update settings example --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index dfcbab4..b3972f6 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit dfcbab4d3b831209e2e6fabf8e29b2812f00acf6 +Subproject commit b3972f661e4269059f48d8db76c6e1276017a8dd From 14cd3e1051b5b9e6c7fa0e86e4bd617b77b9ec3f Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Fri, 16 Aug 2024 23:41:44 +0530 Subject: [PATCH 03/15] fix: pass data market to protocol state calls for day status info --- snapshotter/processor_distributor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snapshotter/processor_distributor.py b/snapshotter/processor_distributor.py index 1c8cd4d..93825a6 100644 --- a/snapshotter/processor_distributor.py +++ b/snapshotter/processor_distributor.py @@ -144,9 +144,10 @@ async def init(self): exit(0) try: - self._current_day = self._protocol_state_contract.functions.dayCounter().call() + self._current_day = self._protocol_state_contract.functions.dayCounter(settings.data_market).call() task_completion_status = self._protocol_state_contract.functions.checkSlotTaskStatusForDay( + settings.data_market, settings.slot_id, self._current_day, ).call() From 580bcdfbde4ded026246f4fd6fc0e028af336b77 Mon Sep 17 00:00:00 2001 From: muku314115 Date: Fri, 16 Aug 2024 18:23:05 +0000 Subject: [PATCH 04/15] chore: fixes after testing feedback --- build-dev.sh | 24 +- docker-compose-dev.yaml | 1 + snapshotter/processor_distributor.py | 4 +- snapshotter/static/abis/ProtocolContract.json | 5022 ++++++++++------- snapshotter/utils/generic_worker.py | 2 +- snapshotter_autofill.sh | 9 + 6 files changed, 2881 insertions(+), 2181 deletions(-) diff --git a/build-dev.sh b/build-dev.sh index c78fd15..9a166e3 100755 --- a/build-dev.sh +++ b/build-dev.sh @@ -38,15 +38,15 @@ fi source .env -if [ -z "$OVERRIDE_DEFAULTS" ]; then - echo "reset to default values..."; - export PROST_RPC_URL="https://rpc-prost1h-proxy.powerloom.io" - export PROTOCOL_STATE_CONTRACT="0x10c5E2ee14006B3860d4FdF6B173A30553ea6333" - export PROST_CHAIN_ID="11165" - export SEQUENCER_ID="QmdJbNsbHpFseUPKC9vLt4vMsfdxA4dyHPzsAWuzYz3Yxx" - export RELAYER_RENDEZVOUS_POINT="Relayer_POP_test_simulation_phase_1" - export CLIENT_RENDEZVOUS_POINT="POP_Client_simulation_test_alpha" -fi +# if [ -z "$OVERRIDE_DEFAULTS" ]; then +# echo "reset to default values..."; +# export PROST_RPC_URL="https://rpc-prost1h-proxy.powerloom.io" +# export PROTOCOL_STATE_CONTRACT="0x10c5E2ee14006B3860d4FdF6B173A30553ea6333" +# export PROST_CHAIN_ID="11165" +# export SEQUENCER_ID="QmdJbNsbHpFseUPKC9vLt4vMsfdxA4dyHPzsAWuzYz3Yxx" +# export RELAYER_RENDEZVOUS_POINT="Relayer_POP_test_simulation_phase_1" +# export CLIENT_RENDEZVOUS_POINT="POP_Client_simulation_test_alpha" +# fi echo "testing before build..."; @@ -127,8 +127,8 @@ git submodule update --init --recursive # fi # fi -rm -rf snapshotter-lite-local-collector -git clone https://github.com/PowerLoom/snapshotter-lite-local-collector/ snapshotter-lite-local-collector --single-branch --branch fix/generate-new-p2pid +# rm -rf snapshotter-lite-local-collector +# git clone https://github.com/PowerLoom/snapshotter-lite-local-collector/ snapshotter-lite-local-collector --single-branch --branch feat/trusted-relayers cd ./snapshotter-lite-local-collector/ && chmod +x build-docker.sh && ./build-docker.sh; cd ../; @@ -149,4 +149,4 @@ else else docker-compose -f docker-compose-dev.yaml up --no-deps -V --abort-on-container-exit fi -fi \ No newline at end of file +fi diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml index c971289..ba32e91 100755 --- a/docker-compose-dev.yaml +++ b/docker-compose-dev.yaml @@ -26,6 +26,7 @@ services: - CLIENT_RENDEZVOUS_POINT=$CLIENT_RENDEZVOUS_POINT - RELAYER_PRIVATE_KEY=$RELAYER_PRIVATE_KEY - BLOCK_TIME=$BLOCK_TIME + - DATA_MARKET_CONTRACT=$DATA_MARKET_CONTRACT command: bash -c "bash server_autofill.sh && bash init_processes.sh" diff --git a/snapshotter/processor_distributor.py b/snapshotter/processor_distributor.py index 93825a6..70caadb 100644 --- a/snapshotter/processor_distributor.py +++ b/snapshotter/processor_distributor.py @@ -144,10 +144,10 @@ async def init(self): exit(0) try: - self._current_day = self._protocol_state_contract.functions.dayCounter(settings.data_market).call() + self._current_day = self._protocol_state_contract.functions.dayCounter(Web3.to_checksum_address(settings.data_market)).call() task_completion_status = self._protocol_state_contract.functions.checkSlotTaskStatusForDay( - settings.data_market, + Web3.to_checksum_address(settings.data_market), settings.slot_id, self._current_day, ).call() diff --git a/snapshotter/static/abis/ProtocolContract.json b/snapshotter/static/abis/ProtocolContract.json index f9d289e..1a36e45 100644 --- a/snapshotter/static/abis/ProtocolContract.json +++ b/snapshotter/static/abis/ProtocolContract.json @@ -1,2167 +1,2857 @@ [ - { - "inputs": [ - { - "internalType": "uint8", - "name": "epochSize", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "sourceChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sourceChainBlockTime", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "useBlockNumberAsEpochId", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "slotsPerDay", - "type": "uint256" - }, - { - "internalType": "address", - "name": "externalStateAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "snapshotterAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "dayId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "DailyTaskCompletedEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "dayId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "DayStartedEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "validatorAddr", - "type": "address" - } - ], - "name": "DelayedAttestationSubmitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "batchCid", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "DelayedBatchSubmitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "snapshotterAddr", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "DelayedSnapshotSubmitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "begin", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "end", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "EpochReleased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "projectType", - "type": "string" - }, - { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "enableEpochId", - "type": "uint256" - } - ], - "name": "ProjectTypeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "sequencerAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "SequencersUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "validatorAddr", - "type": "address" - } - ], - "name": "SnapshotBatchAttestationSubmitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "SnapshotBatchFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "batchCid", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "SnapshotBatchSubmitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "epochEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "SnapshotFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "snapshotterAddr", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "SnapshotSubmitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "validatorAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "ValidatorsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "snapshotterAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "allSnapshottersUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DailySnapshotQuota", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DeploymentBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EPOCH_SIZE", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SLOTS_PER_DAY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SOURCE_CHAIN_BLOCK_TIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SOURCE_CHAIN_ID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USE_BLOCK_NUMBER_AS_EPOCH_ID", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "projectId", - "type": "string" - } - ], - "internalType": "struct PowerloomProtocolState.Request", - "name": "request", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "acceptSnapshot", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "allSnapshotters", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "projectType", - "type": "string" - } - ], - "name": "allowedProjectTypes", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "projectId", - "type": "string" - } - ], - "name": "attestationFinalizedStatus", - "outputs": [ - { - "internalType": "bool", - "name": "finalized", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "attestationSubmissionWindow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "validatorAddr", - "type": "address" - } - ], - "name": "attestationsReceived", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "rootHash", - "type": "bytes32" - } - ], - "name": "attestationsReceivedCount", - "outputs": [ - { - "internalType": "uint256", - "name": "count", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - } - ], - "name": "batchIdAttestationStatus", - "outputs": [ - { - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "batchIdToProjects", - "outputs": [ - { - "internalType": "string", - "name": "projectids", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchSubmissionWindow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "checkDynamicConsensusAttestations", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "day", - "type": "uint256" - } - ], - "name": "checkSlotTaskStatusForDay", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "currentBatchId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "currentEpoch", - "outputs": [ - { - "internalType": "uint256", - "name": "begin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "dayCounter", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "epochInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blocknumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epochEnd", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "epochsInADay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "externalState", - "outputs": [ - { - "internalType": "contract IExternalState", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "forceCompleteConsensusAttestations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "begin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "forceSkipEpoch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "forceStartDay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getEpochManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getSequencers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - } - ], - "name": "getSlotInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "snapshotterAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timeSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rewardPoints", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentStreak", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentStreakBonus", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentDaySnapshotCount", - "type": "uint256" - } - ], - "internalType": "struct PowerloomProtocolState.SlotInfo", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - } - ], - "name": "getSlotStreak", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_slotId", - "type": "uint256" - } - ], - "name": "getSnapshotterTimeSlot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalSequencersCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalSnapshotterCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalValidatorsCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getValidators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "projectId", - "type": "string" - } - ], - "name": "lastFinalizedSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "lastSnapshotterAddressUpdate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_dayCounter", - "type": "uint256" - } - ], - "name": "loadCurrentDay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dayId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "snapshotCount", - "type": "uint256" - } - ], - "name": "loadSlotSubmissions", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - } - ], - "name": "maxAttestationFinalizedRootHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "rootHash", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - } - ], - "name": "maxAttestationsCount", - "outputs": [ - { - "internalType": "uint256", - "name": "count", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "maxSnapshotsCid", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "maxSnapshotsCidMap", - "outputs": [ - { - "internalType": "string", - "name": "snapshotCid", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "maxSnapshotsCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minAttestationsForConsensus", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minSubmissionsForConsensus", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "projectId", - "type": "string" - } - ], - "name": "projectFirstEpochId", - "outputs": [ - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "messageHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "recoverAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "begin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "releaseEpoch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardBasePoints", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardsEnabled", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "slotCounter", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "slotRewardPoints", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - } - ], - "name": "slotSnapshotterMapping", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - } - ], - "name": "slotStreakCounter", - "outputs": [ - { - "internalType": "uint256", - "name": "streak", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "day", - "type": "uint256" - } - ], - "name": "slotSubmissionCount", - "outputs": [ - { - "internalType": "uint256", - "name": "count", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "snapshotStatus", - "outputs": [ - { - "internalType": "enum PowerloomProtocolState.SnapshotStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "snapshotSubmissionWindow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "snapshotsReceived", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "name": "snapshotsReceivedCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "snapshotsReceivedSlot", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "streakBonusPoints", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "finalizedCidsRootHash", - "type": "bytes32" - } - ], - "name": "submitBatchAttestation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "batchCid", - "type": "string" - }, - { - "internalType": "uint256", - "name": "batchId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "internalType": "string[]", - "name": "projectIds", - "type": "string[]" - }, - { - "internalType": "string[]", - "name": "snapshotCids", - "type": "string[]" - } - ], - "name": "submitSubmissionBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "timeSlotCheck", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slot", - "type": "uint256" - } - ], - "name": "timeSlotPreference", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "toggleRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "toggleTimeSlotCheck", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "totalSnapshotsReceived", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum PowerloomProtocolState.Role", - "name": "role", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "_addresses", - "type": "address[]" - }, - { - "internalType": "bool[]", - "name": "_status", - "type": "bool[]" - } - ], - "name": "updateAddresses", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_projectType", - "type": "string" - }, - { - "internalType": "bool", - "name": "_status", - "type": "bool" - } - ], - "name": "updateAllowedProjectType", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newattestationSubmissionWindow", - "type": "uint256" - } - ], - "name": "updateAttestationSubmissionWindow", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newbatchSubmissionWindow", - "type": "uint256" - } - ], - "name": "updateBatchSubmissionWindow", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "dailySnapshotQuota", - "type": "uint256" - } - ], - "name": "updateDailySnapshotQuota", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "updateEpochManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "externalStateAddress", - "type": "address" - } - ], - "name": "updateExternalStateAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minAttestationsForConsensus", - "type": "uint256" - } - ], - "name": "updateMinAttestationsForConsensus", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minSubmissionsForConsensus", - "type": "uint256" - } - ], - "name": "updateMinSnapshottersForConsensus", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "slotIds", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "submissionsList", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "day", - "type": "uint256" - } - ], - "name": "updateRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newsnapshotSubmissionWindow", - "type": "uint256" - } - ], - "name": "updateSnapshotSubmissionWindow", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newrewardBasePoints", - "type": "uint256" - } - ], - "name": "updaterewardBasePoints", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newstreakBonusPoints", - "type": "uint256" - } - ], - "name": "updatestreakBonusPoints", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "slotId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "string", - "name": "snapshotCid", - "type": "string" - }, - { - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "projectId", - "type": "string" - } - ], - "internalType": "struct PowerloomProtocolState.Request", - "name": "request", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "address", - "name": "signer", - "type": "address" - } - ], - "name": "verify", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "adminAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "AdminsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "BatchSubmissionsCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "snapshotterAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "dayId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "DailyTaskCompletedEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "epochSize", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sourceChainBlockTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "useBlockNumberAsEpochId", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "protocolState", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + } + ], + "name": "DataMarketCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "dayId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "DayStartedEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "validatorAddr", + "type": "address" + } + ], + "name": "DelayedAttestationSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "batchCid", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "DelayedBatchSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "snapshotterAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "snapshotCid", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "DelayedSnapshotSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "begin", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "end", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "EpochReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "projectType", + "type": "string" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "enableEpochId", + "type": "uint256" + } + ], + "name": "ProjectTypeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "projects", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bool[]", + "name": "status", + "type": "bool[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "enableEpochId", + "type": "uint256" + } + ], + "name": "ProjectsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sequencerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "SequencersUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "validatorAddr", + "type": "address" + } + ], + "name": "SnapshotBatchAttestationSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SnapshotBatchFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "batchCid", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SnapshotBatchSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epochEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "snapshotCid", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SnapshotFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "TriggerBatchResubmission", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "ValidatorAttestationsInvalidated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "validatorAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "ValidatorsUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "DAY_SIZE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "EPOCH_SIZE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "SOURCE_CHAIN_BLOCK_TIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "SOURCE_CHAIN_ID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADE_INTERFACE_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "USE_BLOCK_NUMBER_AS_EPOCH_ID", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "allSnapshotters", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "projectType", + "type": "string" + } + ], + "name": "allowedProjectTypes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_slotIds", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "_snapshotterAddresses", + "type": "address[]" + } + ], + "name": "assignSnapshotterToSlotBulk", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "attestationSubmissionWindow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "attestationsReceived", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "finalizedCidsRootHash", + "type": "bytes32" + } + ], + "name": "attestationsReceivedCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + } + ], + "name": "batchIdAttestationStatus", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "idx", + "type": "uint256" + } + ], + "name": "batchIdDivergentValidators", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + } + ], + "name": "batchIdSequencerAttestation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + } + ], + "name": "batchIdToProjects", + "outputs": [ + { + "internalType": "string[]", + "name": "", + "type": "string[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "batchSubmissionWindow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "checkDynamicConsensusAttestations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "day", + "type": "uint256" + } + ], + "name": "checkSlotTaskStatusForDay", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "epochSize", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sourceChainBlockTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "useBlockNumberAsEpochId", + "type": "bool" + } + ], + "name": "createDataMarket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "currentBatchId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "currentEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "begin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "dailySnapshotQuota", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dataMarketCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + } + ], + "name": "dataMarketEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dataMarketFactory", + "outputs": [ + { + "internalType": "contract DataMarketFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "dataMarketId", + "type": "uint8" + } + ], + "name": "dataMarketIdToAddress", + "outputs": [ + { + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "dataMarkets", + "outputs": [ + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "epochSize", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sourceChainBlockTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "useBlockNumberAsEpochId", + "type": "bool" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "createdAt", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "dayCounter", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "deploymentBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "endBatchSubmissions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "epochIdToBatchIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "epochInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochEnd", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "epochManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "epochsInADay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "forceCompleteConsensusAttestations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "begin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "forceSkipEpoch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getEpochManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getSequencerId", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getSequencers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + } + ], + "name": "getSlotInfo", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "snapshotterAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rewardPoints", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentDaySnapshotCount", + "type": "uint256" + } + ], + "internalType": "struct PowerloomDataMarket.SlotInfo", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + } + ], + "name": "getSlotRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "rewards", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getTotalSequencersCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalSnapshotterCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getTotalValidatorsCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "getValidators", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" + } + ], + "name": "lastFinalizedSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_dayCounter", + "type": "uint256" + } + ], + "name": "loadCurrentDay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dayId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "snapshotCount", + "type": "uint256" + } + ], + "name": "loadSlotSubmissions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + } + ], + "name": "maxAttestationFinalizedRootHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + } + ], + "name": "maxAttestationsCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "maxSnapshotsCid", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "minAttestationsForConsensus", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "minSubmissionsForConsensus", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" + } + ], + "name": "projectFirstEpochId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "begin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "releaseEpoch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "rewardBasePoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "rewardsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "_sequencerId", + "type": "string" + } + ], + "name": "setSequencerId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "slotCounter", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + } + ], + "name": "slotRewardPoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "slotRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + } + ], + "name": "slotSnapshotterMapping", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dayId", + "type": "uint256" + } + ], + "name": "slotSubmissionCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + } + ], + "name": "snapshotStatus", + "outputs": [ + { + "internalType": "enum PowerloomDataMarket.SnapshotStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "string", + "name": "snapshotCid", + "type": "string" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "snapshotSubmissionWindow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "snapshotterState", + "outputs": [ + { + "internalType": "contract SnapshotterState", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "finalizedCidsRootHash", + "type": "bytes32" + } + ], + "name": "submitBatchAttestation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "snapshotCid", + "type": "string" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "string", + "name": "snapshotCid", + "type": "string" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" + } + ], + "internalType": "struct PowerloomDataMarket.Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "submitSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "batchCid", + "type": "string" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochId", + "type": "uint256" + }, + { + "internalType": "string[]", + "name": "projectIds", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "snapshotCids", + "type": "string[]" + }, + { + "internalType": "bytes32", + "name": "finalizedCidsRootHash", + "type": "bytes32" + } + ], + "name": "submitSubmissionBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "dataMarketAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "toggleDataMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "toggleFallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + } + ], + "name": "toggleRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "enum PowerloomDataMarket.Role", + "name": "role", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "_addresses", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "_status", + "type": "bool[]" + } + ], + "name": "updateAddresses", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string", + "name": "_projectType", + "type": "string" + }, + { + "internalType": "bool", + "name": "_status", + "type": "bool" + } + ], + "name": "updateAllowedProjectType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newattestationSubmissionWindow", + "type": "uint256" + } + ], + "name": "updateAttestationSubmissionWindow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newbatchSubmissionWindow", + "type": "uint256" + } + ], + "name": "updateBatchSubmissionWindow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_dailySnapshotQuota", + "type": "uint256" + } + ], + "name": "updateDailySnapshotQuota", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "updateDataMarketFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newDaySize", + "type": "uint256" + } + ], + "name": "updateDaySize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "updateEpochManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "address[]", + "name": "_fallbackNodes", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "_status", + "type": "bool[]" + } + ], + "name": "updateFallbackNodes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_minAttestationsForConsensus", + "type": "uint256" + } + ], + "name": "updateMinAttestationsForConsensus", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_minSubmissionsForConsensus", + "type": "uint256" + } + ], + "name": "updateMinSnapshottersForConsensus", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "string[]", + "name": "_projects", + "type": "string[]" + }, + { + "internalType": "bool[]", + "name": "_status", + "type": "bool[]" + } + ], + "name": "updateProjects", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newRewardBasePoints", + "type": "uint256" + } + ], + "name": "updateRewardBasePoints", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "slotIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "submissionsList", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "day", + "type": "uint256" + } + ], + "name": "updateRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PowerloomDataMarket", + "name": "dataMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newsnapshotSubmissionWindow", + "type": "uint256" + } + ], + "name": "updateSnapshotSubmissionWindow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "updateSnapshotterState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] \ No newline at end of file diff --git a/snapshotter/utils/generic_worker.py b/snapshotter/utils/generic_worker.py index 14264ab..06c454c 100644 --- a/snapshotter/utils/generic_worker.py +++ b/snapshotter/utils/generic_worker.py @@ -554,7 +554,7 @@ async def _init_protocol_meta(self): # TODO: combine these into a single call try: source_block_time = await self._anchor_rpc_helper.web3_call( - [self.protocol_state_contract.functions.SOURCE_CHAIN_BLOCK_TIME(Web3.to_checksum_address(settings.data_market)], + [self.protocol_state_contract.functions.SOURCE_CHAIN_BLOCK_TIME(Web3.to_checksum_address(settings.data_market))], ) except Exception as e: self.logger.exception( diff --git a/snapshotter_autofill.sh b/snapshotter_autofill.sh index 082130d..c071719 100755 --- a/snapshotter_autofill.sh +++ b/snapshotter_autofill.sh @@ -1,5 +1,14 @@ #!/bin/bash +source .env + +if [ -z "$OVERRIDE_DEFAULTS" ]; then + echo "reset to default values..."; + export PROST_RPC_URL="https://rpc-prost1h-proxy.powerloom.io" + export PROTOCOL_STATE_CONTRACT="0x3ca327955CC1185D1ff97133380bb068B566F310" + export PROST_CHAIN_ID="11165" +fi + echo 'populating setting from environment values...'; if [ -z "$SOURCE_RPC_URL" ]; then From d6db6f5b754db79a6c8f834e236eb79314510d71 Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Wed, 21 Aug 2024 22:37:00 +0530 Subject: [PATCH 05/15] chore: fix logs and remove obsolete code --- build-dev.sh | 22 ---------------------- snapshotter/utils/generic_worker.py | 8 ++++---- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/build-dev.sh b/build-dev.sh index 9a166e3..d6ad816 100755 --- a/build-dev.sh +++ b/build-dev.sh @@ -38,17 +38,6 @@ fi source .env -# if [ -z "$OVERRIDE_DEFAULTS" ]; then -# echo "reset to default values..."; -# export PROST_RPC_URL="https://rpc-prost1h-proxy.powerloom.io" -# export PROTOCOL_STATE_CONTRACT="0x10c5E2ee14006B3860d4FdF6B173A30553ea6333" -# export PROST_CHAIN_ID="11165" -# export SEQUENCER_ID="QmdJbNsbHpFseUPKC9vLt4vMsfdxA4dyHPzsAWuzYz3Yxx" -# export RELAYER_RENDEZVOUS_POINT="Relayer_POP_test_simulation_phase_1" -# export CLIENT_RENDEZVOUS_POINT="POP_Client_simulation_test_alpha" -# fi - - echo "testing before build..."; if [ -z "$SOURCE_RPC_URL" ]; then @@ -118,17 +107,6 @@ fi # setting up git submodules git submodule update --init --recursive -# check if snapshotter-lite-local-collector exists -# if [ -d "./snapshotter-lite-local-collector" ]; then -# echo "snapshotter-lite-local-collector exists, do you want to delete and clone a fresh one? (y/n)"; -# read response; -# if [ "$response" == "y" ]; then -# rm -rf ./snapshotter-lite-local-collector - -# fi -# fi -# rm -rf snapshotter-lite-local-collector -# git clone https://github.com/PowerLoom/snapshotter-lite-local-collector/ snapshotter-lite-local-collector --single-branch --branch feat/trusted-relayers cd ./snapshotter-lite-local-collector/ && chmod +x build-docker.sh && ./build-docker.sh; cd ../; diff --git a/snapshotter/utils/generic_worker.py b/snapshotter/utils/generic_worker.py index 06c454c..ea0ad21 100644 --- a/snapshotter/utils/generic_worker.py +++ b/snapshotter/utils/generic_worker.py @@ -242,7 +242,7 @@ async def _submit_to_snap_api_and_check(self, project_id: str, epoch: SnapshotPr await self._send_submission_to_collector(snapshot_cid=snapshot_cid, epoch_id=epoch.epochId, project_id=f'{project_id}|{settings.node_version}') except Exception as e: self.logger.error( - '❌ Event processing failed: {}', epoch, + '❌ Simulation snapshot generation failed: {}', epoch, ) self.logger.info('Please check your config and if issue persists please reach out to the team!') sys.exit(1) @@ -316,12 +316,12 @@ async def send_message(self, msg, simulation=False): if 'Success' in response.message: self.logger.info( - '✅ Event processed successfully: {}!', msg, + '✅ Simulation snapshot submitted successfully: {}!', msg, ) else: - raise Exception(f'Failed to send simulation message, got response: {response.message}') + raise Exception(f'Failed to send simulation snapshot, got response: {response.message}') except: - raise Exception(f'Failed to send simulation message: {msg}') + raise Exception(f'Failed to send simulation snapshot: {msg}') else: try: async with self.open_stream() as stream: From 288c50f02fdb2573686b0f6619309eb618377378 Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Wed, 21 Aug 2024 22:42:47 +0530 Subject: [PATCH 06/15] chore: update snapshotter autofill values --- snapshotter_autofill.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/snapshotter_autofill.sh b/snapshotter_autofill.sh index c071719..2e8db55 100755 --- a/snapshotter_autofill.sh +++ b/snapshotter_autofill.sh @@ -4,9 +4,10 @@ source .env if [ -z "$OVERRIDE_DEFAULTS" ]; then echo "reset to default values..."; - export PROST_RPC_URL="https://rpc-prost1h-proxy.powerloom.io" - export PROTOCOL_STATE_CONTRACT="0x3ca327955CC1185D1ff97133380bb068B566F310" - export PROST_CHAIN_ID="11165" + export PROST_RPC_URL="https://rpc-prost1m.powerloom.io" + export PROTOCOL_STATE_CONTRACT="0xE88E5f64AEB483d7057645326AdDFA24A3B312DF" + export DATA_MARKET_CONTRACT="0xB37AAFDEd58846AF0B1Bcdda80669CfcFFDF1f26" + export PROST_CHAIN_ID="11169" fi echo 'populating setting from environment values...'; From 73d513c086a2f230776e06fe8a321f4ee68d3d8c Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Wed, 21 Aug 2024 22:49:45 +0530 Subject: [PATCH 07/15] fix: ensure default env values are set once --- build.sh | 12 +++++------- snapshotter_autofill.sh | 8 -------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/build.sh b/build.sh index da9e158..0eacee1 100755 --- a/build.sh +++ b/build.sh @@ -39,13 +39,11 @@ fi source .env if [ -z "$OVERRIDE_DEFAULTS" ]; then - echo "reset to default values..."; - export PROST_RPC_URL="https://rpc-prost1h-proxy.powerloom.io" - export PROTOCOL_STATE_CONTRACT="0x10c5E2ee14006B3860d4FdF6B173A30553ea6333" - export PROST_CHAIN_ID="11165" - export SEQUENCER_ID="QmdJbNsbHpFseUPKC9vLt4vMsfdxA4dyHPzsAWuzYz3Yxx" - export RELAYER_RENDEZVOUS_POINT="Relayer_POP_test_simulation_phase_1" - export CLIENT_RENDEZVOUS_POINT="POP_Client_simulation_test_alpha" + echo "setting default values..."; + export PROST_RPC_URL="https://rpc-prost1m.powerloom.io" + export PROTOCOL_STATE_CONTRACT="0xE88E5f64AEB483d7057645326AdDFA24A3B312DF" + export DATA_MARKET_CONTRACT="0xB37AAFDEd58846AF0B1Bcdda80669CfcFFDF1f26" + export PROST_CHAIN_ID="11169" fi diff --git a/snapshotter_autofill.sh b/snapshotter_autofill.sh index 2e8db55..a5ab5c8 100755 --- a/snapshotter_autofill.sh +++ b/snapshotter_autofill.sh @@ -2,14 +2,6 @@ source .env -if [ -z "$OVERRIDE_DEFAULTS" ]; then - echo "reset to default values..."; - export PROST_RPC_URL="https://rpc-prost1m.powerloom.io" - export PROTOCOL_STATE_CONTRACT="0xE88E5f64AEB483d7057645326AdDFA24A3B312DF" - export DATA_MARKET_CONTRACT="0xB37AAFDEd58846AF0B1Bcdda80669CfcFFDF1f26" - export PROST_CHAIN_ID="11169" -fi - echo 'populating setting from environment values...'; if [ -z "$SOURCE_RPC_URL" ]; then From bfd96fd48d099d2af4e4ebc68f2c8ecb161b39b4 Mon Sep 17 00:00:00 2001 From: Seth Date: Wed, 21 Aug 2024 14:51:43 -0400 Subject: [PATCH 08/15] chore: update last finalized epoch endpoint for latest contract --- snapshotter/core_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapshotter/core_api.py b/snapshotter/core_api.py index 57cbcf8..ec11ece 100644 --- a/snapshotter/core_api.py +++ b/snapshotter/core_api.py @@ -196,7 +196,7 @@ async def get_project_last_finalized_epoch_info( while not epoch_finalized and epoch_id >= 0: # get finalization status [epoch_finalized_contract] = await request.app.state.anchor_rpc_helper.web3_call( - [request.app.state.protocol_state_contract.functions.snapshotStatus(project_id, epoch_id)], + [request.app.state.protocol_state_contract.functions.snapshotStatus(settings.data_market, project_id, epoch_id)], ) if epoch_finalized_contract[0]: epoch_finalized = True From 8a152cc90c946907f7533ee588223609e5d53f6e Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Thu, 22 Aug 2024 16:20:16 +0530 Subject: [PATCH 09/15] chore: cleanup unused envs --- build-dev.sh | 3 --- build.sh | 4 ---- docker-compose-dev.yaml | 4 ---- docker-compose.yaml | 4 ---- env.example | 4 ---- 5 files changed, 19 deletions(-) diff --git a/build-dev.sh b/build-dev.sh index d6ad816..f627103 100755 --- a/build-dev.sh +++ b/build-dev.sh @@ -75,9 +75,6 @@ if [ "$PROTOCOL_STATE_CONTRACT" ]; then echo "Found PROTOCOL_STATE_CONTRACT ${PROTOCOL_STATE_CONTRACT}"; fi -if [ "$RELAYER_HOST" ]; then - echo "Found RELAYER_HOST ${RELAYER_HOST}"; -fi if [ "$WEB3_STORAGE_TOKEN" ]; then echo "Found WEB3_STORAGE_TOKEN ${WEB3_STORAGE_TOKEN}"; diff --git a/build.sh b/build.sh index 0eacee1..f09e33b 100755 --- a/build.sh +++ b/build.sh @@ -85,10 +85,6 @@ if [ "$PROTOCOL_STATE_CONTRACT" ]; then fi -if [ "$RELAYER_HOST" ]; then - echo "Found RELAYER_HOST ${RELAYER_HOST}"; -fi - if [ "$WEB3_STORAGE_TOKEN" ]; then echo "Found WEB3_STORAGE_TOKEN ${WEB3_STORAGE_TOKEN}"; fi diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml index ba32e91..16f4653 100755 --- a/docker-compose-dev.yaml +++ b/docker-compose-dev.yaml @@ -20,10 +20,7 @@ services: - PROST_CHAIN_ID=$PROST_CHAIN_ID - REDIS_HOST=${REDIS_HOST:-redis} - REDIS_PORT=${REDIS_PORT:-6379} - - SEQUENCER_MULTIADDR=$SEQUENCER_MULTIADDR - - RELAYER_RENDEZVOUS_POINT=$RELAYER_RENDEZVOUS_POINT - LOCAL_COLLECTOR_PORT=$LOCAL_COLLECTOR_PORT - - CLIENT_RENDEZVOUS_POINT=$CLIENT_RENDEZVOUS_POINT - RELAYER_PRIVATE_KEY=$RELAYER_PRIVATE_KEY - BLOCK_TIME=$BLOCK_TIME - DATA_MARKET_CONTRACT=$DATA_MARKET_CONTRACT @@ -45,7 +42,6 @@ services: - SIGNER_ACCOUNT_PRIVATE_KEY=$SIGNER_ACCOUNT_PRIVATE_KEY - SLOT_ID=$SLOT_ID - SOURCE_RPC_URL=$SOURCE_RPC_URL - - RELAYER_HOST=$RELAYER_HOST - PROST_RPC_URL=$PROST_RPC_URL - IPFS_URL=$IPFS_URL - DATA_MARKET_CONTRACT=$DATA_MARKET_CONTRACT diff --git a/docker-compose.yaml b/docker-compose.yaml index 55f1b5a..a43b645 100755 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -20,9 +20,6 @@ services: - PROST_CHAIN_ID=$PROST_CHAIN_ID - REDIS_HOST=${REDIS_HOST:-redis} - REDIS_PORT=${REDIS_PORT:-6379} - - SEQUENCER_ID=$SEQUENCER_ID - - RELAYER_RENDEZVOUS_POINT=$RELAYER_RENDEZVOUS_POINT - - CLIENT_RENDEZVOUS_POINT=$CLIENT_RENDEZVOUS_POINT - LOCAL_COLLECTOR_PORT=$LOCAL_COLLECTOR_PORT - RELAYER_PRIVATE_KEY=$RELAYER_PRIVATE_KEY - BLOCK_TIME=$BLOCK_TIME @@ -41,7 +38,6 @@ services: - SIGNER_ACCOUNT_ADDRESS=$SIGNER_ACCOUNT_ADDRESS - SIGNER_ACCOUNT_PRIVATE_KEY=$SIGNER_ACCOUNT_PRIVATE_KEY - SLOT_ID=$SLOT_ID - - RELAYER_HOST=$RELAYER_HOST - SOURCE_RPC_URL=$SOURCE_RPC_URL - PROST_RPC_URL=$PROST_RPC_URL - IPFS_URL=$IPFS_URL diff --git a/env.example b/env.example index 86290dc..6e878e7 100755 --- a/env.example +++ b/env.example @@ -6,13 +6,9 @@ SLOT_ID= PROST_RPC_URL=https://rpc-prost1h-proxy.powerloom.io PROTOCOL_STATE_CONTRACT=0x10c5E2ee14006B3860d4FdF6B173A30553ea6333 DATA_MARKET_CONTRACT= -RELAYER_HOST=https://prost1h-relayer-public.powerloom.io NAMESPACE=UNISWAPV2 POWERLOOM_REPORTING_URL=https://nms-testnet-reporting.powerloom.io PROST_CHAIN_ID=11165 -SEQUENCER_MULTIADDR=/dns/proto-snapshot-listener.aws2.powerloom.io/tcp/9100/p2p/QmTK9e9QNEotPkjWAdZT5bbYKV7PEJVu7iXzdVn3VZDEk9 -RELAYER_RENDEZVOUS_POINT=Relayer_POP_test_simulation_phase_1 -CLIENT_RENDEZVOUS_POINT=POP_Client_simulation_test_alpha LOCAL_COLLECTOR_PORT=50051 CORE_API_PORT=8002 # Optional From c981f9e8533ba740bd308dd7eea1f0820ab065a5 Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Thu, 22 Aug 2024 17:18:32 +0530 Subject: [PATCH 10/15] chore: remove old relayer env --- snapshotter_autofill.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/snapshotter_autofill.sh b/snapshotter_autofill.sh index a5ab5c8..fd1ecbe 100755 --- a/snapshotter_autofill.sh +++ b/snapshotter_autofill.sh @@ -34,9 +34,6 @@ if [ -z "$SIGNER_ACCOUNT_PRIVATE_KEY" ]; then exit 1; fi -if [ "$RELAYER_HOST" ]; then - echo "Found RELAYER_HOST ${RELAYER_HOST}"; -fi echo "Found SOURCE RPC URL ${SOURCE_RPC_URL}"; @@ -76,7 +73,6 @@ export ipfs_url="${IPFS_URL:-}" export ipfs_api_key="${IPFS_API_KEY:-}" export ipfs_api_secret="${IPFS_API_SECRET:-}" export web3_storage_token="${WEB3_STORAGE_TOKEN:-}" -export relayer_host="${RELAYER_HOST:-https://relayer-nms-testnet-public.powerloom.io}" export local_collector_port="${LOCAL_COLLECTOR_PORT:-50051}" export slack_reporting_url="${SLACK_REPORTING_URL:-}" export powerloom_reporting_url="${POWERLOOM_REPORTING_URL:-}" @@ -98,7 +94,6 @@ echo "Using data market contract: ${DATA_MARKET_CONTRACT}" echo "Using slack reporting url: ${slack_reporting_url}" echo "Using powerloom reporting url: ${powerloom_reporting_url}" echo "Using web3 storage token: ${web3_storage_token}" -echo "Using relayer host: ${relayer_host}" sed -i'.backup' "s#relevant-namespace#$namespace#" config/settings.json @@ -125,7 +120,6 @@ sed -i'.backup' "s#https://slack-reporting-url#$slack_reporting_url#" config/set sed -i'.backup' "s#https://powerloom-reporting-url#$powerloom_reporting_url#" config/settings.json sed -i'.backup' "s#signer-account-private-key#$SIGNER_ACCOUNT_PRIVATE_KEY#" config/settings.json -sed -i'.backup' "s#https://relayer-url#$relayer_host#" config/settings.json sed -i'.backup' "s#local-collector-port#$local_collector_port#" config/settings.json From e7320fe275065a282338cd85f1ed6ed652a82ebe Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Thu, 22 Aug 2024 17:19:24 +0530 Subject: [PATCH 11/15] chore: update latest data market default val --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index f09e33b..bcba3b0 100755 --- a/build.sh +++ b/build.sh @@ -42,7 +42,7 @@ if [ -z "$OVERRIDE_DEFAULTS" ]; then echo "setting default values..."; export PROST_RPC_URL="https://rpc-prost1m.powerloom.io" export PROTOCOL_STATE_CONTRACT="0xE88E5f64AEB483d7057645326AdDFA24A3B312DF" - export DATA_MARKET_CONTRACT="0xB37AAFDEd58846AF0B1Bcdda80669CfcFFDF1f26" + export DATA_MARKET_CONTRACT="0x0C2E22fe7526fAeF28E7A58c84f8723dEFcE200c" export PROST_CHAIN_ID="11169" fi From 952c0e12b562e5afed8bd0bca1483d1223d66d46 Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Thu, 22 Aug 2024 17:20:49 +0530 Subject: [PATCH 12/15] chore: update env example --- env.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env.example b/env.example index 6e878e7..54d20c4 100755 --- a/env.example +++ b/env.example @@ -3,8 +3,8 @@ SOURCE_RPC_URL= SIGNER_ACCOUNT_ADDRESS= SIGNER_ACCOUNT_PRIVATE_KEY= SLOT_ID= -PROST_RPC_URL=https://rpc-prost1h-proxy.powerloom.io -PROTOCOL_STATE_CONTRACT=0x10c5E2ee14006B3860d4FdF6B173A30553ea6333 +PROST_RPC_URL= +PROTOCOL_STATE_CONTRACT= DATA_MARKET_CONTRACT= NAMESPACE=UNISWAPV2 POWERLOOM_REPORTING_URL=https://nms-testnet-reporting.powerloom.io From 6ebd9391abcdf75820eb4e39a8fb8c8a66956cb5 Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Thu, 22 Aug 2024 17:34:31 +0530 Subject: [PATCH 13/15] chore: pass data market contract in env to local collector --- docker-compose.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index a43b645..afd7e74 100755 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -16,6 +16,7 @@ services: - IPFS_API_KEY=$IPFS_API_KEY - IPFS_API_SECRET=$IPFS_API_SECRET - PROTOCOL_STATE_CONTRACT=$PROTOCOL_STATE_CONTRACT + - DATA_MARKET_CONTRACT=$DATA_MARKET_CONTRACT - PROST_RPC_URL=$PROST_RPC_URL - PROST_CHAIN_ID=$PROST_CHAIN_ID - REDIS_HOST=${REDIS_HOST:-redis} @@ -44,6 +45,7 @@ services: - IPFS_API_KEY=$IPFS_API_KEY - IPFS_API_SECRET=$IPFS_API_SECRET - PROTOCOL_STATE_CONTRACT=$PROTOCOL_STATE_CONTRACT + - DATA_MARKET_CONTRACT=$DATA_MARKET_CONTRACT - LOCAL_COLLECTOR_PORT=$LOCAL_COLLECTOR_PORT - SLACK_REPORTING_URL=$SLACK_REPORTING_URL - POWERLOOM_REPORTING_URL=$POWERLOOM_REPORTING_URL From 5378e4a0d3cb5ae85e95b14e618144c1c52ba5fe Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Thu, 22 Aug 2024 18:52:21 +0530 Subject: [PATCH 14/15] chore: update env example --- env.example | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/env.example b/env.example index 54d20c4..979fe86 100755 --- a/env.example +++ b/env.example @@ -3,12 +3,12 @@ SOURCE_RPC_URL= SIGNER_ACCOUNT_ADDRESS= SIGNER_ACCOUNT_PRIVATE_KEY= SLOT_ID= -PROST_RPC_URL= -PROTOCOL_STATE_CONTRACT= -DATA_MARKET_CONTRACT= +PROST_RPC_URL=https://rpc-prost1m.powerloom.io +PROTOCOL_STATE_CONTRACT=0xE88E5f64AEB483d7057645326AdDFA24A3B312DF +DATA_MARKET_CONTRACT=0x0C2E22fe7526fAeF28E7A58c84f8723dEFcE200c NAMESPACE=UNISWAPV2 POWERLOOM_REPORTING_URL=https://nms-testnet-reporting.powerloom.io -PROST_CHAIN_ID=11165 +PROST_CHAIN_ID=11169 LOCAL_COLLECTOR_PORT=50051 CORE_API_PORT=8002 # Optional From d177f9612b1e8947acf66bcd55d8f5edd91d6785 Mon Sep 17 00:00:00 2001 From: anomit ghosh Date: Thu, 22 Aug 2024 18:56:20 +0530 Subject: [PATCH 15/15] chore: update config ref --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index b3972f6..c026a17 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit b3972f661e4269059f48d8db76c6e1276017a8dd +Subproject commit c026a17e753df2b3cf5dcfbcd4e274fdebae36ad