First, the newsfeed content needs to be prepared.
There are separate JOSN files for different networks. Newsfeeds for different networks are completely independent.
In this example we are delivering the 2.4.1-FC1
version.
The first newsfeed item is promoting the release notes, and it is targeting exactly the new version
("daedalusVersion": "2.4.1-FC1"
). The software update item is targeting also an exact version
in this example, but since we are expecting that everyone has Daedalus capable of automatic updates,
we can go back to targeting all version lover than the one we are releasing ("daedalusVersion": "<2.4.1-FC1"
).
newsfeed/newsfeed_mainnet.json
newsfeed/newsfeed_mainnet_flight.json
newsfeed/newsfeed_testnet.json
Here is an example of the JSON file prepared for the testnet.
"updatedAt": 1604430000000,
"items": [
{
"title": {
"en-US": "Daedalus Flight 2.4.1-FC1 - Release notes",
"ja-JP": "Daedalus Flight 2.4.1-FC1配信開始"
},
"content": {
"en-US": "The Daedalus 2.4.1-FC1 release brings fresh improvements to the delegation user experience, following community feedback. Daedalus now provides a ranking for all stake pools and gives equal ranking to pools with potential rewards estimated at zero, if they are yet to mint a block or have a short history of block production. ",
"ja-JP": "Daedalus 2.4.1-FC1では、コミュニティからのフィードバックを基に、委任機能に関する操作性に新たな改良を加えています。ランキングはすべてのステークプールに適用されるようになりました。これからブロックの生成を行う場合、またはブロック生成の履歴が短い場合に、見込み報酬額がゼロと見積もられるプールには、すべて同じランクが付されます。"
},
"target": {
"daedalusVersion": "2.4.1-FC1",
"platforms":["darwin","win32","linux"]
},
"action": {
"label": {
"en-US": "Release notes",
"ja-JP": "リリースノート"
},
"url": {
"en-US": "https://iohk.zendesk.com/hc/en-us/articles/900004306923",
"ja-JP": "https://iohk.zendesk.com/hc/ja/articles/900004306923"
}
},
"date": 1604430000000,
"type": "announcement"
},
{
"title": {
"en-US": "Daedalus Flight 2.4.1-FC1 available",
"ja-JP": "Daedalus Flight 2.4.0-FC1配信開始"
},
"content": {
"en-US": "The Daedalus 2.4.1-FC1 release brings fresh improvements to the delegation user experience, following community feedback. Daedalus now provides a ranking for all stake pools and gives equal ranking to pools with potential rewards estimated at zero, if they are yet to mint a block or have a short history of block production. \n\nPlease read the [release notes](https://iohk.zendesk.com/hc/en-us/articles/900004306923) for more information.",
"ja-JP": "Daedalus 2.4.1-FC1では、コミュニティからのフィードバックを基に、委任機能に関する操作性に新たな改良を加えています。ランキングはすべてのステークプールに適用されるようになりました。これからブロックの生成を行う場合、またはブロック生成の履歴が短い場合に、見込み報酬額がゼロと見積もられるプールには、すべて同じランクが付されます。\n\n詳細は[リリースノート](https://iohk.zendesk.com/hc/ja/articles/900004306923)をご覧ください。"
},
"target": {
"daedalusVersion": "2.4.0",
"platforms":["darwin","win32","linux"]
},
"action": {
"label": {
"en-US": "",
"ja-JP": ""
},
"url": {
"en-US": "",
"ja-JP": ""
}
},
"date": 1604426400000,
"type": "software-update",
"softwareUpdate": {
"darwin": {
"version": "2.4.1-FC1",
"hash": "525946b33edbffbc563a82aae7642b3d83e9c1e6f23ac5968bfe21ce05b284e2",
"url": "https://updates-cardano-testnet.s3.amazonaws.com/daedalus-2.4.1-FC1-testnet-15023.pkg"
},
"win32": {
"version": "2.4.1-FC1",
"hash": "d2b3daf904f707b46b75b269aa1674ac189626d38e5b9ea47a72710b1a61af1d",
"url": "https://updates-cardano-testnet.s3.amazonaws.com/daedalus-2.4.1-FC1-testnet-15023.exe"
},
"linux": {
"version": "2.4.1-FC1",
"hash": "cb17d34b3a3b5a0f90dc7861bfb33675cf84c9dc2b50aaec5a4e172b548613fb",
"url": "https://updates-cardano-testnet.s3.amazonaws.com/daedalus-2.4.1-FC1-testnet-15023.bin"
}
}
}
]
}
Time stamps can be generated for the most recent hour with the get-time
command in the provided nix-shell
.
These time stamps are formatted in milliseconds since the (unix) epoch.
If nix isn’t available, you can manually create them using the following instructions:
Every newsfeed item needs to have a unique timestamp in the date
field. This serves as an id.
Everytime the newsfeed is updated, the timestamp of the whole newsfeed needs to be updated in the updatedAt
field.
If items don’t have unique timestamps (differing by at least 1 hr!) clicking on one newsfeed item may change the status of another.
The easiest way to generate timestamps is using a JavaScript console in the browser:
new Date(2020, 10, 3, 20).getTime()
Please note that only year, month, day and hour are used. Do not use minutes or seconds. The reason for this is that timestamps with less than 1 hr difference are considered the same. Also, note that month is zero-indexed, so it the example above we are using 10 for November.
It is a good practice to use the timestamp of the most recent newsfeed post as the timestamp for the whole newsfeed.
Software update section needs a version of the new software, URL (check that it is working before posting) and a hash of the installer for every platform.
For specifying daedalusVersion, for example: “daedalusVersion”: “>=2.3.0 <4.0.0-FC1”
If an OR ( | ) condition is to be included, it needs to be explicit |
"daedalusVersion": ">=2.3.0 <4.0.0-FC1 || 4.0.0-RC1"
After the newsfeed content has been finalized, and before it is published, a newsfeed verification needs to be published. This is done in the https://github.com/input-output-hk/daedalus-newsfeed-verification repo.
Generate a SHA256 for the appropriate network:
openssl dgst -sha256 newsfeed/newsfeed_mainnet.json
openssl dgst -sha256 newsfeed/newsfeed_mainnet_flight.json
openssl dgst -sha256 newsfeed/newsfeed_testnet.json
The file should be created in the newsfeed verification repo, in one of the folders associated with each network:
mainnet
, mainnet_flight
or testnet
.
The filename needs to be the timestamp of the newsfeed (updatedAt
) + .txt
.
The contents of the file is the hash, without a newline at the end.
After the file is pushed GitHup Pages deployment can be monitored on the deployments section in the GitHub repo.
After the newsfeed verification is successfully deployed on the GH pages, newsfeed content can be commited and pushed. NOTE: GP pages are deployed ony when the text content is updated in the repo. Pushing just the JOSN file will not work. That’s why it is always needed to modify the CHANGELOG.md file for the deployment to trigger.
After a deployment of the newsfeed content is done, the updated content should be available to Daedalus. Since Daedalus is polling the newsfeed every 30 minutes, please restart Daedalus or use refresh (CMD/CTRL +R) to get the new content.