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

Validate grpc port info in GRPCServer ctor #4560

Closed
wants to merge 95 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
8e122c5
Fix #4015, #4557: Do not validate GRPC IP/Port/Protocol information i…
ckeshava Jun 7, 2023
8e4c068
Introduce a constant for port_grpc configuration section
ckeshava Jun 9, 2023
1c4a100
Replace all usages of "port_grpc" raw string with a constant
ckeshava Jun 9, 2023
64145d5
Created macros for "port_ws", "port_rpc" and "port_peer" for unit tes…
ckeshava Jun 12, 2023
2614b49
rename PORT_GRPC macro into SECTION_PORT_GRPC to adhere to the convec…
ckeshava Aug 25, 2023
6cbebf4
fix #4569: clang warning about deprecated sprintf usage.
ckeshava Jun 12, 2023
8a86400
Trivial: add comments for NFToken-related invariants (#4558)
scottschurr Jun 9, 2023
bb04666
fix node size estimation (#4536)
dangell7 Jun 9, 2023
e7a4883
fix: remove redundant moves (#4565)
ckeshava Jun 10, 2023
2e9c6ef
Set version to 1.11.0-rc3
intelliot Jun 9, 2023
d9df6cc
Set version to 1.11.0
intelliot Jun 20, 2023
5e27424
Enable the Beta RPC API (v2) for all unit tests: (#4573)
ximinez Jun 21, 2023
c15be03
`fixReducedOffersV1`: prevent offers from blocking order books: (#4512)
scottschurr Jun 23, 2023
a185d98
Add RPC/WS ports to server_info (#4427)
drlongle Jun 23, 2023
2e7d70d
ci: use Artifactory remote in nix workflow (#4556)
thejohnfreeman Jun 23, 2023
2225284
refactor: remove TypedField's move constructor (#4567)
HowardHinnant Jun 26, 2023
7623912
XLS-39 Clawback: (#4553)
shawnxie999 Jun 26, 2023
a5a866c
Set version to 1.12.0-b1
intelliot Jun 26, 2023
1e30936
refactor: replace hand-rolled lexicalCast (#4473)
dangell7 Jun 27, 2023
7257583
Fix package definition for Conan (#4485)
thejohnfreeman Jun 27, 2023
301e27c
fix: remove deprecated fields in `ledger` method (#4244)
ckeshava Jun 28, 2023
428c0e2
refactor: rename ServerHandlerImp to ServerHandler (#4516)
scottschurr Jun 28, 2023
384b5ab
Fix build references to deleted ServerHandlerImp: (#4592)
ximinez Jun 28, 2023
179ab0a
APIv2: add error messages for account_tx (#4571)
PeterChen13579 Jun 29, 2023
e14d9c6
fix: Update Handler::Condition enum values #3417 (#4239)
ckeshava Jun 29, 2023
c18ed1c
ci: cancel overridden workflows (#4597)
thejohnfreeman Jun 29, 2023
035930a
fix: deb package build (#4591)
legleux Jun 30, 2023
e04d6f1
APIv2(account_info): handle invalid "signer_lists" value (#4585)
PeterChen13579 Jun 30, 2023
f6ca3f4
chore: update checkout action version to v3: (#4598)
ximinez Jul 1, 2023
f189ffe
add clang-format pre-commit hook (#4599)
mvadari Jul 1, 2023
da1175f
build: add binary hardening compile and link flags (#4603)
thejohnfreeman Jul 3, 2023
2ce1116
fix: add allowClawback flag for `account_info` (#4590)
shawnxie999 Jul 5, 2023
c013763
refactor: change the return type of mulDiv to std::optional (#4243)
ckeshava Jul 6, 2023
0fa1b97
APIv2(ledger_entry): return "invalidParams" when fields missing (#4552)
arihantkothari Jul 6, 2023
3e1cd0d
docs(CONTRIBUTING): push beta releases to `release` (#4589)
intelliot Jul 7, 2023
74181af
Adapt to change in Conan recipe for NuDB (#4615)
thejohnfreeman Jul 11, 2023
ecd1ed0
Introduce AMM support (XLS-30d): (#4294)
gregtatcam Jul 12, 2023
327c0c9
Update dependencies (#4595)
thejohnfreeman Jul 13, 2023
56c7fd7
Rename `allowClawback` flag to `allowTrustLineClawback` (#4617)
shawnxie999 Jul 14, 2023
0b4e8fd
BUILD: list steps after dependencies update (#4623)
intelliot Jul 18, 2023
01ff938
Set version to 1.12.0-b2
intelliot Jul 18, 2023
393c9ee
docs: add API Changelog (#4612)
intelliot Jul 19, 2023
45deab1
feat: support Concise Transaction Identifier (CTID) (XLS-37) (#4418)
RichardAH Aug 18, 2023
2b870b2
fix(AMM): prevent orphaned objects, inconsistent ledger state: (#4626)
gregtatcam Jul 17, 2023
c691c3c
refactor: use C++20 function std::popcount (#4389)
a-noni-mousse Jul 2, 2023
2945681
refactor: improve checking of path lengths (#4519)
a-noni-mousse May 7, 2023
49d0fa0
Fix the package recipe for consumers of libxrpl (#4631)
thejohnfreeman Jul 18, 2023
7abb77b
add view updates for account SLEs (#4629)
mvadari Jul 18, 2023
e5200cf
test: add forAllApiVersions helper function (#4611)
arihantkothari Jul 9, 2023
76c2af3
Update Ubuntu build image (#4650)
legleux Aug 12, 2023
b6569a7
refactor: fix typo in FeeUnits.h (#4644)
eltociear Aug 9, 2023
abfaf9a
Asynchronously write batches to NuDB (#4503)
mtrippled Aug 19, 2023
0a4e671
Apply transaction batches in periodic intervals (#4504)
mtrippled Aug 19, 2023
4b65b99
Several changes to improve Consensus stability: (#4505)
mtrippled Aug 19, 2023
5268721
Set version to 1.12-b3
manojsdoshi Aug 18, 2023
a386722
Set version to 1.12.0-rc1
manojsdoshi Aug 21, 2023
a324699
minor: clang-format
ckeshava Sep 1, 2023
76b2b86
Revert "Several changes to improve Consensus stability: (#4505)"
intelliot Aug 29, 2023
0a0e2fc
Revert "Apply transaction batches in periodic intervals (#4504)"
intelliot Aug 30, 2023
d2a8b6e
Revert "Asynchronously write batches to NuDB (#4503)"
intelliot Aug 30, 2023
5713dcf
Set version to 1.12.0-rc3
intelliot Aug 30, 2023
3fa056c
AMMBid: use tecINTERNAL for 'impossible' errors (#4674)
mDuo13 Sep 1, 2023
7a9eb4c
amm_info: fetch by amm account id; add AMM object entry (#4682)
gregtatcam Sep 1, 2023
71bdc72
Set version to 1.12.0-rc4
intelliot Sep 1, 2023
cf103d4
Set version to 1.12.0
manojsdoshi Sep 6, 2023
8f6e7e0
Introduce replacement for getting and setting thread name: (#4312)
HowardHinnant Sep 7, 2023
fc5e499
clang format
ckeshava Sep 7, 2023
42e0ab2
docs(rippled-example.cfg): clarify ssl_cert vs ssl_chain (#4667)
ggprod Sep 7, 2023
c0bbabb
APIv2(ledger_entry): return invalidParams for bad parameters (#4630)
PeterChen13579 Sep 8, 2023
19eb419
refactor: simplify `TxFormats` common fields logic (#4637)
mvadari Sep 8, 2023
a9b83b6
docs: update SECURITY.md (#4338)
intelliot Sep 8, 2023
51a6306
Remove CurrentThreadName.h from RippledCore.cmake (#4697)
HowardHinnant Sep 11, 2023
ea20080
Asynchronously write batches to NuDB. (#4503)
mtrippled Sep 11, 2023
1be5ef2
Apply transaction batches in periodic intervals (#4504)
mtrippled Sep 11, 2023
8a400c0
Several changes to improve Consensus stability: (#4505)
mtrippled Sep 11, 2023
23d0991
APIv2(account_tx, noripple_check): return error on invalid input (#4620)
PeterChen13579 Sep 13, 2023
af1ea4d
`XChainBridge`: Introduce sidechain support (XLS-38): (#4292)
seelabs Sep 14, 2023
5edadfc
Revert ThreadName due to problems on Windows (#4702)
HowardHinnant Sep 14, 2023
661e655
Match unit tests on start of test name (#4634)
ximinez Sep 14, 2023
9da0463
clang format -- from patch file and comparison with upstream/develop
ckeshava Sep 15, 2023
659fbed
Fix Windows build by removing two unused declarations (#4708)
seelabs Sep 15, 2023
3ade944
clang-format for JSONRPC_test
ckeshava Sep 22, 2023
ddcd062
Change `XChainBridge` amendment to `Supported::yes` (#4709)
seelabs Sep 15, 2023
7582205
Revert CMake changes (#4707)
legleux Sep 15, 2023
e5f6221
Set version to 2.0.0-b1
intelliot Sep 14, 2023
016b0a3
docs(BUILD): make it easier to find environment.md (#4507)
intelliot Sep 16, 2023
cac96b1
fix: remove unused variable causing clang 14 build errors (#4672)
ximinez Sep 18, 2023
4e75aab
docs: fix comment for LedgerHistory::fixIndex return value (#4574)
ckeshava Sep 18, 2023
de9540c
Update secp256k1 to 0.3.2 (#4653)
thejohnfreeman Sep 18, 2023
279d696
docs(RELEASENOTES): update 1.12.0 notes to match dev blog (#4691)
intelliot Sep 19, 2023
ba03e5d
docs(API-CHANGELOG): api_version 2 is expected with 2.0 (#4633)
intelliot Sep 19, 2023
02a53e5
docs(overlay): add URL of blog post and clarify wording (#4635)
ckeshava Sep 19, 2023
c7d0ee4
build: use Boost 1.82 and link Boost.Json (#4632)
thejohnfreeman Sep 21, 2023
05ac9c9
APIv2(gateway_balances, channel_authorize): update errors (#4618)
PeterChen13579 Sep 21, 2023
ae0c816
Fix typo in BUILD.md (#4718)
ForwardSlashBack Sep 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .github/actions/dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ inputs:
runs:
using: composite
steps:
- name: unlock Conan
shell: bash
run: conan remove --locks
- name: export custom recipes
shell: bash
run: |
conan export external/snappy snappy/1.1.9@
conan export external/snappy snappy/1.1.10@
conan export external/soci soci/4.0.3@
- name: install dependencies
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
env:
CLANG_VERSION: 10
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install clang-format
run: |
codename=$( lsb_release --codename --short )
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
job:
Expand All @@ -18,7 +21,7 @@ jobs:
echo ${PATH} | tr ':' '\n'
cmake --version
doxygen --version
env
env | sort
- name: build
run: |
mkdir build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/levelization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
env:
CLANG_VERSION: 10
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Check levelization
run: Builds/levelization/levelization.sh
- name: Check for differences
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: macos
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

Expand Down Expand Up @@ -29,7 +32,11 @@ jobs:
python --version
conan --version
cmake --version
env
env | sort
- name: configure Conan
run : |
conan profile get env.CXXFLAGS default || true
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
- name: build
uses: ./.github/actions/build
with:
Expand Down
60 changes: 53 additions & 7 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
name: nix
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# This workflow has two job matrixes.
# They can be considered phases because the second matrix ("test")
# depends on the first ("dependencies").
#
# The first phase has a job in the matrix for each combination of
# variables that affects dependency ABI:
# platform, compiler, and configuration.
# It creates a GitHub artifact holding the Conan profile,
# and builds and caches binaries for all the dependencies.
# If an Artifactory remote is configured, they are cached there.
# If not, they are added to the GitHub artifact.
# GitHub's "cache" action has a size limit (10 GB) that is too small
# to hold the binaries if they are built locally.
# We must use the "{upload,download}-artifact" actions instead.
#
# The second phase has a job in the matrix for each test configuration.
# It installs dependency binaries from the cache, whichever was used,
# and builds and tests rippled.

jobs:

Expand Down Expand Up @@ -31,13 +53,17 @@ jobs:
env:
build_dir: .build
steps:
- name: checkout
uses: actions/checkout@v3
- name: check environment
run: |
echo ${PATH} | tr ':' '\n'
conan --version
cmake --version
env
env | sort
- name: configure Conan
env:
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
run: |
conan profile new default --detect
conan profile update settings.compiler.cppstd=20 default
Expand All @@ -47,19 +73,39 @@ jobs:
conan profile update env.CC=${{ matrix.profile.cc }} default
conan profile update env.CXX=${{ matrix.profile.cxx }} default
conan profile update conf.tools.build:compiler_executables='{"c": "${{ matrix.profile.cc }}", "cpp": "${{ matrix.profile.cxx }}"}' default
- name: checkout
uses: actions/checkout@v3
- name: dependencies
# Do not quote the URL. An empty string will be accepted (with
# a non-fatal warning), but a missing argument will not.
conan remote add ripple ${{ env.CONAN_URL }} --insert 0
- name: try to authenticate to ripple Conan remote
id: remote
run: |
echo outcome=$(conan user --remote ripple ${{ secrets.CONAN_USERNAME }} --password ${{ secrets.CONAN_TOKEN }} && echo success || echo failure) | tee ${GITHUB_OUTPUT}
- name: archive profile
# Create this archive before dependencies are added to the local cache.
run: tar -czf conan.tar -C ~/.conan .
- name: list missing binaries
id: binaries
# Print the list of dependencies that would need to be built locally.
# A non-empty list means we have "failed" to cache binaries remotely.
run: |
echo missing=$(conan info . --build missing --json 2>/dev/null | grep '^\[') | tee ${GITHUB_OUTPUT}
- name: build dependencies
if: (steps.binaries.outputs.missing != '[]')
uses: ./.github/actions/dependencies
with:
configuration: ${{ matrix.configuration }}
- name: archive cache
- name: upload dependencies to remote
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'success')
run: conan upload --remote ripple '*' --all --parallel --confirm
- name: recreate archive with dependencies
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'failure')
run: tar -czf conan.tar -C ~/.conan .
- name: upload cache
- name: upload archive
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
path: conan.tar
if-no-files-found: error


test:
Expand Down Expand Up @@ -96,7 +142,7 @@ jobs:
echo ${PATH} | tr ':' '\n'
conan --version
cmake --version
env
env | sort
ls ~/.conan
- name: checkout
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,4 @@ pkg_out
pkg
CMakeUserPresets.json
bld.rippled/
.vscode
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v10.0.1
hooks:
- id: clang-format
143 changes: 143 additions & 0 deletions API-CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# API Changelog

This changelog is intended to list all updates to the [public API methods](https://xrpl.org/public-api-methods.html).

For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior.

The API version controls the API behavior you see. This includes what properties you see in responses, what parameters you're permitted to send in requests, and so on. You specify the API version in each of your requests. When a breaking change is introduced to the `rippled` API, a new version is released. To avoid breaking your code, you should set (or increase) your version when you're ready to upgrade.

For a log of breaking changes, see the **API Version [number]** headings. In general, breaking changes are associated with a particular API Version number. For non-breaking changes, scroll to the **XRP Ledger version [x.y.z]** headings. Non-breaking changes are associated with a particular XRP Ledger (`rippled`) release.

## API Version 1

This version is supported by all `rippled` versions. At time of writing, it is the default API version, used when no `api_version` is specified. When a new API version is introduced, the command line interface will default to the latest API version. The command line is intended for ad-hoc usage by humans, not programs or automated scripts. The command line is not meant for use in production code.

### Idiosyncrasies

#### V1 account_info response

In [the response to the `account_info` command](https://xrpl.org/account_info.html#response-format), there is `account_data` - which is supposed to be an `AccountRoot` object - and `signer_lists` is in this object. However, the docs say that `signer_lists` should be at the root level of the reponse - and this makes sense, since signer lists are not part of the AccountRoot object. (First reported in [xrpl-dev-portal#938](https://github.com/XRPLF/xrpl-dev-portal/issues/938).) Thanks to [rippled#3770](https://github.com/XRPLF/rippled/pull/3770), this field will be moved in `api_version: 2`, to the root level of the response.

#### server_info - network_id

The `network_id` field was added in the `server_info` response in version 1.5.0 (2019), but it was not returned in [reporting mode](https://xrpl.org/rippled-server-modes.html#reporting-mode).

## XRP Ledger version 1.12.0

[Version 1.12.0](https://github.com/XRPLF/rippled/releases/tag/1.12.0) was released on Sep 6, 2023.

### Additions in 1.12

Additions are intended to be non-breaking (because they are purely additive).

- `server_info`: Added `ports`, an array which advertises the RPC and WebSocket ports. This information is also included in the `/crawl` endpoint (which calls `server_info` internally). `grpc` and `peer` ports are also included. (https://github.com/XRPLF/rippled/pull/4427)
- `ports` contains objects, each containing a `port` for the listening port (a number string), and a `protocol` array listing the supported protocols on that port.
- This allows crawlers to build a more detailed topology without needing to port-scan nodes.
- (For peers and other non-admin clients, the info about admin ports is excluded.)
- Clawback: The following additions are gated by the Clawback amendment (`featureClawback`). (https://github.com/XRPLF/rippled/pull/4553)
- Adds an [AccountRoot flag](https://xrpl.org/accountroot.html#accountroot-flags) called `lsfAllowTrustLineClawback` (https://github.com/XRPLF/rippled/pull/4617)
- Adds the corresponding `asfAllowTrustLineClawback` [AccountSet Flag](https://xrpl.org/accountset.html#accountset-flags) as well.
- Clawback is disabled by default, so if an issuer desires the ability to claw back funds, they must use an `AccountSet` transaction to set the AllowTrustLineClawback flag. They must do this before creating any trust lines, offers, escrows, payment channels, or checks.
- Adds the [Clawback transaction type](https://github.com/XRPLF/XRPL-Standards/blob/master/XLS-39d-clawback/README.md#331-clawback-transaction), containing these fields:
- `Account`: The issuer of the asset being clawed back. Must also be the sender of the transaction.
- `Amount`: The amount being clawed back, with the `Amount.issuer` being the token holder's address.
- Adds [AMM](https://github.com/XRPLF/XRPL-Standards/discussions/78) ([#4294](https://github.com/XRPLF/rippled/pull/4294), [#4626](https://github.com/XRPLF/rippled/pull/4626)) feature:
- Adds `amm_info` API to retrieve AMM information for a given tokens pair.
- Adds `AMMCreate` transaction type to create `AMM` instance.
- Adds `AMMDeposit` transaction type to deposit funds into `AMM` instance.
- Adds `AMMWithdraw` transaction type to withdraw funds from `AMM` instance.
- Adds `AMMVote` transaction type to vote for the trading fee of `AMM` instance.
- Adds `AMMBid` transaction type to bid for the Auction Slot of `AMM` instance.
- Adds `AMMDelete` transaction type to delete `AMM` instance.
- Adds `sfAMMID` to `AccountRoot` to indicate that the account is `AMM`'s account. `AMMID` is used to fetch `ltAMM`.
- Adds `lsfAMMNode` `TrustLine` flag to indicate that one side of the `TrustLine` is `AMM` account.
- Adds `tfLPToken`, `tfSingleAsset`, `tfTwoAsset`, `tfOneAssetLPToken`, `tfLimitLPToken`, `tfTwoAssetIfEmpty`,
`tfWithdrawAll`, `tfOneAssetWithdrawAll` which allow a trader to specify different fields combination
for `AMMDeposit` and `AMMWithdraw` transactions.
- Adds new transaction result codes:
- tecUNFUNDED_AMM: insufficient balance to fund AMM. The account does not have funds for liquidity provision.
- tecAMM_BALANCE: AMM has invalid balance. Calculated balances greater than the current pool balances.
- tecAMM_FAILED: AMM transaction failed. Fails due to a processing failure.
- tecAMM_INVALID_TOKENS: AMM invalid LP tokens. Invalid input values, format, or calculated values.
- tecAMM_EMPTY: AMM is in empty state. Transaction expects AMM in non-empty state (LP tokens > 0).
- tecAMM_NOT_EMPTY: AMM is not in empty state. Transaction expects AMM in empty state (LP tokens == 0).
- tecAMM_ACCOUNT: AMM account. Clawback of AMM account.
- tecINCOMPLETE: Some work was completed, but more submissions required to finish. AMMDelete partially deletes the trustlines.

## XRP Ledger version 1.11.0

[Version 1.11.0](https://github.com/XRPLF/rippled/releases/tag/1.11.0) was released on Jun 20, 2023.

### Breaking changes in 1.11

- Added the ability to mark amendments as obsolete. For the `feature` admin API, there is a new possible value for the `vetoed` field. (https://github.com/XRPLF/rippled/pull/4291)
- The value of `vetoed` can now be `true`, `false`, or `"Obsolete"`.
- Removed the acceptance of seeds or public keys in place of account addresses. (https://github.com/XRPLF/rippled/pull/4404)
- This simplifies the API and encourages better security practices (i.e. seeds should never be sent over the network).
- For the `ledger_data` method, when all entries are filtered out, the `state` field of the response is now an empty list (in other words, an empty array, `[]`). (Previously, it would return `null`.) While this is technically a breaking change, the new behavior is consistent with the documentation, so this is considered only a bug fix. (https://github.com/XRPLF/rippled/pull/4398)
- If and when the `fixNFTokenRemint` amendment activates, there will be a new AccountRoot field, `FirstNFTSequence`. This field is set to the current account sequence when the account issues their first NFT. If an account has not issued any NFTs, then the field is not set. ([#4406](https://github.com/XRPLF/rippled/pull/4406))
- There is a new account deletion restriction: an account can only be deleted if `FirstNFTSequence` + `MintedNFTokens` + `256` is less than the current ledger sequence.
- This is potentially a breaking change if clients have logic for determining whether an account can be deleted.
- NetworkID
- For sidechains and networks with a network ID greater than 1024, there is a new [transaction common field](https://xrpl.org/transaction-common-fields.html), `NetworkID`. (https://github.com/XRPLF/rippled/pull/4370)
- This field helps to prevent replay attacks and is now required for chains whose network ID is 1025 or higher.
- The field must be omitted for Mainnet, so there is no change for Mainnet users.
- There are three new local error codes:
- `telNETWORK_ID_MAKES_TX_NON_CANONICAL`: a `NetworkID` is present but the chain's network ID is less than 1025. Remove the field from the transaction, and try again.
- `telREQUIRES_NETWORK_ID`: a `NetworkID` is required, but is not present. Add the field to the transaction, and try again.
- `telWRONG_NETWORK`: a `NetworkID` is specified, but it is for a different network. Submit the transaction to a different server which is connected to the correct network.

### Additions and bug fixes in 1.11

- Added `nftoken_id`, `nftoken_ids` and `offer_id` meta fields into NFT `tx` and `account_tx` responses. (https://github.com/XRPLF/rippled/pull/4447)
- Added an `account_flags` object to the `account_info` method response. (https://github.com/XRPLF/rippled/pull/4459)
- Added `NFTokenPages` to the `account_objects` RPC. (https://github.com/XRPLF/rippled/pull/4352)
- Fixed: `marker` returned from the `account_lines` command would not work on subsequent commands. (https://github.com/XRPLF/rippled/pull/4361)

# In development

Changes below this point are in development.

## API Version 2

At the time of writing, this version is expected to be introduced in `rippled` version 2.0.

Currently (prior to the release of 2.0), it is available as a "beta" version, meaning it can be enabled with a config setting in `rippled.cfg`:
```
[beta_rpc_api]
1
```

Since `api_version` 2 is in "beta", breaking changes can be made at any time.

#### Modifications to account_info response in V2

- `signer_lists` is returned in the root of the response. Previously, in API version 1, it was nested under `account_data`. (https://github.com/XRPLF/rippled/pull/3770)
- When using an invalid `signer_lists` value, the API now returns an "invalidParams" error. (https://github.com/XRPLF/rippled/pull/4585)
- (`signer_lists` must be a boolean. In API version 1, strings are accepted and may return a normal response - as if `signer_lists` were `true`.)

#### Modifications to [account_tx](https://xrpl.org/account_tx.html#account_tx) response in V2

- Using `ledger_index_min`, `ledger_index_max`, and `ledger_index` returns `invalidParams` because if you use `ledger_index_min` or `ledger_index_max`, then it does not make sense to also specify `ledger_index`. Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4571)
- The same applies for `ledger_index_min`, `ledger_index_max`, and `ledger_hash`. (https://github.com/XRPLF/rippled/issues/4545#issuecomment-1565065579)
- Using a `ledger_index_min` or `ledger_index_max` beyond the range of ledgers that the server has:
- returns `lgrIdxMalformed` in API version 2. (https://github.com/XRPLF/rippled/issues/4288)
- Previously, in API version 1, no error was returned.

##### In progress

- Attempting to use a non-boolean value (such as a string) for the `binary` or `forward` parameters returns `invalidParams` (`rpcINVALID_PARAMS`). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)

#### Modifications to [noripple_check](https://xrpl.org/noripple_check.html#noripple_check) response in V2

##### In progress

- Attempting to use a non-boolean value (such as a string) for the `transactions` parameter returns `invalidParams` (`rpcINVALID_PARAMS`). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)

# Unit tests for API changes

The following information is useful to developers contributing to this project:

The purpose of unit tests is to catch bugs and prevent regressions. In general, it often makes sense to create a test function when there is a breaking change to the API. For APIs that have changed in a new API version, the tests should be modified so that both the prior version and the new version are properly tested.

To take one example: for `account_info` version 1, WebSocket and JSON-RPC behavior should be tested. The latest API version, i.e. API version 2, should be tested over WebSocket, JSON-RPC, and command line.
Loading