hyperledger-labs / yui-ibc-solidity

IBC in Solidity
Apache License 2.0
132 stars 62 forks source link

consider using more efficient solidity proto libraries #17

Open hxrts opened 3 years ago

hxrts commented 3 years ago

from @adlerjohn:

They encode to storage, not memory https://github.com/datachainlab/ibc-solidity/blob/e5c5e622877e1c6c5269b4238889007dd135be13/contracts/core/types/ProtoBufRuntime.sol#L21 i.e. it'll cost like a billion gas to do anything. If you know them, tell them to use and contribute to my library!

  1. https://github.com/lazyledger/protobuf3-solidity-lib
  2. https://github.com/lazyledger/protobuf3-solidity
bluele commented 3 years ago

Thanks! We are currently using the encode function(e.g. this impl) generated by the generator instead of encodeStorage, but we would like to check the possibility that the lazyledger implementation might be more efficient.