NetworkParameters
Keywords: net.corda.core.node.NetworkParameters class
Date: 2023-09-18

net.corda.core.node

## Class NetworkParameters

- net.corda.core.node.NetworkParameters

-     public class NetworkParameters

  Network parameters are a set of values that every node participating in the zone needs to agree on and use to correctly interoperate with each other.

- - ### Constructor Detail

    - #### NetworkParameters

          public NetworkParameters(int minimumPlatformVersion,
                                   @NotNull
                                   java.util.List<net.corda.core.node.NotaryInfo> notaries,
                                   int maxMessageSize,
                                   int maxTransactionSize,
                                   @NotNull
                                   java.time.Instant modifiedTime,
                                   int epoch,
                                   @NotNull
                                   java.util.Map<java.lang.String,? extends java.util.List<? extends net.corda.core.crypto.SecureHash>> whitelistedContractImplementations,
                                   @NotNull
                                   java.time.Duration eventHorizon,
                                   @NotNull
                                   java.util.Map<java.lang.String,? extends java.security.PublicKey> packageOwnership)

      Network parameters are a set of values that every node participating in the zone needs to agree on and use to correctly interoperate with each other.

      Parameters:
        `minimumPlatformVersion` - Minimum version of Corda platform that is required for nodes in the network.
        `notaries` - List of well known and trusted notary identities with information on validation type.
        `maxMessageSize` - Maximum allowed size in bytes of an individual message sent over the wire.
        `maxTransactionSize` - Maximum permitted transaction size in bytes.
        `modifiedTime` - (`annotationclass AutoAcceptable`) Last modification time of network parameters set.
        `epoch` - (`annotationclass AutoAcceptable`) Version number of the network parameters. Starting from 1, this will always increment on each new setof parameters.
        `whitelistedContractImplementations` - (`annotationclass AutoAcceptable`) List of whitelisted jars containing contract code for each contract class.This will be used by `class WhitelistedByZoneAttachmentConstraint`.You can learn more about contract constraints here.
        `eventHorizon` - Time after which nodes will be removed from the network map if they have not been seenduring this period
        `packageOwnership` - (`annotationclass AutoAcceptable`) List of the network-wide java packages that were successfully claimed by their owners.Any CorDapp JAR that offers contracts and states in any of these packages must be signed by the owner.

    - #### NetworkParameters

          public NetworkParameters(int minimumPlatformVersion,
                                   @NotNull
                                   java.util.List<net.corda.core.node.NotaryInfo> notaries,
                                   int maxMessageSize,
                                   int maxTransactionSize,
                                   @NotNull
                                   java.time.Instant modifiedTime,
                                   int epoch,
                                   @NotNull
                                   java.util.Map<java.lang.String,? extends java.util.List<? extends net.corda.core.crypto.SecureHash>> whitelistedContractImplementations)

    - #### NetworkParameters

          public NetworkParameters(int minimumPlatformVersion,
                                   @NotNull
                                   java.util.List<net.corda.core.node.NotaryInfo> notaries,
                                   int maxMessageSize,
                                   int maxTransactionSize,
                                   @NotNull
                                   java.time.Instant modifiedTime,
                                   int epoch,
                                   @NotNull
                                   java.util.Map<java.lang.String,? extends java.util.List<? extends net.corda.core.crypto.SecureHash>> whitelistedContractImplementations,
                                   @NotNull
                                   java.time.Duration eventHorizon)

  - ### Method Detail

    - #### copy

          @NotNull
          public NetworkParameters copy(int minimumPlatformVersion,
                                                 @NotNull
                                                 java.util.List<net.corda.core.node.NotaryInfo> notaries,
                                                 int maxMessageSize,
                                                 int maxTransactionSize,
                                                 @NotNull
                                                 java.time.Instant modifiedTime,
                                                 int epoch,
                                                 @NotNull
                                                 java.util.Map<java.lang.String,? extends java.util.List<? extends net.corda.core.crypto.SecureHash>> whitelistedContractImplementations,
                                                 @NotNull
                                                 java.time.Duration eventHorizon)

      This is to address backwards compatibility of the API, invariant to package ownership addresses bug CORDA-2769

    - #### copy

          @NotNull
          public NetworkParameters copy(int minimumPlatformVersion,
                                                 @NotNull
                                                 java.util.List<net.corda.core.node.NotaryInfo> notaries,
                                                 int maxMessageSize,
                                                 int maxTransactionSize,
                                                 @NotNull
                                                 java.time.Instant modifiedTime,
                                                 int epoch,
                                                 @NotNull
                                                 java.util.Map<java.lang.String,? extends java.util.List<? extends net.corda.core.crypto.SecureHash>> whitelistedContractImplementations)

      This is to address backwards compatibility of the API, invariant to package ownership addresses bug CORDA-2769

    - #### toString

          @NotNull
          public java.lang.String toString()

    - #### toImmutable

          @NotNull
          public NetworkParameters toImmutable()

    - #### getMinimumPlatformVersion

          public int getMinimumPlatformVersion()

      Minimum version of Corda platform that is required for nodes in the network.

    - #### getNotaries

          @NotNull
          public java.util.List<net.corda.core.node.NotaryInfo> getNotaries()

      List of well known and trusted notary identities with information on validation type.

    - #### getMaxMessageSize

          public int getMaxMessageSize()

      Maximum allowed size in bytes of an individual message sent over the wire.

    - #### getMaxTransactionSize

          public int getMaxTransactionSize()

      Maximum permitted transaction size in bytes.

    - #### getModifiedTime

          @NotNull
          public java.time.Instant getModifiedTime()

      (

      `annotationclass AutoAcceptable`) Last modification time of network parameters set.

      See Also:
        `annotationclass AutoAcceptable`

    - #### getEpoch

          public int getEpoch()

      (

      `annotationclass AutoAcceptable`) Version number of the network parameters. Starting from 1, this will always increment on each new setof parameters.

      See Also:
        `annotationclass AutoAcceptable`

    - #### getWhitelistedContractImplementations

          @NotNull
          public java.util.Map<java.lang.String,java.util.List> getWhitelistedContractImplementations()

      (

      `annotationclass AutoAcceptable`) List of whitelisted jars containing contract code for each contract class.This will be used by `class WhitelistedByZoneAttachmentConstraint`.You can learn more about contract constraints here.

      See Also:
        `annotationclass AutoAcceptable`, `class WhitelistedByZoneAttachmentConstraint`, You can learn more about contract constraints here

    - #### getEventHorizon

          @NotNull
          public java.time.Duration getEventHorizon()

      Time after which nodes will be removed from the network map if they have not been seen

      during this period

    - #### getPackageOwnership

          @NotNull
          public java.util.Map<java.lang.String,java.security.PublicKey> getPackageOwnership()

      (

      `annotationclass AutoAcceptable`) List of the network-wide java packages that were successfully claimed by their owners.Any CorDapp JAR that offers contracts and states in any of these packages must be signed by the owner.

      See Also:
        `annotationclass AutoAcceptable`

    - #### component1

          public int component1()

      Minimum version of Corda platform that is required for nodes in the network.

    - #### component2

          @NotNull
          public java.util.List<net.corda.core.node.NotaryInfo> component2()

      List of well known and trusted notary identities with information on validation type.

    - #### component3

          public int component3()

      Maximum allowed size in bytes of an individual message sent over the wire.

    - #### component4

          public int component4()

      Maximum permitted transaction size in bytes.

    - #### component5

          @NotNull
          public java.time.Instant component5()

      (

      `annotationclass AutoAcceptable`) Last modification time of network parameters set.

      See Also:
        `annotationclass AutoAcceptable`

    - #### component6

          public int component6()

      (

      `annotationclass AutoAcceptable`) Version number of the network parameters. Starting from 1, this will always increment on each new setof parameters.

      See Also:
        `annotationclass AutoAcceptable`

    - #### component7

          @NotNull
          public java.util.Map<java.lang.String,java.util.List> component7()

      (

      `annotationclass AutoAcceptable`) List of whitelisted jars containing contract code for each contract class.This will be used by `class WhitelistedByZoneAttachmentConstraint`.You can learn more about contract constraints here.

      See Also:
        `annotationclass AutoAcceptable`, `class WhitelistedByZoneAttachmentConstraint`, You can learn more about contract constraints here

    - #### component8

          @NotNull
          public java.time.Duration component8()

      Time after which nodes will be removed from the network map if they have not been seen

      during this period

    - #### component9

          @NotNull
          public java.util.Map<java.lang.String,java.security.PublicKey> component9()

      (

      `annotationclass AutoAcceptable`) List of the network-wide java packages that were successfully claimed by their owners.Any CorDapp JAR that offers contracts and states in any of these packages must be signed by the owner.

      See Also:
        `annotationclass AutoAcceptable`

    - #### copy

          @NotNull
          public NetworkParameters copy(int minimumPlatformVersion,
                                                 @NotNull
                                                 java.util.List<net.corda.core.node.NotaryInfo> notaries,
                                                 int maxMessageSize,
                                                 int maxTransactionSize,
                                                 @NotNull
                                                 java.time.Instant modifiedTime,
                                                 int epoch,
                                                 @NotNull
                                                 java.util.Map<java.lang.String,? extends java.util.List<? extends net.corda.core.crypto.SecureHash>> whitelistedContractImplementations,
                                                 @NotNull
                                                 java.time.Duration eventHorizon,
                                                 @NotNull
                                                 java.util.Map<java.lang.String,? extends java.security.PublicKey> packageOwnership)

      Network parameters are a set of values that every node participating in the zone needs to agree on and use to correctly interoperate with each other.

    - #### hashCode

          public int hashCode()

      Network parameters are a set of values that every node participating in the zone needs to agree on and use to correctly interoperate with each other.

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object p)

      Network parameters are a set of values that every node participating in the zone needs to agree on and use to correctly interoperate with each other.