Holochain Forum

Expensive validation process leads to data not being published on the DHT

Hey Guys, I’m working on a project where I need to do some validation before removing a link from the DHT, so if I do a validation process the validation passes but the data is just published on the agent local chain and not published on the DHT, now, If I remove the validation it gets published on the DHT without any problem.
Ive also seen this behavior when committing entries.

This is my case:

This is a validation link:

            link_type: "multisig->members",
            validation_package:|| {
            validation: | validation_data: hdk::LinkValidationData | {
                match validation_data {
                   LinkValidationData::LinkRemove { link, .. } => {
                        let multisig_address = link.link.base();
                        let multisig = get_multisig(multisig_address.clone())?;
                        let links = hdk::get_links_count(
                        if multisig.required > (links.count as u64 - 1) {
                            return Err(String::from("Requirement exceeds number of members"));

                   _ => Ok(())

As you can see, I’m fetching some data to validate the removing of the link, but the problem is that when it gets called, it only removes the link from the agent source chain and it doesn’t remove the link from DHT.
And if I remove the validation, the link gets removed from DHT without any problem.
Is there a solution to this, or something I’m doing wrong?

Thank you

Hey, I don’t know enough to really help you with the issue, but I have a feeling that it might be just a data propagation issue. Meaning that your data would still be propagated to entire DHT, but it will now happen after some X time period because expensive validation would take a lot of time.
What is the highest X that you checked?