h-REA / holo-rea-proto

REA economic network coordination software implemented on top of the Holochain prototype (Go version).
GNU General Public License v3.0
17 stars 1 forks source link

Fix bug in fetching DHT resources that have already been created #15

Closed pospi closed 5 years ago

pospi commented 5 years ago

Still getting this error from the DHT when querying ResourceClassifications:

errorMessage    mod: replaces must be different from original hash
function    update
name    HolochainError
source  {}

Latest updates to the DHT logic have been merged to feature/graphql-binding. Would be good if we could pursue fixes on that branch until things are at a working state, just so it's clearer to me when there are updates I can test and to ensure our efforts continue to be integrated as soon as available.

pospi commented 5 years ago

FYI I was wrong about the TypeError crash, it seems like that is still happening with this query:

query {
  resourceClassification(id:"QmNdRCexNVovzX5LB6R5pizBcbnkadAxLeAsjWU1DhhZay") {
    id
    name
  }
}

If I instead run the following, I get the mod error:

query {
  allResourceClassifications {
    id
    name
  }
}
pospi commented 5 years ago

Found some hcdev debug commands and got some more output for you:

UzPq56y2ybiAptMaurUVL
dht_1_6ec38f7e0369 | HC: holochain.go.681: JS Call: JSON.stringify(readResourceClasses(JSON.parse("[\"QmNdRCexNVovzX5LB6R5pizBcbnkadAxLeAsjWU1DhhZay\",\"QmbKgHmsbNV82YiWTvccgxP3cUzPq56y2ybiAptMaurUVL\",\"QmZD2c7Yi9b3jrbQbyM1YdgNvdaNEg2NniuSxnsYVnYmxV\",\"QmPvFJ15j4svBevgSQd37QVU81GWx23keGpo25cie6Yz9h\"]")));
dht_1_6ec38f7e0369 | HC: action_get.go.48: Starting GET_REQUEST Query for QmNdRCexNVovzX5LB6R5pizBcbnkadAxLeAsjWU1DhhZay with body {QmNdRCexNVovzX5LB6R5pizBcbnkadAxLeAsjWU1DhhZay 0 0}
dht_1_6ec38f7e0369 | HC: holochain.go.892: Sending message (local):GET_REQUEST @ 2019-01-21 01:42:42.629998035 +0000 UTC From:<peer.ID U3VZDk> Body:{QmNdRCexNVovzX5LB6R5pizBcbnkadAxLeAsjWU1DhhZay 0 0} (fingerprint:Qmc52Sw266V4RsVGfRKUMfbRxKxSDyJiRhHmTB22noGwX6)
dht_1_6ec38f7e0369 | HC: holochain.go.894: send result (local): {{{"defaultUnits":"","name":"Currency"}} ResourceClassification [] } (fp:Qmc52Sw266V4RsVGfRKUMfbRxKxSDyJiRhHmTB22noGwX6)error:<nil>
dht_1_6ec38f7e0369 | HC: action.go.317: Sys ValidateAction(*holochain.ActionMod) err:mod: replaces must be different from original hash
sqykly commented 5 years ago

Yep, that is precisely what I thought was happening. This shouldn't take long.

pospi commented 5 years ago

Looking good in latest master.