Closed kayabaNerve closed 7 months ago
This should be implemented by #92 except for the gas functionality, which we can kick to a new issue. I'd also appreciate closing this to make way for a new tracking issue with individual tasks as smaller issues.
Thanks to @noot, we now have a Ethereum Schnorr contract. Our final contract still needs two features:
This issue is specifically for the latter, with a follow up issue being for the former.
By taking in a series of address, calldata pairs, we can execute an arbitrary list of transactions. We can only check a single signature for all transactions if either:
accum = keccak256(abi.encodePacked(accum, address, data))
.keccak256(abi.encode(addresses, datas))
.calldatasize
andcalldatacopy
to avoidabi.encode
entirely. This has a slight degree of malleability, as data could be put after the calldata and included here in this hash, yet then it'd be seeking a hash collision so this shouldn't be an issue.I assume the last one will be cheapest, yet wanted to note the ideas I had so we can ensure this has minimal costs.
Due to using a Schnorr signature, someone must also publish this transaction. Accordingly, they should either: A) Get a refund for doing so, from the contract. This would have the Schnorr signature also specify a gas price, verifying it's the one actually used by
gasprice
. This would create a leaderless scenario. B) This can be left out-of-contract to some sort of DAO, yet I'd like for it to be in the protocol (under A).