Open hackaugusto opened 5 years ago
the smart contract registering its own hashed address as a secret, and then querying the registered block.
What do you mean? So SecretRegistry
's constructor will register the hash of the address of itself?
Assigned @hackaugusto because I'm expecting him to explain his idea.
What do you mean? So SecretRegistry's constructor will register the hash of the address of itself?
The TokenNetworkRegistry
constructor should validate that the address provided is a valid secret registry.
I understand that. I still don't understand:
can be done by the smart contract registering its own hashed address as a secret, and then querying the registered block.
Especially, what registers the SecretRegistry and what queries the registered block.
Especially, what registers the SecretRegistry and what queries the registered block.
That was just a suggestion, any random value that is not registered yet can be used.
@hackaugusto suggests something like smoke-testing the SecretRegistry from either TokenNetworkRegistry or from TokenNetwork's constructor.
This is not strictly necessary, but it would be nice if the
TokenNetworkRegistry
would check thatSecretRegistry
is a valid smart contract. I believe this can be done by the smart contract registering its own hashed address as a secret, and then querying the registered block.This will definitely make the deployment of a
TokenNetworkRegistry
more expensive, but since that operation is really done once, IMO it is not that big of problem.