freenet-core icon indicating copy to clipboard operation
freenet-core copied to clipboard

freenet local ; command is absouletly broken

Open gogo2464 opened this issue 1 year ago • 24 comments

I can push the contract with fdev publish but when I want to reach I have:

failed to get contract XXX, reason: Missing contract and/or parameters

I also got:

storing private key file: `identity-manager-key.private.pem`
storing private key file: `identity-manager-key.public.pem`
storing parameters file: `identity-manager-params`
cd /PATH/freenet-core/modules/antiflood-tokens/contracts/token-allocation-record
fdev build
Compiling contract with rust
error: failed to parse lock file at: /PATH/freenet-core/modules/antiflood-tokens/Cargo.lock

Caused by:
  package `freenet-stdlib` is specified twice in the lockfile
Error: exit with status: exit status: 101
make: *** [Makefile:79: build-token-allocation-contract] Error 1

not sure if linked. Might be an issue on my side. I had already published and visited 2 sites I created before I recompiled freenet and got this issue.

gogo2464 avatar Jan 24 '24 14:01 gogo2464

So any contract you push into the network isn't retrievable? And this is a regression of something that worked before?

sanity avatar Jan 24 '24 19:01 sanity

Also, this is the main branch?

sanity avatar Jan 24 '24 19:01 sanity

So any contract you push into the network isn't retrievable? And this is a regression of something that worked before?

yes it used to work. it does not work anymore

gogo2464 avatar Jan 24 '24 19:01 gogo2464

yes I tested on the main branch: the contract are not reached anymore

gogo2464 avatar Jan 24 '24 19:01 gogo2464

I did:

git clone https://github.com/freenet/freenet-core/ && 
cd freenet-core && 
git submodule update --init --recursive && 
export CARGO_TARGET_DIR="$(pwd)/target" &&
cargo install --path crates/core --force &&
cargo install --path crates/fdev --force &&
cd apps/freenet-microblogging &&
make build && make run-node

gogo2464 avatar Jan 24 '24 19:01 gogo2464

And yes NOT any contract is reachable anymore.

gogo2464 avatar Jan 24 '24 19:01 gogo2464

also in order to ensure that you tested right you have to do:

cargo clean
rm -Rf "${CARGO_TARGET_DIR}"
rm -rf ~/.local/share/freenet

gogo2464 avatar Jan 24 '24 20:01 gogo2464

does the microblogging contract and any contract require antiflood token? Might be the root cause.

Caused by: package freenet-stdlib is specified twice in the lockfile

gogo2464 avatar Jan 25 '24 10:01 gogo2464

even my reset to 2c5dfd3be25ebfc67fc6cd41fdd4a6adff5d4235 commit does not bring back the web contract fetching

gogo2464 avatar Jan 25 '24 13:01 gogo2464

Aren't you sure you are not on the wrong stdlib branch?

Do git submodule update

iduartgomez avatar Jan 25 '24 13:01 iduartgomez

I have done git submodule update --init --recursive seems same.

gogo2464 avatar Jan 25 '24 14:01 gogo2464

$ cd stdlib/
$ git log -n 3
commit 7729fe328f360067a8ac21fa5809ac0bf748198f (HEAD)
Author: Ignacio Duart <[email protected]>
Date:   Fri Dec 15 15:36:21 2023 +0100

    New error kind

gogo2464 avatar Jan 25 '24 14:01 gogo2464

@sanity did you successfully view the contract after my commands please?

gogo2464 avatar Jan 25 '24 18:01 gogo2464

@gogo2464: Can you try this in the modules/antiflood-tokens/contracts/token-allocation-record directory:

$ cargo update

That may resolve the problem with the Cargo.lock file.

sanity avatar Jan 26 '24 21:01 sanity

it does not. it requires to delet Cargo.lock

gogo2464 avatar Jan 27 '24 19:01 gogo2464

this commit might be responsible of the issue:

https://github.com/freenet/freenet-core/commit/6ef60489e3bd5916f609e8a2b82fc308faca8dbf

the older work. I am looking for more recent

gogo2464 avatar Jan 27 '24 22:01 gogo2464

I am now absolutely 100% sure that the commit https://github.com/freenet/freenet-core/commit/6ef60489e3bd5916f609e8a2b82fc308faca8dbf is responsible of the breaking change!!

the commit just older than this one is running contrary to it

gogo2464 avatar Jan 27 '24 22:01 gogo2464

@iduartgomez could you be assigned to this issue please?

gogo2464 avatar Jan 27 '24 23:01 gogo2464

@gogo2464 Apparently, the publish never manages to save the contract due to an issue in the perform_contract_put method. By fixing this issue, I have been able to successfully launch the application. image Now I am verifying that there are no more issues I will upload a fix.

netsirius avatar Jan 28 '24 12:01 netsirius

THANKS @netsirius !!!

Could you link your pr please? I would like to use it immediately. :)

gogo2464 avatar Jan 28 '24 20:01 gogo2464

https://github.com/freenet/freenet-core/actions/runs/7688432191/job/20949648629?pr=974#step:4:1994

It seems @netsirius , you have to fix it in order to let me finish the testing. https://github.com/freenet/freenet-core/issues/975

gogo2464 avatar Jan 28 '24 21:01 gogo2464

@gogo2464 The fix has just been merged. Can you confirm that the issue has been resolved to close it?

netsirius avatar Jan 30 '24 12:01 netsirius

@netsirius sure I am going to. I made a PR to easily build on Linux https://github.com/freenet/freenet-core/pull/974 sadly web-sys has also been broken itself as freenet dependency and the chances it does not impact the new freenet is poor.

gogo2464 avatar Jan 30 '24 12:01 gogo2464

seems to work with the microblogging contract for me. let me try personnal apps!

gogo2464 avatar Jan 30 '24 20:01 gogo2464

I did not test on email app. may be ok. let's close the issue

gogo2464 avatar Apr 01 '24 17:04 gogo2464