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

GOLD 200 : Use network generated timestamps (ignore nonce queue) for non-config internal txs #234

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/config/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const SERVER_CONFIG: StrictServerConfiguration = {
extraNodesToAddInRestart: 5,
secondsToCheckForQ1: 1000, // 1 seconds in ms
hardenNewSyncingProtocol: true,
removeLostSyncingNodeFromList: true, //set to true since 1.10
removeLostSyncingNodeFromList: true, //set to true since 1.10
compareCertBinary: true,
makeReceiptBinary: true,
lostArchiverInvestigateBinary: true,
Expand Down Expand Up @@ -172,7 +172,7 @@ const SERVER_CONFIG: StrictServerConfiguration = {
requestReceiptForTxBinary: true,
lostReportBinary: true,
repairMissingAccountsBinary: true,
poqoSendReceiptBinary : true,
poqoSendReceiptBinary: true,
poqoDataAndReceiptBinary: true,
poqoSendVoteBinary: true,
rotationEdgeToAvoid: 3,
Expand All @@ -184,7 +184,8 @@ const SERVER_CONFIG: StrictServerConfiguration = {
useFactCorrespondingTell: true,
resubmitStandbyAddWaitDuration: 1000, // 1 second in ms
requiredVotesPercentage: 2 / 3.0,
timestampCacheFix: true
timestampCacheFix: true,
networkGeneratedTimestampFixes: true,
},
ip: {
externalIp: '0.0.0.0',
Expand Down Expand Up @@ -318,7 +319,7 @@ const SERVER_CONFIG: StrictServerConfiguration = {
voterPercentage: 0.1,
waitUpstreamTx: false,
gossipCompleteData: false,
shareCompleteData: false, //turn off the neighbor sharing of complete data.
shareCompleteData: false, //turn off the neighbor sharing of complete data.
txStateMachineChanges: true,
canRequestFinalData: true,
numberOfReInjectNodes: 5,
Expand All @@ -340,7 +341,7 @@ const SERVER_CONFIG: StrictServerConfiguration = {
stuckTxMoveTime: 60000,
forceVoteForFailedPreApply: true,
collectedDataFix: true,
noRepairIfDataAttached: false, // this seems to be an optimization that we will leave off for now
noRepairIfDataAttached: false, // this seems to be an optimization that we will leave off for now
rejectSharedDataIfCovered: false,
requestAwaitedDataAllowed: false, // this has been disabled by accident for a long time so leaving it off
awaitingDataCanBailOnReceipt: true,
Expand Down
4 changes: 4 additions & 0 deletions src/shardus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,10 @@ class Shardus extends EventEmitter {
status: 500,
}
}
if (this.app.isInternalTx(tx) && this.config.p2p.networkGeneratedTimestampFixes) {
let result = await this._timestampAndQueueTransaction(tx, appData, global, noConsensus)
return result
}
if (shouldAddToNonceQueue) {
const nonceQueueEntry: NonceQueueItem = {
tx,
Expand Down
2 changes: 2 additions & 0 deletions src/shardus/shardus-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,8 @@ export interface ServerConfiguration {
requiredVotesPercentage: number
// /** a fix to prevent node from producing different ts for same txId */
timestampCacheFix: boolean
// to allow internal transactions to have network generated timestamps
networkGeneratedTimestampFixes: boolean
}
/** Server IP configuration */
ip?: {
Expand Down
Loading