ci: Add a script to generate changes to ci-config (#2431)

* Add basic lookup for amendments
This commit is contained in:
Jackson Mills
2023-08-18 15:24:48 -07:00
committed by GitHub
parent 5581474627
commit 49447a9beb
5 changed files with 94 additions and 8 deletions

View File

@@ -182,6 +182,33 @@ npm install abbrev -w ripple-keypairs
npm uninstall abbrev -w xrpl
```
## Updating the Docker container for CI
In order to test the library, we need to enable the latest amendments in the docker container.
This requires updating the `/.ci-config/rippled.cfg` file with the hashes and names of new amendments.
In order to update the list, follow these steps from the top level of the library:
1. Run `node ./.ci-config/getNewAmendments.js`
2. If there are any new amendment hashes, add a comment to the end of `/.ci-config/rippled.cfg` with the date
- `Ex. "# Added August 9th, 2023"`
3. For each hash printed out by the script, add the hash and name to the config file.
- Ex. `B2A4DB846F0891BF2C76AB2F2ACC8F5B4EC64437135C6E56F3F859DE5FFD5856 ExpandedSignerList`
- You can look up the name by searching for the hash on https://xrpl.org/known-amendments.html
4. Push your changes
Note: The same updated config can be used to update xrpl-py's CI as well.
## Updating `definitions.json`
This should almost always be done using the [`xrpl-codec-gen`](https://github.com/RichardAH/xrpl-codec-gen) script - if the output needs manual intervention afterwards, consider updating the script instead.
1. Clone / pull the latest changes from [rippled](https://github.com/XRPLF/rippled) - Specifically the `develop` branch is usually the right one.
2. Clone / pull the latest changes from [`xrpl-codec-gen`](https://github.com/RichardAH/xrpl-codec-gen)
3. From the `xrpl-codec-gen` tool, follow the steps in the `README.md` to generate a new `definitions.json` file.
4. Replace the `definitions.json` file in the `ripple-binary-codec` with the newly generated file.
5. Verify that the changes make sense by inspection before submitting, as there may be updates required for the `xrpl-codec-gen` tool depending on the latest amendments we're updating to match.
## Release process + checklist
## PR process