Skip to content

bug: race condition between ff_define_ffi messages and ff_define_contract_api messages #1725

@ka1ii

Description

@ka1ii

What happened?

When a new firefly is added to an existing network, a ff_define_ffi message may be processed after the corresponding ff_define_contract_api message, causing the ff_define_contract_api message to be rejected.

What did you expect to happen?

the ff_define_contract_api to be always processed after the ff_define_ffi message.

How can we reproduce it (as minimally and precisely as possible)?

  1. Define an FFI
  2. Create and broadcast contract api which involves publishing it
  3. Add new firefly member, let it listen to all the events and process them

You may need to repeat steps 1-2 multiple times to ensure a higher chance that a message gets processed out of order.

Anything else we need to know?

Publish interface and create api actions do not take custom topic as input so currently no way to get around it.

Firefly Version: 1.3.3

OS version

Details
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions