Skip to content

Commit f41af92

Browse files
authored
Merge pull request #1461 from SamMayWork/1.3-docs
docs: Prepare documentation for FireFly v1.3.0
2 parents 1d100b5 + 7da3ddd commit f41af92

File tree

14 files changed

+167
-44
lines changed

14 files changed

+167
-44
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Update doc site for latest release
5151
if: ${{ github.event_name == 'release' && env.IS_LATEST_RELEASE == 'true' }}
5252
working-directory: doc-site
53-
run: mike deploy ${{ github.event.release.tag_name }} latest --push
53+
run: mike deploy ${{ github.event.release.tag_name }} latest -u --push
5454

5555
- name: Update doc site for `main` branch
5656
if: ${{ github.event_name == 'push' }}

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.2

doc-site/docs/contributors/docs_setup.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,10 @@ The commands you will usually use with `mkdocs` are:
8282
- `mkdocs build` - Build the documentation site.
8383
- `mkdocs -h` - Print help message and exit.
8484

85-
## Adding Content
85+
## Directory layout
8686

87-
The basic process for adding content to the site is:
88-
89-
- Create a new markdown file under the `docs` folder
90-
- Add the new file to the table of contents (`nav` section in the `mkdocs.yml` file)
91-
92-
If you are using this as a template for creating your own documentation, please see [the instructions for customization](./docs/index.md).
93-
94-
## Repository layout
95-
96-
mkdocs.yml # The configuration file.
87+
mkdocs.yml # The configuration file.
9788
docs/
98-
index.md # The documentation homepage.
99-
... # Other markdown pages, images and other files.
89+
index.md # The documentation homepage.
90+
SUMMARY.md # The main left nav
91+
... # Other markdown pages, images and other files.

doc-site/docs/gettingstarted/sandbox.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The Messages tab is where we can send broadcast and private messages to other me
8989

9090
## Tokens
9191

92-
The Tokens tab is where you can create token pools, and mint, burn, or transfer tokens. This works with both fungible and non-fungible tokens (NFTs). For more details, please see the [Tokens tutorials](../tutorials/tokens).
92+
The Tokens tab is where you can create token pools, and mint, burn, or transfer tokens. This works with both fungible and non-fungible tokens (NFTs). For more details, please see the [Tokens tutorials](../tutorials/tokens/index.md).
9393

9494
### Things to try out
9595

doc-site/docs/index.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,3 @@ Hyperledger FireFly is an [open source Supernode](./overview/supernode_concept.m
77
The easiest way to understand a FireFly Supernode is to think of it like a toolbox. Connect your existing apps and/or back office systems to the toolbox and within it there are two different sets of tools. One set of tools helps you connect to the Web3 world that already exists, and the other set allows you to build new decentralized applications quickly with security and scalability.
88

99
Head to the [Understanding FireFly](./overview/supernode_concept.md) section for more details.
10-
11-
## Documentation Sections
12-
13-
- [Understanding FireFly](./overview/)
14-
- [Getting Started](./gettingstarted/)
15-
- [Tutorials](./tutorials/)
16-
- [Reference](./reference/)
17-
- [Architecture](./architecture/)
18-
- [Contributors](./contributors/)
19-
- [API Spec](./swagger/)
20-
- [FAQs](./faqs/)
21-
- [Release notes](./release_notes/)

doc-site/docs/overview/key_components/apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ FireFly provides APIs that:
3030
- Conform as closely as possible to the principles of REST
3131
- Do not pretend to be RESTful in cases when it is impossible to be
3232

33-
> Learn more about **deploying APIs for custom smart contracts** in [this tutorial](../../tutorials/custom_contracts/)
33+
> Learn more about **deploying APIs for custom smart contracts** in [this tutorial](../../tutorials/custom_contracts/index.md)
3434
3535
### Event Streams
3636

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: v1.3.0 Migration Guide
3+
---
4+
5+
## Overview
6+
7+
Hyperledger FireFly v1.3.0 is a feature release that includes changes around event streaming, contract listeners, define/publish APIs as well as a range of general fixes.
8+
9+
For the most part, upgrading from v1.2.x to v1.3.0 should be a seamless experience, but there are several important things to note about changes between the two versions, which are described in detail on this page.
10+
11+
## Docker image file permission considerations
12+
13+
Following security best practices, the official published Docker images for FireFly Core and all of its microservices now run as a non-root user by default. If you are running a FireFly release prior to v1.3.0, depending on how you were running your containers, you may need to adjust file permissions inside volumes that these containers write to. If you have overridden the default user for your containers (for example though a Kubernetes deployment) you may safely ignore this section.
14+
15+
> ⚠️ **Warning**: If you have been using the default root user and upgrade to FireFly v1.3.0 without changing these file permissions your services may fail to start.
16+
17+
The new default user is `1001`. If you are not overriding the user for your container, this user or group needs to have write permissions in several places. The list of services and directories you should specifically check are:
18+
19+
- **firefly-evmconnect**
20+
- `persistence.leveldb.path` directory set in the config file
21+
- **firefly-ethconnect**
22+
- `rest.rest-gateway.openapi.storagePath` directory in the config file
23+
- `rest.rest-gateway.openapi.eventsDB` directory in the config file
24+
- **firefly-fabconnect**
25+
- `receipts.leveldb.path` directory in the config file
26+
- `events.leveldb.path` directory in the config file
27+
- **firefly-dataexchange-https**
28+
- Data directory set by the `DATA_DIRECTORY` environment variable (default `/data`)
29+
30+
## API definition/publication considerations
31+
32+
**As of FireFly v1.3.0 in multi-party namespaces, by default, contract interfaces, contracts APIs, and token pools have distinct steps in their creation flow and by default they are unpublished.**
33+
34+
These following described changes impact contract interfaces, contract APIs, and token pools.
35+
36+
Previously, when creating one of the affected resources in a multi-party network, if successful, the resource would be automatically broadcasted to other namespaces. In FireFly v1.3.0, this behaviour has changed, now when one of the resources is created there are 2 distinct states for the resource, _published_ and _unpublished_. The default state for a resource (provided FireFly is not told otherwise) after creation is _unpublished_.
37+
38+
When a resource is _unpublished_ it is not broadcasted to other namespaces in the multi-party network, and it is not pinned to the blockchain. In this state, it is possible to call the `DELETE` APIs to remove the resource (such as in the case where configuration needs to be changed) and reclaim the name that has been provided to it, so that it can be recreated.
39+
40+
When a resource is _published_ it is broadcasted to other namespaces in the multi-party network, and it is pinned to the blockchain. In this state, it is no longer possible to call the `DELETE` APIs to remove the resource.
41+
42+
In FireFly v1.2.0 to create one of the affected resources and publish it to other parties, a `POST` call would be made to its respective API route and the broadcast would happen immediately. To achieve the same behaviour in FireFly v1.3.0, there are 2 options for all impacted resources, either providing a query parameter at creation to signal immediate publish, or a subsequent API call to publish the resources.
43+
44+
### Contract interfaces
45+
46+
Previously, to create a contract interface a `POST` call would be made to `/contracts/interfaces` and the interface would be broadcasted to all other namepsaces. In FireFly v1.3.0, this same call can be made with the `publish=true` query parameter, or a subsequent API call can be made on an unpublished interface on `POST /contracts/interfaces/{name}/{version}/publish` specifying the name and version of the interface.
47+
48+
[For an exact view of the changes to contract interfaces, see PR #1279.](https://github.com/hyperledger/firefly/pull/1279)
49+
50+
### Contract APIs
51+
52+
Previously, to create a contract API a `POST` call would be made to `/apis` and the API would be broadcasted to all other namepsaces. In FireFly v1.3.0, this same call can be made with the `publish=true` query parameter, or a subsequent API call can be made on an unpublished API on `/apis/{apiName}/publish` specifying the name of the API.
53+
54+
[For an exact view of the changes to contract APIs, see PR #1322.](https://github.com/hyperledger/firefly/pull/1322)
55+
56+
### Token pools
57+
58+
Previously, to create a token pool a `POST` call would be made to `/tokens/pools` and the token pool would be broadcasted to all other namepsaces. In FireFly v1.3.0, this same call can be made with the `publish=true` query parameter, or a subsequent API call can be made on an unpublished token pool on `/tokens/pools/{nameOrId}/publish` specifying the name or ID of the token pool.
59+
60+
[For an exact view of the changes to token pools, see PR #1261.](https://github.com/hyperledger/firefly/pull/1261)
61+
62+
## Event stream considerations
63+
64+
### Single event stream per namespace
65+
66+
In this release, the model for event streams in a multi-party network has fundamentally changed. Previously, there was a single event stream for each blockchain plugin, even if this plugin served multiple namespaces. In FireFly v1.3.0 there is now a single event stream per namespace in the network.
67+
68+
When migrating from FireFly v1.2.X to v1.3.0, due to these changes, existing event streams will be rebuilt. This means that connectors will replay past events to FireFly, but FireFly will automatically de-duplicate them by design so this is a safe operation.
69+
70+
The migration to individual event streams promotes high-availability capability but is not itself a breaking change, however the ID format for event streams has changed. Event streams now follow the format `<plugin_topic_name>/<namespace_name>`. For example, an event stream for the default namespace with a plugin topic of 0 would now be: `0/default`.
71+
72+
Summarily, these changes _should not_ impact end-users of FireFly, but they're noted here as they are significant architectural changes to the relationships between namespaces, plugins, and connectors.
73+
74+
[For an exact view of the changes, see PR #1388.](https://github.com/hyperledger/firefly/pull/1388)
75+
76+
## Configuration considerations
77+
78+
### Deprecated configuration
79+
80+
In FireFly v1.3.0 deprecated configuration options for the `blockchain`, `database`, `dataexchange`, `sharedstorage` and `tokens` plugins have been removed, and can no longer be provided.
81+
82+
[For an exact view of the changes, see PR #1289](https://github.com/hyperledger/firefly/pull/1289).
83+
84+
## Token pool considerations
85+
86+
### Activity indicator changes
87+
88+
Token pools have a status, when creating a token pool previously, it would go into a pending state immediately following creation, and then into a confirmed state when it has been confirmed on the chain. This behaviour is still consistent in FireFly v1.3.0, but the representation of the data has changed.
89+
90+
Previously, token pools had a `state` field with an enumerated value which was either `pending`, or `confirmed`, this has been replaced with an `active` boolean field, where `true` indicates the token pool has been committed onto chain, and `false` indicated the transaction has not yet been confirmed.
91+
92+
[For an exact view of the changes, see PR #1305](https://github.com/hyperledger/firefly/pull/1305).
93+
94+
## FabConnect event considerations
95+
96+
### FabConnect Protocol ID format changes
97+
98+
Prior to FireFly v1.3.0, when the FabConnect client indexed events submitted by the Fabric SDK, FireFly would deduplicate events into a single event because the protocol ID of the events compiled into a single block would evaluate to be the same. In this release, we have changed the format of the calculated protocol ID so that is unique across events even if they are located within the same block. Crucially, **the new format includes the transaction hash, so events are no longer alphanumerically sortable.**
99+
100+
[For an exact view of the changes, see PR #1345](https://github.com/hyperledger/firefly/pull/1345).
101+
102+
## Local development considerations
103+
104+
### Go version upgrade
105+
106+
FireFly v1.3.0 now uses Go 1.21 across all modules.

doc-site/docs/releasenotes/index.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,25 @@ title: Release Notes
44

55
[Full release notes](https://github.com/hyperledger/firefly/releases)
66

7+
## [v1.3.0 - April 25, 2024](https://github.com/hyperledger/firefly/releases/tag/v1.1.0)
8+
9+
[Migration guide](1.3_migration_guide.md)
10+
11+
What's New:
12+
13+
- Enhancements to FireFly Messaging capabilities, allowing off-chain data to be linked to on-chain transactions from custom smart contracts
14+
- Sample contract implementation for custom pin contracts
15+
- Contract interfaces, contract APIs, and token pools can now be separately defined and published
16+
- Support for batching events when delivering over websockets
17+
- Lots of bug fixes and miscellaneous enhancements
18+
719
## [v1.2.0 - February 6, 2023](https://github.com/hyperledger/firefly/releases/tag/v1.2.0)
820

921
[Migration guide](1.2_migration_guide.md)
1022

1123
What's New:
1224

13-
- Enhanced support for token contracts generated by the OpenZepplin Wizard
25+
- Enhanced support for token contracts generated by the OpenZeppelin Wizard
1426
- Custom smart contract error types are now returned on the API
1527
- Data objects and associated blobs can now be deleted
1628
- Optional dynamic reload of core configuration file

doc-site/docs/tutorials/chains/tezos_testnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ On the **Transfers** tab from you account page you will see the actual transfer
8888

8989
## Use the public testnet
9090

91-
Now that you have everything set up, you can follow one of the other FireFly guides such as [Custom Smart Contracts](../custom_contracts/tezos.md). For detailed instructions on deploying a custom smart contract to Tezos, please see the [Tezos docs](https://docs.tezos.com/smart-contracts/deploying) for instructions using various tools.
91+
Now that you have everything set up, you can follow one of the other FireFly guides such as [Custom Smart Contracts](../custom_contracts/index.md). For detailed instructions on deploying a custom smart contract to Tezos, please see the [Tezos docs](https://docs.tezos.com/smart-contracts/deploying) for instructions using various tools.

doc-site/docs/tutorials/custom_contracts/ethereum.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ We will take the output from the previous HTTP response above, **fill in the nam
342342

343343
### Request
344344

345-
`POST` `http://localhost:5000/api/v1/namespaces/default/contracts/interfaces`
345+
`POST` `http://localhost:5000/api/v1/namespaces/default/contracts/interfaces?publish=true`
346+
347+
> *NOTE*: Without passing the query parameter `publish=true` when the interface is created, it will initially be unpublished and not broadcasted to other members of the network (if configured in multi-party). To publish the interface, a subsequent API call would need to be made to `/contracts/interfaces/{name}/{version}/publish`
346348
347349
```json
348350
{
@@ -506,7 +508,8 @@ We will take the output from the previous HTTP response above, **fill in the nam
506508
}
507509
]
508510
}
509-
]
511+
],
512+
"published": true
510513
}
511514
```
512515

@@ -520,7 +523,9 @@ We need to copy the `id` field we got in the response from the previous step to
520523
521524
### Request
522525

523-
`POST` `http://localhost:5000/api/v1/namespaces/default/apis`
526+
`POST` `http://localhost:5000/api/v1/namespaces/default/apis?publish=true`
527+
528+
> *NOTE*: Without passing the query parameter `publish=true` when the API is created, it will initially be unpublished and not broadcasted to other members of the network (if configured in multi-party). To publish the API, a subsequent API call would need to be made to `/apis/{apiName}/publish`
524529
525530
```json
526531
{
@@ -551,7 +556,8 @@ We need to copy the `id` field we got in the response from the previous step to
551556
"urls": {
552557
"openapi": "http://127.0.0.1:5000/api/v1/namespaces/default/apis/simple-storage/api/swagger.json",
553558
"ui": "http://127.0.0.1:5000/api/v1/namespaces/default/apis/simple-storage/api"
554-
}
559+
},
560+
"published": true
555561
}
556562
```
557563

0 commit comments

Comments
 (0)