Question is why the task fails when Bob tries to read his message.
And just for clarity, @guix can you describe the data flow of the secret message in your implementation? That would be really helpful for me. Thank you!
if the array only has one value [“test_dataset”] this test passes
if the array has two values [“test_dataset”, “test_dataset2”] and I try to index the first one for comparison it fails with
AssertionError: expected '\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\ftest_dataset\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e2test_dataset2\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000' to equal 'test_dataset'
+ expected - actual
-
test_dataset2test_dataset2
+test_dataset
at Context.it (test_secret_validation.js:194:44)
at processTicksAndRejections (internal/process/next_tick.js:81:5)
Hi @guix, can you look at your discovery log and see if there is an error after that 2nd request to get Bob’s messages? This is what I’m getting when I run your tests.
Output from discovery test is: revert Wrong epoch for this task
And thediscovery start log has this error: Unable to get keys: Operation not allowed while the EpochState is transitioning. Current state = UNCONFIRMED
I confirm that vector of dynamic types (vec<vec> and vec) isn’t supported by the Engima Protocol at the moment, we are working on this to support it, but the earliest we may have solution is two weeks out. Most of our team working on this front is preparing to attend EthBerlin next week, where we’ll give several talks, workshops and meetups.
The best workaround that I can think of at the moment is to implement a custom workaround by manually concatening to one string/vec. Say by either establishing a known delimiter a priori, and doing a string splitting by that delimiter; or alternatively have a string that stores the lengths with a known delimiter and a concatenated string that stores the actual values.
We will update this thread once we come up with a more formal solution.
Sorry for answering so late, I took a few days off. And thanks for all your answers
@laura Thanks for the gas limit tip, I took care of the price already but that was indeed the problem Bob’s second tx.
@laura@izokay@victor Yup, it’s not working but coming from Solidity I should have suspected problems with string arrays anyways. One of @victor’s workarounds seems to be the way to go for now.
While it compiles and migrates, and worked in a simple independent Rust implementation, in the tests I was always getting null for task.decryptedOutput.
I looked at all ESC examples and could not find any example of a function returning a tuple. I would be interested to know if it’s possible.