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

Organization creation should not be supported on non-multiparty namespace #1404

Closed
arinddas opened this issue Sep 21, 2023 · 1 comment
Closed

Comments

@arinddas
Copy link
Contributor

I am trying to use Hyperledger firefly as web3gateway to connect with existing hyperledger besu network. So, I have created non-multiparty namespace using ff init command. In this context creation of organization is not relevant. However, I am able to create organization using /api/v1/network/organizations endpoint.

Request:

curl -X 'POST' \
  'http://127.0.0.1:5000/api/v1/network/organizations?confirm=true' \
  -H 'accept: application/json' \
  -H 'Request-Timeout: 2m0s' \
  -H 'Content-Type: application/json' \
  -d '{
  "description": "test org for non-multiparty system",
  "key": "testorg",
  "name": "testorg",
  "type": "org"
}'

Response:

{
  "name": "testorg",
  "type": "org",
  "key": "testorg",
  "description": "test org for non-multiparty system"
}

One observation is /api/v1/network/organizations/self endpoint is restricting to create new organization, which absolutely makes sense.

Expected behavior: /api/v1/network/organizations should throw similar error like /api/v1/network/organizations/self endpoint for non-multiparty system.

Steps to reproduce:

  1. Setup a dev Besu network (npx quorum-dev-quickstart, default options, no private transactions)
  2. Ensure Besu is started with free gas by checking the QBFT genesis json and adding "zeroBaseFee": true if it is missing
  3. create evmconnect.yml file with the following content
confirmations:
  required: 1 # choose the number of confirmations you require
transactions:
  handler:
    name: simple
    simple:
      fixedGasPrice: 0
      gasOracle:
        mode: fixed
  1. Initialize and start the non-multiparty firefly stack
ff init ethereum newbesu 1 \
    --multiparty=false \
    -n remote-rpc \
    --remote-node-url http://localhost:8545 \
    --chain-id 1337 \
    --connector-config evmconnect.yml
  1. POST a call to http://127.0.0.1:5000/api/v1/network/organizations?confirm=true
@arinddas
Copy link
Contributor Author

I have added a fix and created a pull request #1405

@nguyer nguyer closed this as completed Sep 22, 2023
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

No branches or pull requests

2 participants