Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABI: should disallow empty tuples and fixed length arrays of 0 members #4069

Closed
axic opened this issue May 4, 2018 · 4 comments
Closed

ABI: should disallow empty tuples and fixed length arrays of 0 members #4069

axic opened this issue May 4, 2018 · 4 comments
Labels
breaking change ⚠️ closed due inactivity The issue/PR was automatically closed due to inactivity. protocol design 🔮 Potential changes to ABI, meta data, standard JSON stale The issue/PR was marked as stale because it has been open for too long.

Comments

@axic
Copy link
Member

axic commented May 4, 2018

Currently the ABI allows tuples to have 0 members and fixed length arrays to be at fixed 0 length.

The following (fixed-size) array type exists:
<type>[M]: a fixed-length array of M elements, M >= 0, of the given type.

and

(T1,T2,...,Tn): tuple consisting of the types T1, …, Tn, n >= 0

I am not convinced it makes sense supporting these.

What are the arguments for having these?

@chriseth
Copy link
Contributor

chriseth commented May 4, 2018

We at least need empty statically-sized arrays, because they are needed in the definition of the encoding of dynamically-sized empty arrays, and I think the statically-sized arrays in turn use tuples for encoding (or vice-versa), so I guess we could just keep all of them for completeness.

@axic axic added the protocol design 🔮 Potential changes to ABI, meta data, standard JSON label Aug 7, 2018
@danjm
Copy link

danjm commented Jun 3, 2019

An issue in the ethereum/wiki repo that also questions the necessity of supporting fixed length arrays of 0 members: ethereum/wiki#614

@chriseth
Copy link
Contributor

A language is not required to support the full range of types documented in the ABI specification.

@NunoFilipeSantos NunoFilipeSantos added the stale The issue/PR was marked as stale because it has been open for too long. label Nov 25, 2022
@github-actions
Copy link

Hi everyone! This issue has been closed due to inactivity.
If you think this issue is still relevant in the latest Solidity version and you have something to contribute, feel free to reopen.
However, unless the issue is a concrete proposal that can be implemented, we recommend starting a language discussion on the forum instead.

@github-actions github-actions bot added the closed due inactivity The issue/PR was automatically closed due to inactivity. label Jan 27, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ⚠️ closed due inactivity The issue/PR was automatically closed due to inactivity. protocol design 🔮 Potential changes to ABI, meta data, standard JSON stale The issue/PR was marked as stale because it has been open for too long.
Projects
None yet
Development

No branches or pull requests

4 participants