Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with conflicting FFI publishes #1347

Closed
EnriqueL8 opened this issue Jun 19, 2023 · 1 comment · Fixed by #1346
Closed

Issue with conflicting FFI publishes #1347

EnriqueL8 opened this issue Jun 19, 2023 · 1 comment · Fixed by #1346

Comments

@EnriqueL8
Copy link
Contributor

I was investigating the reason for the integration tests failing nightly and trying to fix them. I came across this E2E test https://github.com/hyperledger/firefly/blob/main/test/e2e/multiparty/ethereum_contracts.go#L331 which was constantly failing.

This test published a contract and waits for a series of events to occur. Unfortunately after looking at the logs of the nightly integration tests they timeout waiting for such events to arrive on the WS. I managed to replicate the issue locally by re-running that single test twice and extended the logs in the code to print the problem:

e2e.go:153: Message: &{{42a52273-cd85-4e04-801e-9287cda7a466  definition batch_pin {did:firefly:org/org_6042cf 0x19513597c0e423fc121bd275f2002fc78c7db27f} 2023-06-16T15:03:12.050928343Z default  10c825a38cbf050c85d7a19982b1755e1fe93936cf696be5d7b73c98b934a9ca ff_define_ffi e453008d4515cfb591297a934a7ea834c0ea2caa6fb3a5edf581ae09a6b7b606 <nil>} default 3d0a98c32bb68f5a759eb811713f64513675d7520424361bad7df0538e7f2fa3 08cc3db7-857f-434b-a662-c190605a1848 3e46daa9-6d26-4df1-945d-54b97101e73d rejected 2023-06-16T15:03:14.020196802Z FF10407: Rejected contract interface 'c0e03d4e-76f7-498c-ae75-97b1945a6ab2' - conflicts with existing: 1305816f-660a-40d3-9a8b-59c5ab465c68 [0x140002806c0]   0}

It seems that there is a conflict when we try and publish the FFI.

@awrichar
Copy link
Contributor

awrichar commented Jun 19, 2023

After looking further into the logs, the rejection is due to an incorrect check in the code. The optimistic insert of c0e03d4e-76f7-498c-ae75-97b1945a6ab2 fails, and the code concludes this is because it conflicts with existing record 1305816f-660a-40d3-9a8b-59c5ab465c68.

This is not correct. Actually c0e03d4e-76f7-498c-ae75-97b1945a6ab2 is being published after being a previously-local-only FFI - meaning that the insert fails because of an ID conflict, which should take it down this branch to reconcile the published details with the local record:

return dh.reconcilePublishedFFI(ctx, existing, ffi, isAuthor)

Item 1305816f-660a-40d3-9a8b-59c5ab465c68 is actually not a conflict at all. It has the same name but a different version. Seems to simply be an error in how we are interpreting insert errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants