Skip to content

Commit

Permalink
Upgrade XDR to the latest tips of curr and next branches (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Sep 17, 2024
1 parent 92ca804 commit 9dab1fe
Show file tree
Hide file tree
Showing 11 changed files with 655 additions and 47 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
XDR_BASE_URL_CURR=https://github.com/stellar/stellar-xdr/raw/4ec28d95dd84b109253e22b151314478d6f00522
XDR_BASE_URL_CURR=https://github.com/stellar/stellar-xdr/raw/529d5176f24c73eeccfa5eba481d4e89c19b1181
XDR_BASE_LOCAL_CURR=xdr/curr
XDR_FILES_CURR= \
Stellar-SCP.x \
Expand All @@ -14,7 +14,7 @@ XDR_FILES_CURR= \
Stellar-contract-config-setting.x
XDR_FILES_LOCAL_CURR=$(addprefix xdr/curr/,$(XDR_FILES_CURR))

XDR_BASE_URL_NEXT=https://github.com/stellar/stellar-xdr/raw/86b4ff573c3e9a475f9280b97645cc75e2c75b6e
XDR_BASE_URL_NEXT=https://github.com/stellar/stellar-xdr/raw/8c88608d0a20b01873056a5ec13be245e1f2aa27
XDR_BASE_LOCAL_NEXT=xdr/next
XDR_FILES_NEXT= \
Stellar-SCP.x \
Expand Down
110 changes: 103 additions & 7 deletions src/generated/curr_generated.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen on 2024-08-23T12:09:00-08:00
// Automatically generated by xdrgen on 2024-09-12T11:09:00-08:00
// DO NOT EDIT or your changes may be overwritten

/* jshint maxstatements:2147483647 */
Expand Down Expand Up @@ -5213,12 +5213,16 @@ xdr.enum("SorobanAuthorizedFunctionType", {
// {
// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN:
// InvokeContractArgs contractFn;
// // This variant of auth payload for creating new contract instances is no
// // longer accepted after protocol 22.
// // This variant of auth payload for creating new contract instances
// // doesn't allow specifying the constructor arguments, creating contracts
// // with constructors that take arguments is only possible by authorizing
// // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN`
// // (protocol 22+).
// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN:
// CreateContractArgs createContractHostFn;
// // This variant of auth payload for creating new contract instances
// // is only accepted in and after protocol 22.
// // is only accepted in and after protocol 22. It allows authorizing the
// // contract constructor arguments.
// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN:
// CreateContractArgsV2 createContractV2HostFn;
// };
Expand Down Expand Up @@ -9588,12 +9592,28 @@ xdr.enum("ScEnvMetaKind", {
scEnvMetaKindInterfaceVersion: 0,
});

// === xdr source ============================================================
//
// struct {
// uint32 protocol;
// uint32 preRelease;
// }
//
// ===========================================================================
xdr.struct("ScEnvMetaEntryInterfaceVersion", [
["protocol", xdr.lookup("Uint32")],
["preRelease", xdr.lookup("Uint32")],
]);

// === xdr source ============================================================
//
// union SCEnvMetaEntry switch (SCEnvMetaKind kind)
// {
// case SC_ENV_META_KIND_INTERFACE_VERSION:
// uint64 interfaceVersion;
// struct {
// uint32 protocol;
// uint32 preRelease;
// } interfaceVersion;
// };
//
// ===========================================================================
Expand All @@ -9604,7 +9624,7 @@ xdr.union("ScEnvMetaEntry", {
["scEnvMetaKindInterfaceVersion", "interfaceVersion"],
],
arms: {
interfaceVersion: xdr.lookup("Uint64"),
interfaceVersion: xdr.lookup("ScEnvMetaEntryInterfaceVersion"),
},
});

Expand Down Expand Up @@ -10417,7 +10437,58 @@ xdr.struct("ConfigSettingContractBandwidthV0", [
// // point on a 256-bit elliptic curve
// Sec1DecodePointUncompressed = 43,
// // Cost of verifying an ECDSA Secp256r1 signature
// VerifyEcdsaSecp256r1Sig = 44
// VerifyEcdsaSecp256r1Sig = 44,
//
// // Cost of encoding a BLS12-381 Fp (base field element)
// Bls12381EncodeFp = 45,
// // Cost of decoding a BLS12-381 Fp (base field element)
// Bls12381DecodeFp = 46,
// // Cost of checking a G1 point lies on the curve
// Bls12381G1CheckPointOnCurve = 47,
// // Cost of checking a G1 point belongs to the correct subgroup
// Bls12381G1CheckPointInSubgroup = 48,
// // Cost of checking a G2 point lies on the curve
// Bls12381G2CheckPointOnCurve = 49,
// // Cost of checking a G2 point belongs to the correct subgroup
// Bls12381G2CheckPointInSubgroup = 50,
// // Cost of converting a BLS12-381 G1 point from projective to affine coordinates
// Bls12381G1ProjectiveToAffine = 51,
// // Cost of converting a BLS12-381 G2 point from projective to affine coordinates
// Bls12381G2ProjectiveToAffine = 52,
// // Cost of performing BLS12-381 G1 point addition
// Bls12381G1Add = 53,
// // Cost of performing BLS12-381 G1 scalar multiplication
// Bls12381G1Mul = 54,
// // Cost of performing BLS12-381 G1 multi-scalar multiplication (MSM)
// Bls12381G1Msm = 55,
// // Cost of mapping a BLS12-381 Fp field element to a G1 point
// Bls12381MapFpToG1 = 56,
// // Cost of hashing to a BLS12-381 G1 point
// Bls12381HashToG1 = 57,
// // Cost of performing BLS12-381 G2 point addition
// Bls12381G2Add = 58,
// // Cost of performing BLS12-381 G2 scalar multiplication
// Bls12381G2Mul = 59,
// // Cost of performing BLS12-381 G2 multi-scalar multiplication (MSM)
// Bls12381G2Msm = 60,
// // Cost of mapping a BLS12-381 Fp2 field element to a G2 point
// Bls12381MapFp2ToG2 = 61,
// // Cost of hashing to a BLS12-381 G2 point
// Bls12381HashToG2 = 62,
// // Cost of performing BLS12-381 pairing operation
// Bls12381Pairing = 63,
// // Cost of converting a BLS12-381 scalar element from U256
// Bls12381FrFromU256 = 64,
// // Cost of converting a BLS12-381 scalar element to U256
// Bls12381FrToU256 = 65,
// // Cost of performing BLS12-381 scalar element addition/subtraction
// Bls12381FrAddSub = 66,
// // Cost of performing BLS12-381 scalar element multiplication
// Bls12381FrMul = 67,
// // Cost of performing BLS12-381 scalar element exponentiation
// Bls12381FrPow = 68,
// // Cost of performing BLS12-381 scalar element inversion
// Bls12381FrInv = 69
// };
//
// ===========================================================================
Expand Down Expand Up @@ -10467,6 +10538,31 @@ xdr.enum("ContractCostType", {
instantiateWasmDataSegmentBytes: 42,
sec1DecodePointUncompressed: 43,
verifyEcdsaSecp256r1Sig: 44,
bls12381EncodeFp: 45,
bls12381DecodeFp: 46,
bls12381G1CheckPointOnCurve: 47,
bls12381G1CheckPointInSubgroup: 48,
bls12381G2CheckPointOnCurve: 49,
bls12381G2CheckPointInSubgroup: 50,
bls12381G1ProjectiveToAffine: 51,
bls12381G2ProjectiveToAffine: 52,
bls12381G1Add: 53,
bls12381G1Mul: 54,
bls12381G1Msm: 55,
bls12381MapFpToG1: 56,
bls12381HashToG1: 57,
bls12381G2Add: 58,
bls12381G2Mul: 59,
bls12381G2Msm: 60,
bls12381MapFp2ToG2: 61,
bls12381HashToG2: 62,
bls12381Pairing: 63,
bls12381FrFromU256: 64,
bls12381FrToU256: 65,
bls12381FrAddSub: 66,
bls12381FrMul: 67,
bls12381FrPow: 68,
bls12381FrInv: 69,
});

// === xdr source ============================================================
Expand Down
117 changes: 103 additions & 14 deletions src/generated/next_generated.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Automatically generated by xdrgen on 2024-08-23T12:09:00-08:00
// Automatically generated by xdrgen on 2024-09-12T11:09:00-08:00
// DO NOT EDIT or your changes may be overwritten

/* jshint maxstatements:2147483647 */
Expand All @@ -15,13 +15,6 @@ var types = XDR.config(xdr => {
const SCSYMBOL_LIMIT = 32;
const SC_SPEC_DOC_LIMIT = 1024;

// === xdr source ============================================================
//
// typedef opaque Value<>;
//
// ===========================================================================
xdr.typedef("Value", xdr.varOpaque());

// === xdr source ============================================================
//
// struct SCPBallot
Expand Down Expand Up @@ -5238,12 +5231,16 @@ xdr.enum("SorobanAuthorizedFunctionType", {
// {
// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN:
// InvokeContractArgs contractFn;
// // This variant of auth payload for creating new contract instances is no
// // longer accepted after protocol 22.
// // This variant of auth payload for creating new contract instances
// // doesn't allow specifying the constructor arguments, creating contracts
// // with constructors that take arguments is only possible by authorizing
// // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN`
// // (protocol 22+).
// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN:
// CreateContractArgs createContractHostFn;
// // This variant of auth payload for creating new contract instances
// // is only accepted in and after protocol 22.
// // is only accepted in and after protocol 22. It allows authorizing the
// // contract constructor arguments.
// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN:
// CreateContractArgsV2 createContractV2HostFn;
// };
Expand Down Expand Up @@ -9642,12 +9639,28 @@ xdr.enum("ScEnvMetaKind", {
scEnvMetaKindInterfaceVersion: 0,
});

// === xdr source ============================================================
//
// struct {
// uint32 protocol;
// uint32 preRelease;
// }
//
// ===========================================================================
xdr.struct("ScEnvMetaEntryInterfaceVersion", [
["protocol", xdr.lookup("Uint32")],
["preRelease", xdr.lookup("Uint32")],
]);

// === xdr source ============================================================
//
// union SCEnvMetaEntry switch (SCEnvMetaKind kind)
// {
// case SC_ENV_META_KIND_INTERFACE_VERSION:
// uint64 interfaceVersion;
// struct {
// uint32 protocol;
// uint32 preRelease;
// } interfaceVersion;
// };
//
// ===========================================================================
Expand All @@ -9658,7 +9671,7 @@ xdr.union("ScEnvMetaEntry", {
["scEnvMetaKindInterfaceVersion", "interfaceVersion"],
],
arms: {
interfaceVersion: xdr.lookup("Uint64"),
interfaceVersion: xdr.lookup("ScEnvMetaEntryInterfaceVersion"),
},
});

Expand Down Expand Up @@ -10489,7 +10502,58 @@ xdr.struct("ConfigSettingContractBandwidthV0", [
// // point on a 256-bit elliptic curve
// Sec1DecodePointUncompressed = 43,
// // Cost of verifying an ECDSA Secp256r1 signature
// VerifyEcdsaSecp256r1Sig = 44
// VerifyEcdsaSecp256r1Sig = 44,
//
// // Cost of encoding a BLS12-381 Fp (base field element)
// Bls12381EncodeFp = 45,
// // Cost of decoding a BLS12-381 Fp (base field element)
// Bls12381DecodeFp = 46,
// // Cost of checking a G1 point lies on the curve
// Bls12381G1CheckPointOnCurve = 47,
// // Cost of checking a G1 point belongs to the correct subgroup
// Bls12381G1CheckPointInSubgroup = 48,
// // Cost of checking a G2 point lies on the curve
// Bls12381G2CheckPointOnCurve = 49,
// // Cost of checking a G2 point belongs to the correct subgroup
// Bls12381G2CheckPointInSubgroup = 50,
// // Cost of converting a BLS12-381 G1 point from projective to affine coordinates
// Bls12381G1ProjectiveToAffine = 51,
// // Cost of converting a BLS12-381 G2 point from projective to affine coordinates
// Bls12381G2ProjectiveToAffine = 52,
// // Cost of performing BLS12-381 G1 point addition
// Bls12381G1Add = 53,
// // Cost of performing BLS12-381 G1 scalar multiplication
// Bls12381G1Mul = 54,
// // Cost of performing BLS12-381 G1 multi-scalar multiplication (MSM)
// Bls12381G1Msm = 55,
// // Cost of mapping a BLS12-381 Fp field element to a G1 point
// Bls12381MapFpToG1 = 56,
// // Cost of hashing to a BLS12-381 G1 point
// Bls12381HashToG1 = 57,
// // Cost of performing BLS12-381 G2 point addition
// Bls12381G2Add = 58,
// // Cost of performing BLS12-381 G2 scalar multiplication
// Bls12381G2Mul = 59,
// // Cost of performing BLS12-381 G2 multi-scalar multiplication (MSM)
// Bls12381G2Msm = 60,
// // Cost of mapping a BLS12-381 Fp2 field element to a G2 point
// Bls12381MapFp2ToG2 = 61,
// // Cost of hashing to a BLS12-381 G2 point
// Bls12381HashToG2 = 62,
// // Cost of performing BLS12-381 pairing operation
// Bls12381Pairing = 63,
// // Cost of converting a BLS12-381 scalar element from U256
// Bls12381FrFromU256 = 64,
// // Cost of converting a BLS12-381 scalar element to U256
// Bls12381FrToU256 = 65,
// // Cost of performing BLS12-381 scalar element addition/subtraction
// Bls12381FrAddSub = 66,
// // Cost of performing BLS12-381 scalar element multiplication
// Bls12381FrMul = 67,
// // Cost of performing BLS12-381 scalar element exponentiation
// Bls12381FrPow = 68,
// // Cost of performing BLS12-381 scalar element inversion
// Bls12381FrInv = 69
// };
//
// ===========================================================================
Expand Down Expand Up @@ -10539,6 +10603,31 @@ xdr.enum("ContractCostType", {
instantiateWasmDataSegmentBytes: 42,
sec1DecodePointUncompressed: 43,
verifyEcdsaSecp256r1Sig: 44,
bls12381EncodeFp: 45,
bls12381DecodeFp: 46,
bls12381G1CheckPointOnCurve: 47,
bls12381G1CheckPointInSubgroup: 48,
bls12381G2CheckPointOnCurve: 49,
bls12381G2CheckPointInSubgroup: 50,
bls12381G1ProjectiveToAffine: 51,
bls12381G2ProjectiveToAffine: 52,
bls12381G1Add: 53,
bls12381G1Mul: 54,
bls12381G1Msm: 55,
bls12381MapFpToG1: 56,
bls12381HashToG1: 57,
bls12381G2Add: 58,
bls12381G2Mul: 59,
bls12381G2Msm: 60,
bls12381MapFp2ToG2: 61,
bls12381HashToG2: 62,
bls12381Pairing: 63,
bls12381FrFromU256: 64,
bls12381FrToU256: 65,
bls12381FrAddSub: 66,
bls12381FrMul: 67,
bls12381FrPow: 68,
bls12381FrInv: 69,
});

// === xdr source ============================================================
Expand Down
Loading

0 comments on commit 9dab1fe

Please sign in to comment.