Open tjayrush opened 5 years ago
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 1.502 ETH (174.99 USD @ $116.5/ETH) attached to it as part of the Great Hill Corporation fund.
Question for you @pbteja1998. The link you referenced to previous work builds a parser for a pre-defined language using bison. Have you looked at the Ethereum RLP definition? Will you be able to describe a language to parse the data? That sounds unnecessarily complicated. What I was hoping for was a minimal string parser that works with the multi-dimensional arrays and the RLP spec. Did you look at that? Your thoughts?
@tjayrush yes, you are right. I don't think that it is necessary to define a grammar for this purpose. A normal string parser would be enough.
And also can you explain the task at hand more clearly. What do you mean by get desired result? In other words, can you give an example of the input that will be given, and the output that is expected.
In the description you mentioned that there will be three lines, are all the three lines are part of the input or the first two lines are the input and the third line is the output expected?
If the second line is the encoded input and the third line is the decoded input that is expected, then what is the function(first line) definition for? Is it just to get the data type of input?
@pbteja1998 The third line is desired output. The first line defines the type of input, which is the second line, exactly as you describe.
Here's a full description of what I'm trying to decode: https://solidity.readthedocs.io/en/develop/abi-spec.html#formal-specification-of-the-encoding (but decoding not encoding).
I have the more simple parts working, but I'm stuck on the multi-dimensional arrays. I shouldn't say we can't use a grammar and use bison, I would just rather not if we don't have to. But if it's easier, then maybe that's the best way to go.
Assuming good response to this, I'll hire you if you think the price is right.
@benakan Can you tell me more about your experience and your thoughts on above discussion?
@tjayrush, I think what you want is a way to decode the encoded input of given type. So I don't think the grammar is necessary or useful for this case. So as you said, a normal string parser will suffice. I can start the work immediately if approved. Also can you post the link to decoding specification. Thanks.
@pbteja1998. You were selected. Let me know if you need anything.
@mestorlx. Thanks for the pointer. I will use that code as a reference.
@pbteja1998. Please complete your work exclusive of that code. I'm looking for an implementation that works for the above data file and this specification: https://solidity.readthedocs.io/en/develop/abi-spec.html#formal-specification-of-the-encoding.
One of the purposes of the code is to stand as a totally separate source of potential test cases. Using existing code defeats that part of the process.
@tjayrush Thanks. I will start the work. Is there a gitter/slack channel that I can join or any other mode of communication to give you the updates directly and clear out any other clarifications in the process?
@pbteja1998 http://quickblocks.slack.com
@tjayrush I think you should give an invitation, for me to be able to join the slack channel. My email id is pbteja1998@gmail.com
Sent
@tjayrush I am a bit occupied for the next 2 weeks. I am going to stop work (from gitcoin) on this right now so that I don't block this issue and some other person can take this up. I will reapply this once I get free(if it were available then). Sorry for the inconvenience.
Wow. Serious downvote.
@tjayrush I am very sorry for wasting your time. Something came up suddenly. I will only stall the project if I would have continued.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 8 hours ago. Please review their action plans below:
1) luiserebii has been approved to start work.
Hello, I'm interested in this bounty! I have experience with both C++ and Solidity, so I am excited to tackle this project. From what I understand, I only need to implement this function: std::string decode(const std::string& function, const std::string& input); ?
I look forward to hearing back from you! Thanks :)
Learn more on the Gitcoin Issue Details page.
@luiserebii Yes. Write a function decode(func,input)
that returns answer
for each of the sets of three lines above, where first line is func
and the second line input
and decode
should return the third line answer
.
If you give me a reasonable explanation of what you plan to do, and you can start right away, I will accept you.
@tjayrush To put it shortly, using the function signature passed, I will parse each parameter, and iterate over them and, by applying the specification logic used for encoding the RLP, to decode them using the Solidity ABI documentation (https://solidity.readthedocs.io/en/develop/abi-spec.htm). I will also be using Ethereum documentation on RLP encoding to write this function.
In other words, for each parameter, I will determine the number of bytes to parse depending on the type and convert them from hexadecimal into their original forms.
Since this is the RLP and not complete ABI encoding, I won't be testing that the first batch of 32 bytes match the function signature.
Please let me know if this is enough detail; if not, let me know and I will try to add more.
Thanks!
I realize I left out one detail: I can start right away! Apologies if this comes off as impatient, it's more of me being anxious that my app submission is complete, haha.
Sorry. I'll accept your proposal now on GitHub (if I can figure out how). Cheers. You can join our slack at quickblocks.slack.com and contact me there with any questions.
No worries, just wanted to make sure! Just wanted to let you know that I've started on it, and will give you updates as time passes. Thanks!
Just wondering how it's going or if you need anything.
Hey @tjayrush, things are going well. Still writing and testing the code. I wasn't sure how to join the slack channel, I may need an invite, if you'd likely me to give updates there. Hope all is well!
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@gitcoinbot Hello, yes, I am continuing to work on this, looking to finish very soon. Thank you!
I extended the reminder bot, so it should bother you for a while.
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@Luiserebii Any news?
@Luiserebii please contact me via email before taking any further actions on this issue including posting to forums. Jrush@greathill.com
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@tjayrush @gitcoinbot Apologies for the delay, continuing to work on this. And sure, I will contact you when I can! I've been working at this, it's just been a little tougher than expected haha
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@gitcoinbot I have submitted a WIP PR, at: https://github.com/tjayrush/simple_parser/pull/2. Will continue to work on this in the meantime, thanks!
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@gitcoinbot Yes, I am still working on this; thank you!
I took a look at your work. You've done a good job. Please finish as well as you can, and I will pay this out. Do you have any further work to do? I accepted your pull request.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 1.502 ETH (212.83 USD @ $141.7/ETH) has been submitted by:
@tjayrush please take a look at the submitted work:
@tjayrush Thank you so much, I am glad that you liked what I've done! I've been working hard on getting this to work for you, most of the test cases are thankfully now passing, except for two. I made a new pull request to clean that piece up.
Unless I'm misunderstanding you, I would be very grateful for the offer to receive payment for the closest I can get to on this project! I have made the submission on Gitcoin in case you feel satisfied with this, but no pressure, since this is technically still incomplete. There is some more work to do for me unfortunately, but I will certainly try to keep at it! I hope all is well.
I'll pay for it now (assuming I can figure out how). I think you did a good job (the comments are very appreciated). If you open to the idea, I'll post another 1 ETH bounty to finish the work. Would that work for you? I'll try to figure out how to offer a bounty to a particular person. Look for payment on the first bounty now, and then (if you agree) I will post a second bounty to finish the work. Let me know.
One comment about the two above test cases: I think I had trouble with these two as well (although my code was not recursive).
Perhaps, before we proceed to try to fix these, we should make sure the 'expected' answers are correct. I tried my best to make sure the 'input' data was correct, but let's double check that first before writing code that correctly parses incorrect test case data.
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@tjayrush Thank you so much! I'd be more than open to doing that, and I am happy the effort I put into the comments were not in vain.
That's a good point, I hadn't considered that. I think I'll see if I can recreate the ABI encoding and check it against those.
@luiserebii Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
⚡️ A tip worth 1.50000 ETH (219.86 USD @ $146.57/ETH) has been granted to @luiserebii for this issue from @tjayrush. ⚡️
Nice work @luiserebii! Your tip has automatically been deposited in the ETH address we have on file.