Skip to content

Commit

Permalink
migration
Browse files Browse the repository at this point in the history
  • Loading branch information
dangell7 committed Oct 8, 2024
1 parent c288a5a commit 8a3c1ac
Show file tree
Hide file tree
Showing 444 changed files with 2,281 additions and 2,430 deletions.
125 changes: 53 additions & 72 deletions .ci-config/rippled.cfg → .ci-config/xahaud.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ small

[node_db]
type=NuDB
path=/var/lib/rippled/db/nudb
path=/var/lib/xahaud/db/nudb
advisory_delete=0

# How many ledgers do we want to keep (history)?
Expand All @@ -58,10 +58,10 @@ online_delete=256
256

[database_path]
/var/lib/rippled/db
/var/lib/xahaud/db

[debug_logfile]
/var/log/rippled/debug.log
/var/log/xahaud/debug.log

[sntp_servers]
time.windows.com
Expand All @@ -70,10 +70,10 @@ time.nist.gov
pool.ntp.org

[ips]
r.ripple.com 51235
r.xahau.com 51235

[validators_file]
validators.txt
# [validators_file]
# validators.txt

[rpc_startup]
{ "command": "log_level", "severity": "info" }
Expand All @@ -92,93 +92,74 @@ validators.txt


# In order to enable an amendment which by default would vote "No", you must include its amendment id and name here.
# To add amendments specifically from the latest releases of rippled:
# To add amendments specifically from the latest releases of xahaud:
# 1. Go to https://xrpl.org/known-amendments.html
# 2. Find the first amendment in the latest releases of rippled which are not already in the list below
# 2. Find the first amendment in the latest releases of xahaud which are not already in the list below
# 3. Click on each amendment to get their Amendment ID and name to add to this list manually.
# You will likely update the list with all amendments from a new release of rippled all at once.
# You will likely update the list with all amendments from a new release of xahaud all at once.

# To get the list of amendments on a network (e.g. devnet) follow the steps in xrpl.js's CONTRIBUTING.md for "Updating the Docker container".
# https://github.com/XRPLF/xrpl.js/blob/main/CONTRIBUTING.md
# (Running the script `getNewAmendments.js` should help you identify any new amendments that should be added.)
#
# Note: The version of rippled you use this config with must have an implementation for the amendments you attempt to enable or it will crash.
# If you need the version of rippled to be more up to date, you may need to make a comment on this repo: https://github.com/WietseWind/docker-rippled
# Note: The version of xahaud you use this config with must have an implementation for the amendments you attempt to enable or it will crash.
# If you need the version of xahaud to be more up to date, you may need to make a comment on this repo: https://github.com/WietseWind/docker-xahaud

# network_id is required otherwise it's read as None
[network_id]
63456

[features]
# Devnet amendments as of June 28th, 2023
NegativeUNL
fixRemoveNFTokenAutoTrustLine
NonFungibleTokensV1
BalanceRewards
CheckCashMakesTrustLine
fixRmSmallIncreasedQOffers
fixSTAmountCanonicalize
FlowSortStrands
TicketBatch
fix1201
fixQualityUpperBound
Checks
CryptoConditionsSuite
DepositAuth
DepositPreauth
DisallowIncoming
ExpandedSignerList
Flow
FlowCross
EnforceInvariants
fix1523
FlowSortStrands
HardenedValidations
DepositPreauth
Hooks
HooksUpdate1
ImmediateOfferKilled
Import
MultiSignReserve
fix1623
FeeEscalation
PayChan
fix1513
NegativeUNL
PaychanAndEscrowForTokens
RequireFullyCanonicalSig
fix1543
TickSize
fix1781
fixCheckThreading
TicketBatch
URIToken
XRPFees
XahauGenesis
fix1513
fix1515
CryptoConditions
fix1528
fixPayChanRecipientOwnerDir
SortedDirectories
fix1578
fix1543
fix1571
fix1578
fix1623
fix1781
fixAmendmentMajorityCalc
fixTakerDryOfferRemoval
fixCheckThreading
fixMasterKeyAsRegularKey
Flow
Escrow
TrustSetAuth
DeletableAccounts
DepositAuth
fix1368
fix1512
fix1373
MultiSign
Checks
NonFungibleTokensV1_1
# 1.10.0 Amendments
DisallowIncoming
fixNFTokenDirV1
fixNFTokenNegOffer
fixNFTokenRemint
fixNonFungibleTokensV1_2
fixTrustLinesToSelf
fixPayChanRecipientOwnerDir
fixQualityUpperBound
fixRemoveNFTokenAutoTrustLine
fixRmSmallIncreasedQOffers
fixSTAmountCanonicalize
fixTakerDryOfferRemoval
fixUniversalNumber
ImmediateOfferKilled
XRPFees
# 1.11.0 Amendments
ExpandedSignerList
# 1.12.0 Amendments
AMM
Clawback
fixReducedOffersV1
fixNFTokenRemint
# 2.0.0-b4 Amendments
XChainBridge
DID
# 2.2.0-b3 Amendments
fixNFTokenReserve
fixInnerObjTemplate
fixAMMOverflowOffer
PriceOracle
fixEmptyDID
fixXChainRewardRounding
fixPreviousTxnID
fixXahauV1
Remit
ZeroB2M
fixXahauV2
fixNSDelete
fix240819
fixPageCap
fix240911
8 changes: 4 additions & 4 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Integration test

env:
POETRY_VERSION: 1.4.2
RIPPLED_DOCKER_IMAGE: rippleci/rippled:2.2.0-b3
XAHAUD_DOCKER_IMAGE: transia/xahaud:2024.9.11

on:
push:
branches: [main]
branches: [main, xahau]
pull_request:
workflow_dispatch:

Expand All @@ -32,7 +32,7 @@ jobs:

- name: Run docker in background
run: |
docker run --detach --rm --name rippled-service -p 5005:5005 -p 6006:6006 --volume "${{ github.workspace }}/.ci-config/":"/opt/ripple/etc/" --health-cmd="wget localhost:6006 || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s --env GITHUB_ACTIONS=true --env CI=true ${{ env.RIPPLED_DOCKER_IMAGE }} /opt/ripple/bin/rippled -a --conf /opt/ripple/etc/rippled.cfg
docker run --detach --rm --name xahaud-service -p 5005:5005 -p 6006:6006 --volume "${{ github.workspace }}/.ci-config/":"/opt/xahau/etc/" --health-cmd="wget localhost:6006 || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s --env GITHUB_ACTIONS=true --env CI=true ${{ env.XAHAUD_DOCKER_IMAGE }} /opt/xahau/bin/xahaud -a --conf /opt/xahau/etc/xahaud.cfg
- name: Install poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -60,4 +60,4 @@ jobs:
- name: Stop docker container
if: always()
run: docker stop rippled-service
run: docker stop xahaud-service
51 changes: 0 additions & 51 deletions .github/workflows/snippet_test.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Unit test

on:
push:
branches: [main]
branches: [main, xahau]
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -49,11 +49,11 @@ jobs:

- name: Lint
run: |
poetry run flake8 xrpl tests snippets --darglint-ignore-regex="^_(.*)"
poetry run flake8 xahau tests snippets --darglint-ignore-regex="^_(.*)"
- name: Type-check
run: |
poetry run mypy --strict --implicit-reexport xrpl snippets
poetry run mypy --strict --implicit-reexport xahau snippets
unit-test:
name: Unit test
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ repos:
entry: poetry run mypy
args: ["--strict", "--implicit-reexport"]
language: system
files: xrpl/
files: xahau/
types: [python]
- id: sphinx
name: sphinx
entry: poetry run sphinx-apidoc -o docs/source xrpl
entry: poetry run sphinx-apidoc -o docs/source xahau
language: system
pass_filenames: false
files: __init__
Expand Down
28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To run linting and other checks, `xrpl-py` uses [`pre-commit`](https://pre-commi
To run the linter:

```bash
poetry run flake8 xrpl tests --darglint-ignore-regex="^_(.*)"
poetry run flake8 xahau tests --darglint-ignore-regex="^_(.*)"
```

### Running Tests
Expand All @@ -87,20 +87,20 @@ poetry run poe test_unit

#### Integration Tests

To run integration tests, you'll need a standalone rippled node running with WS port `6006` and JSON RPC port `5005`. You can run a docker container for this:
To run integration tests, you'll need a standalone xahaud node running with WS port `6006` and JSON RPC port `5005`. You can run a docker container for this:

```bash
docker run -p 5005:5005 -p 6006:6006 --interactive -t --volume $PWD/.ci-config:/opt/ripple/etc/ --platform linux/amd64 rippleci/rippled:2.2.0-b3 /opt/ripple/bin/rippled -a --conf /opt/ripple/etc/rippled.cfg
docker run -p 5005:5005 -p 6006:6006 --interactive -t --volume $PWD/.ci-config:/opt/xahau/etc/ --platform linux/amd64 xahauci/xahaud:2024.9.11 /opt/xahau/bin/xahaud -a --conf /opt/xahau/etc/xahaud.cfg
```

Breaking down the command:
* `docker run -p 5005:5005 -p 6006:6006` starts a Docker container with an open port for admin JsonRPC and WebSocket requests.
* `--interactive` allows you to interact with the container.
* `-t` starts a terminal in the container for you to send commands to.
* `--volume $PWD/.ci-config:/config/` identifies the `rippled.cfg` and `validators.txt` to import. It must be an absolute path, so we use `$PWD` instead of `./`.
* `xrpllabsofficial/xrpld:1.12.0` is an image that is regularly updated with the latest `rippled` releases and can be found here: https://github.com/WietseWind/docker-rippled
* `-a` starts `rippled` in standalone mode
* `--start` signals to start `rippled` with the specified amendments in `rippled.cfg` enabled immediately instead of voting for 2 weeks on them.
* `--volume $PWD/.ci-config:/config/` identifies the `xahaud.cfg` and `validators.txt` to import. It must be an absolute path, so we use `$PWD` instead of `./`.
* `xahauci/xahaud:2024.9.11` is an image that is regularly updated with the latest `xahaud` releases and can be found here: https://github.com/WietseWind/docker-xahaud
* `-a` starts `xahaud` in standalone mode
* `--start` signals to start `xahaud` with the specified amendments in `xahaud.cfg` enabled immediately instead of voting for 2 weeks on them.

Then to actually run the tests, run the command:

Expand Down Expand Up @@ -143,7 +143,7 @@ You can see the complete reference documentation at [`xrpl-py` docs](https://xrp
cd docs/

# Build the docs
poetry run sphinx-apidoc -o source/ ../xrpl
poetry run sphinx-apidoc -o source/ ../xahau
poetry run make html
```

Expand Down Expand Up @@ -183,10 +183,10 @@ Examples can be found in subfolders of [tests/integrations](https://github.com/X

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.
1. Clone / pull the latest changes from [xahaud](https://github.com/XRPLF/xahaud) - 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.
4. Replace the `definitions.json` file in the `xahau-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.


Expand Down Expand Up @@ -214,15 +214,15 @@ This should almost always be done using the [`xrpl-codec-gen`](https://github.co
5. Publish the update by running `poetry publish`.
- This will require entering PyPI login info.
6. Create a new Github release/tag off of this branch.
7. Send an email to [xrpl-announce](https://groups.google.com/g/xrpl-announce).
7. Send an email to [xahau-announce](https://groups.google.com/g/xahau-announce).
8. Post an announcement in the [XRPL Discord #python channel](https://discord.com/channels/886050993802985492/886053080913821717) with a link to the changes and highlighting key changes.

## Mailing Lists

We have a low-traffic mailing list for announcements of new `xrpl-py` releases. (About 1 email every couple of weeks)

- [Subscribe to xrpl-announce](https://groups.google.com/g/xrpl-announce)
- [Subscribe to xahau-announce](https://groups.google.com/g/xahau-announce)

If you're using the XRP Ledger in production, you should run a [rippled server](https://github.com/ripple/rippled) and subscribe to the ripple-server mailing list as well.
If you're using the XRP Ledger in production, you should run a [xahaud server](https://github.com/xahau/xahaud) and subscribe to the xahau-server mailing list as well.

- [Subscribe to ripple-server](https://groups.google.com/g/ripple-server)
- [Subscribe to xahau-server](https://groups.google.com/g/xahau-server)
Loading

0 comments on commit 8a3c1ac

Please sign in to comment.