fulldecent / aion-aip040

Reference implementation for Aion non-fungible tokens
MIT License
3 stars 3 forks source link

Review efficiency of encoding arrays #10

Closed fulldecent closed 5 years ago

fulldecent commented 5 years ago

To review with AVM team:

Please clarify the efficiency of passing arrays of data to AVM. Specifically we would like to know how much overhead there is in passing a single address as an array [Address] versus passing the address alone Address. Seeking a very detailed answer to this question, i.e. energy cost comparison with examples.

If it is the case that passing an array has zero a extremely low additional overhead then we may swift to transferring tokens in batch by default. This is a commonly proposed feature in Ethereum.

fulldecent commented 5 years ago

This is currently implement at https://github.com/fulldecent/aion-aip040/blob/master/src/main/java/org/aion/NFToken.java#L74

I'm not sure if the current approach is too wasteful versus baseline one-token-transfer-at-a-time

fulldecent commented 5 years ago

Don't care. Upside for use cases is too high