Skip to content

Commit 571a8f5

Browse files
committed
*: move Notary contract out of P2PSigExtensions
A part of #3464. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
1 parent de83594 commit 571a8f5

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

docs/node-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ protocol-related settings described in the table below.
341341
| MaxValidUntilBlockIncrement | `uint32` | `5760` | Upper height increment limit for transaction's ValidUntilBlock field value relative to the current blockchain height, exceeding which a transaction will fail validation. It is set to estimated daily number of blocks with 15s interval by default. |
342342
| MemPoolSize | `int` | `50000` | Size of the node's memory pool where transactions are stored before they are added to block. |
343343
| P2PNotaryRequestPayloadPoolSize | `int` | `1000` | Size of the node's P2P Notary request payloads memory pool where P2P Notary requests are stored before main or fallback transaction is completed and added to the chain.<br>This option is valid only if `P2PSigExtensions` are enabled. | Not supported by the C# node, thus may affect heterogeneous networks functionality. |
344-
| P2PSigExtensions | `bool` | `false` | Enables following additional Notary service related logic:<br>• Transaction attribute `NotaryAssisted`<br>• Network payload of the `P2PNotaryRequest` type<br>• Native `Notary` contract<br>• Notary node module | Not supported by the C# node, thus may affect heterogeneous networks functionality. |
344+
| P2PSigExtensions | `bool` | `false` | Enables following additional Notary service related logic:<br>• Transaction attribute `NotaryAssisted`<br>• Network payload of the `P2PNotaryRequest` type<br>• Notary node module | Not supported by the C# node, thus may affect heterogeneous networks functionality. |
345345
| P2PStateExchangeExtensions | `bool` | `false` | Enables the following P2P MPT state data exchange logic: <br>• `StateSyncInterval` protocol setting <br>• P2P commands `GetMPTDataCMD` and `MPTDataCMD` | Not supported by the C# node, thus may affect heterogeneous networks functionality. Can be supported either on MPT-complete node (`KeepOnlyLatestState`=`false`) or on light GC-enabled node (`RemoveUntraceableBlocks=true`) in which case `KeepOnlyLatestState` setting doesn't change the behavior, an appropriate set of MPTs is always stored (see `RemoveUntraceableBlocks`). |
346346
| ReservedAttributes | `bool` | `false` | Allows to have reserved attributes range for experimental or private purposes. |
347347
| SeedList | `[]string` | [] | List of initial nodes addresses used to establish connectivity. |

pkg/core/blockchain.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3081,9 +3081,6 @@ func (bc *Blockchain) GetMaxVerificationGAS() int64 {
30813081

30823082
// GetMaxNotValidBeforeDelta returns maximum NotValidBeforeDelta Notary limit.
30833083
func (bc *Blockchain) GetMaxNotValidBeforeDelta() (uint32, error) {
3084-
if !bc.config.P2PSigExtensions {
3085-
panic("disallowed call to Notary") // critical error, thus panic.
3086-
}
30873084
if !bc.isHardforkEnabled(bc.contracts.Notary.ActiveIn(), bc.BlockHeight()) {
30883085
return 0, fmt.Errorf("native Notary is active starting from %s", bc.contracts.Notary.ActiveIn().String())
30893086
}

pkg/core/native/contract.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,13 @@ func NewContracts(cfg config.ProtocolConfiguration) *Contracts {
100100
cs.Oracle = oracle
101101
cs.Contracts = append(cs.Contracts, oracle)
102102

103-
if cfg.P2PSigExtensions {
104-
notary := newNotary()
105-
notary.GAS = gas
106-
notary.NEO = neo
107-
notary.Desig = desig
108-
notary.Policy = policy
109-
cs.Notary = notary
110-
cs.Contracts = append(cs.Contracts, notary)
111-
}
103+
notary := newNotary()
104+
notary.GAS = gas
105+
notary.NEO = neo
106+
notary.Desig = desig
107+
notary.Policy = policy
108+
cs.Notary = notary
109+
cs.Contracts = append(cs.Contracts, notary)
112110

113111
return cs
114112
}

0 commit comments

Comments
 (0)