Coder Social home page Coder Social logo

Comments (15)

digitalillusion avatar digitalillusion commented on May 27, 2024

It seems the problem is related to the action passed as top of chain in the ChainFilter.

 must_get_agent_activity(
            action.author().clone(),
            ChainFilter::new(action.prev_action().clone()),
  )?

Turns out that if there is a previous action on the chain done by the same agent, the code above works. If the action that is validated by must_get_agent_activity is the first action of the agent (as in my tests) the unexpected error occurs.

As seen in this build, the same agent creating an entry on the chain (or reading a collection would have worked too) before calling the create action validated by must_get_agent_activity, allows the test to pass:https://github.com/digitalillusion/test_hc/actions/runs/5067612426/jobs/9098862376#step:5:1059 (As opposed to https://github.com/digitalillusion/test_hc/actions/runs/5045324947/jobs/9049453604#step:5:951, where it failed)

from holochain.

ThetaSinner avatar ThetaSinner commented on May 27, 2024

@maackle do you have any ideas about what is happening here? I can reproduce the issue by running these tests locally and the happ code looks right to me. I can also see some changes have been made to the relevant Holochain code for 0.2 so I'm wondering if this might be something that's already been fixed on 0.2?

from holochain.

maackle avatar maackle commented on May 27, 2024

I'm not quite clear on the issue. Is it just that the error message is different from what is expected? Or is it also that an error is not being thrown when it should be, or is being thrown when it should not? Are there perhaps multiple issues here?

For the first issue, perhaps it's just a matter of making the conductor return the actual reason for validation failure when doing a source chain commit with an invalid entry. But I could use more clarity on any other issue there might be.

I'll also try running locally when I get a chance.

from holochain.

digitalillusion avatar digitalillusion commented on May 27, 2024

I understand that my presentation of the problem may not have been clear enough so I will try to summarize my investigation so far:

must_get_agent_activity ALWAYS fails with InvalidCommit error: [AnyDhtHash(...)] when the agent triggers this validation as his first action on the chain. If the validation is preceded by another action by the same agent (a read or a write which is NOT validated by must_get_agent_activity) then the function behaves correctly.

from holochain.

github-actions avatar github-actions commented on May 27, 2024

This item has been open for 30 days with no activity.

from holochain.

github-actions avatar github-actions commented on May 27, 2024

This item has been open for 30 days with no activity.

from holochain.

github-actions avatar github-actions commented on May 27, 2024

This item has been open for 30 days with no activity.

from holochain.

ThetaSinner avatar ThetaSinner commented on May 27, 2024

@jost-s You've been looking at these must_get_s recently, I wonder if anything jumps out at you on this one? Maybe something that we might have resolved by now, or have an idea what's wrong?

from holochain.

jost-s avatar jost-s commented on May 27, 2024

Perhaps something to do with the scratch space not considered during validation? But that would be the same issue if you created another entry first before creating one with the must_get validation.
Another thought that comes to mind is that the zome initialization is involved. I don't know how, but that's one of the difference between running the validation on the first entry or a subsequent entry.

Feel free to assign this issue to me for investigation.

from holochain.

github-actions avatar github-actions commented on May 27, 2024

This item has been open for 30 days with no activity.

from holochain.

github-actions avatar github-actions commented on May 27, 2024

This item has been open for 30 days with no activity.

from holochain.

github-actions avatar github-actions commented on May 27, 2024

This item has been open for 30 days with no activity.

from holochain.

github-actions avatar github-actions commented on May 27, 2024

This item has been open for 30 days with no activity.

from holochain.

github-actions avatar github-actions commented on May 27, 2024

This item has been inactive for 14 days since being marked as stale.

from holochain.

jost-s avatar jost-s commented on May 27, 2024

I cannot reproduce the error using the latest Holochain 0.3.0 or 0.4.0 release as evidenced with this test ran successfully on a pipeline here https://github.com/holochain/holochain/actions/runs/9054914937/job/24875304538?pr=3841#step:4:3007.

That test immediately starts creating entries that are validated with a must_get_agent_activity call. I tried to run that test against 0.1 but would have to backport several things. Please try your scenario again with a current version of Holochain.

Apologies for taking so long to respond to this issue!

from holochain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.