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

Add a test for log #11

Open
lrettig opened this issue Mar 11, 2018 · 8 comments
Open

Add a test for log #11

lrettig opened this issue Mar 11, 2018 · 8 comments
Assignees

Comments

@lrettig
Copy link
Member

lrettig commented Mar 11, 2018

Cf. ethereum#394: this is not currently possible with testeth but we should add something to test the log EEI method.

@axic axic mentioned this issue Mar 11, 2018
44 tasks
@axic axic added the ready label Mar 14, 2018
@lrettig lrettig removed the ready label Mar 15, 2018
@axic
Copy link
Member

axic commented Nov 13, 2018

Don't we have any tests for this? It seems that those lines are covered in Hera?

@axic
Copy link
Member

axic commented Nov 14, 2018

@hugo-dc @lrettig ping

@lrettig
Copy link
Member Author

lrettig commented Nov 14, 2018

We have tests for erroneous usage of log, but AFAIK no test for correct usage. This may be okay.

logTooManyTopicsFiller.yml
logTopicVeryLongFiller.yml
logTopicsOverflowFiller.yml
logVeryLongFiller.yml
logZeroLengthMemoryFiller.yml

@axic
Copy link
Member

axic commented Dec 3, 2018

@hugo-dc @lrettig can we add tests for proper usage of log? Even if we cannot test the content is proper, at least the gas usage should be tested.

@lrettig
Copy link
Member Author

lrettig commented Dec 5, 2018

Yup will take a look asap!

@axic
Copy link
Member

axic commented May 10, 2019

Currently added tests (via #114):

  • log1Topic: "Test log with 1 topic (other topics have invalid memory offsets)"
  • logInvalidNumTopics: "test log with log with 5 topics (expect OOG)"
  • logInvalidPtr: "test log with log with invalid topic pointer"
  • logOOM: "test log with log data size too high (expect OOG)"
  • logTopics: "Test log with multiple (3) topics"
  • logZeroTopics: "Test log with zero topics" -- need to be fixed to actually contain 0 topics

Two more cases we could add:

  • logNoData where the data length is 0 this exists as logZeroLengthMemory
  • logNoDataHighOffset where the data length is 0, but the data offset is OOM - not sure what will happen, hence we need a test

@axic
Copy link
Member

axic commented May 10, 2019

@jwasinger @hugo-dc can you add that single last tests, logNoDataHighOffset? It should have 0xffffffff for data offset, but 0 as data length.

I expect it to be successful, but if it fails we may need to adjust Hera.

@jwasinger
Copy link

Sure.

@lrettig lrettig assigned jwasinger and unassigned lrettig May 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants