-
Notifications
You must be signed in to change notification settings - Fork 322
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
Common tests for ABI encoding #691
Comments
looks like more of a solidity field. |
I don't think this issue should be closed. Solidity is a part of Ethereum. People are writing the implementation of ABI in different languages so they should have a test set to test against |
We had bugs in Elixir implementation for a couple of years |
@ayrat555 which format are you proposing that could be language-independent? |
@chriseth I think any representation will work. If people won't like it, they can just convert to any format they want. the problem is in absence of tests, not its representation. About test structure. I think something like RLP tests will work:
|
We could start with some tests for an existing ABI encoder implementation. |
It would be great. The same tests can be used for decoder tests
|
Have a look at the earlier discussion (#118) too. I also think there was a relevant issue on the Solidity repository from 2-3-4 years ago. |
It seems it didn't get far |
ok. had an overview of existing tests. we actually have a lot of structure tests here. for rlp,difficulty,transactions,genesis whatever which are not being run on the actual client. I push the idea of having a test framework/ test suite. preferably rpc protocol through which I can manage and execute all this tests. (currently it is only the state test generation that is done that way) But it seems that people prefere to have their own parser for this smaller tests. It is fine to have it this test repository. However we really lack of contributors to develop those tests. @ayrat555 if you have a project and need ABI tests feel free to contribute json tests to this repo. |
Recently I've been fixing bugs for Elixir implementation (https://github.com/poanetwork/ex_abi) so I have a lot of test cases. Which format do you want for them? |
I knew about these tests. I think they are not complete |
Yes. I mean this is the format. If you have more tests please share. |
This is kind of a chicken and egg problem, if you want to write an ABI encoder/decoder it is ofter very useful to look at spec tests. The given tests are barely scratching the complexity of ABI. So, for more complex cases, such as nested, dynamically sized arrays, I can just hope that my encoder works, because there is little to test against. |
RLP tests are very useful for developing RLP implementations. Why doesn't this repo have common tests for Contract ABI aside from three basic tests?
The text was updated successfully, but these errors were encountered: