Skip to content

Commit

Permalink
docs(experimental): update multidapp-claimer instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelstanley committed Aug 26, 2024
1 parent 8b2a3f0 commit 86ba162
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ docker-run-sepolia: docker-clean ## Run the node with the sepolia testnet
-f ./build/compose-sepolia.yaml \
up

.PHONY: docker-run-experimental
docker-run-experimental: docker-clean ## Run the node with an external redis instance
@docker compose \
-f ./build/compose-database.yaml \
-f ./build/compose-devnet.yaml \
-f ./build/compose-snapshot.yaml \
-f ./build/compose-node.yaml \
-f ./build/compose-experimental.yaml \
up --force-recreate

.PHONY: docker-clean
docker-clean: ## Remove the containers and volumes from previous compose run
@docker compose \
Expand Down
21 changes: 14 additions & 7 deletions offchain/authority-claimer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@ All dapps must share the same History contract and the same chain ID.
Instead of using evironment variables,
the claimer will get the list of application addresses from Redis,
through the `experimental-dapp-addresses-config` key.
This key holds a Redis Set value.
You must use commands such as SADD and SREM to manipulate the list of addresses.
Addresses are encoded as hex strings without the leading `"0x"`.
Redis values are case sensitive, so addresses must be in lowercase format.
Example address value: `"0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a"`.
This key holds a [Redis Set](https://redis.io/docs/latest/develop/data-types/sets/) value.
You must use commands such as [`SADD`](https://redis.io/docs/latest/commands/sadd/) and [`SREM`]https://redis.io/docs/latest/commands/srem/() to manipulate the set of addresses.

You may rewrite the list of addresses at any time,
Addresses must be encoded as hex strings, preferrably with prefix `"0x"`.
Example address value: `"0x0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a"`.

> [!NOTE]
> Duplicate addresses as well as malformed addresses are detected and logged.
> [!TIP]
> Application addresses are case insensitive even though Redis values are not.
> So, even though,`"0x00000000000000000000000000000000deadbeef"` and `"0x00000000000000000000000000000000DeadBeef"` may be part of the same Redis Set, they are considered the same application address.
You may update the contents of `experimental-dapp-addresses-config` at any time,
the claimer will adjust accordingly.
The list of addresses can be empty at any time,
The set of addresses may be emptied at any time as well,
the claimer will wait until an application address is added to the set to resume operations.

0 comments on commit 86ba162

Please sign in to comment.