Skip to content

Commit d6875cb

Browse files
committed
* updated according to main.
Signed-off-by: Dean Amar <Dean.Amar@ibm.com>
2 parents dc94485 + d13d0b9 commit d6875cb

6 files changed

Lines changed: 28 additions & 28 deletions

File tree

docs/coordinator.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ parallel processing while ensuring deterministic outcomes.
3030

3131
## 2. Core Responsibilities
3232

33-
The [Coordinator](https://github.com/hyperledger/fabric-x-committer/tree/main/service/coordinator) service performs five main tasks:
33+
The [Coordinator](/service/coordinator) service performs five main tasks:
3434

3535
1. **Receive Blocks:** Ingests blocks of transactions from the Sidecar service.
3636
2. **Manage Dependencies:** Utilizes a `Dependency Graph Manager` to construct and maintain a directed acyclic graph (DAG) of transaction dependencies.
@@ -44,7 +44,7 @@ to update the graph, and relays the status for each transaction back to the Side
4444

4545
## 3. Configuration
4646

47-
The Coordinator service requires the following configuration settings, provided in a standard YAML [configuration file](https://github.com/hyperledger/fabric-x-committer/blob/main/cmd/config/samples/coordinator.yaml):
47+
The Coordinator service requires the following configuration settings, provided in a standard YAML [configuration file](/cmd/config/samples/coordinator.yaml):
4848

4949
- *Signature Verifier Endpoints:* Address(es) of the signature verifier service node(s).
5050
- *Validator-Committer Endpoints:* Address(es) of the validator-committer service node(s).
@@ -91,14 +91,14 @@ onto the `coordinatorToDepGraphTxs` channel.
9191

9292
### Step 2. Dependency Analysis & Parallel Validation
9393

94-
The [`Dependency Graph Manager`](https://github.com/hyperledger/fabric-x-committer/tree/main/service/coordinator/dependencygraph)
94+
The [`Dependency Graph Manager`](/service/coordinator/dependencygraph)
9595
consumes transactions from the `coordinatorToDepGraphTxs` channel and builds a dependency graph. This process
9696
identifies all transactions that are "dependency-free" and can be immediately scheduled for validation. These dependency-free transaction
9797
nodes are sent to the `depGraphToSigVerifierFreeTxs` channel.
9898

9999
### Step 3. Signature Verification
100100

101-
The [`Signature Verifier Manager`](https://github.com/hyperledger/fabric-x-committer/blob/main/service/coordinator/signature_verifier_manager.go) receives dependency-free nodes from the `depGraphToSigVerifierFreeTxs` channel and acts as a load balancer,
101+
The [`Signature Verifier Manager`](/service/coordinator/signature_verifier_manager.go) receives dependency-free nodes from the `depGraphToSigVerifierFreeTxs` channel and acts as a load balancer,
102102
distributing the transactions across a pool of available `Signature Verifiers`. The manager also keeps track of all requests sent to each
103103
verifier service. If a service fails, the manager forwards any pending requests to another available service to ensure no transactions are lost.
104104
These services perform preliminary checks, including signature
@@ -109,7 +109,7 @@ are passed along to the next stage via the `sigVerifierToVCServiceValidatedTxs`
109109

110110
### Step 4. Final Validation and Commit
111111

112-
The [`Validator-Committer Manager`](https://github.com/hyperledger/fabric-x-committer/blob/main/service/coordinator/validator_committer_manager.go) receives verified transactions from the `sigVerifierToVCServiceValidatedTxs` channel and routes them to
112+
The [`Validator-Committer Manager`](/service/coordinator/validator_committer_manager.go) receives verified transactions from the `sigVerifierToVCServiceValidatedTxs` channel and routes them to
113113
available `Validator-Committer` services. The manager also keeps track of all requests sent to each verifier service. If a service fails, the manager
114114
forwards any pending requests to another available service to ensure no transactions are lost. The `Validator-Committer` services execute their own
115115
three-phase pipelined process (Prepare, Validate, Commit) to perform final MVCC checks against the database and commit the results.
@@ -125,7 +125,7 @@ to the Sidecar for final aggregation and delivery to clients.
125125

126126
### Step 6. Post-Commit Processing
127127
If a committed transaction creates or updates a namespace, a post-commit process is triggered to update the system's policies. The `Validator-Committer Manager`,
128-
in conjunction with a [`Policy Manager`](https://github.com/hyperledger/fabric-x-committer/blob/main/service/coordinator/policy_manager.go), ensures that all `Signature Verifier` services are updated with the new endorsement policy for that namespace.
128+
in conjunction with a [`Policy Manager`](/service/coordinator/policy_manager.go), ensures that all `Signature Verifier` services are updated with the new endorsement policy for that namespace.
129129
This update is not performed immediately via a separate call. Instead, for efficiency, the policy update is "piggybacked" onto the next validation
130130
request sent to each verifier. The verifier then updates its internal policy list before processing the accompanying transactions.
131131

@@ -138,11 +138,11 @@ This directed acyclic graph (DAG) ensures deterministic outcomes despite concurr
138138

139139
An edge from a later transaction ($T_j$) to an earlier transaction ($T_i$) indicates that $T_i$ must be finalized before $T_j$ can be validated. The graph tracks three types of dependencies:
140140

141-
1. **Read-Write Dependency ($T_{i}\xleftarrow{rw\mbox{(}k\mbox{)}}T_{j}$):** $T_i$ writes to key `k`, and a later transaction $T_j$ reads the *previous* version of `k`.
141+
1. **Read-Write Dependency ($T_{i}\xleftarrow{rw(k)}T_{j}$):** $T_i$ writes to key `k`, and a later transaction $T_j$ reads the *previous* version of `k`.
142142
If $T_i$ is valid, $T_j$ must be invalid because it read a stale value.
143-
2. **Write-Read Dependency ($T_{i}\xleftarrow{wr\mbox{(}k\mbox{)}}T_{j}$):** $T_i$ reads key `k`, and a later transaction $T_j$ writes to `k`. This dependency is used
143+
2. **Write-Read Dependency ($T_{i}\xleftarrow{wr(k)}T_{j}$):** $T_i$ reads key `k`, and a later transaction $T_j$ writes to `k`. This dependency is used
144144
to enforce commit order. $T_j$ cannot be committed before $T_i$ is finalized, otherwise $T_i$'s read would become stale, violating the original block order.
145-
3. **Write-Write Dependency ($T_{i}\xleftarrow{ww\mbox{(}k\mbox{)}}T_{j}$):** Both $T_i$ and $T_j$ write to the same key `k`. This dependency ensures $T_j$ is not
145+
3. **Write-Write Dependency ($T_{i}\xleftarrow{ww(k)}T_{j}$):** Both $T_i$ and $T_j$ write to the same key `k`. This dependency ensures $T_j$ is not
146146
committed before $T_i$, preventing $T_j$'s write from being overwritten and lost.
147147

148148
### B. Identifying Dependency-Free Transactions

docs/core-concurrency-pattern.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: Apache-2.0
66
# Core Concurrency Pattern
77

88
1. [errgroup - Synchronization, Error Propagation, and Context Cancellation for Goroutines](#errgroup-synchronization,-error-propagation,-and-context-cancellation-for-goroutines) - [Code](https://cs.opensource.google/go/x/sync)
9-
2. [channel - Handling Communication within and across errgroup Tasks](#handling-channel-communication-within-errgroup-tasks) - [Code](https://github.com/hyperledger/fabric-x-committer//utils/channel/channel.go)
9+
2. [channel - Handling Communication within and across errgroup Tasks](#handling-channel-communication-within-errgroup-tasks) - [Code](/utils/channel/channel.go)
1010

1111
## 1. errgroup - Synchronization, Error Propagation, and Context Cancellation for Goroutines
1212

@@ -83,7 +83,7 @@ This pattern ensures that related long-running tasks are managed as a cohesive u
8383
reliably shutting down together when any essential part fails, preventing partially
8484
functioning states.
8585

86-
Example from [https://github.com/hyperledger/fabric-x-committer/service/sidecar/relay.go](https://github.com/hyperledger/fabric-x-committer/blob/main/service/sidecar/relay.go#L64)
86+
Example from [service/sidecar/relay.go](/service/sidecar/relay.go#L64)
8787

8888
```go
8989
g, gCtx := errgroup.WithContext(stream.Context())

docs/sidecar.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ In this section, we provide an overview of each of these tasks in detail.
7474
The following code runs *Task 1* which fetches blocks from the ordering service and
7575
enqueue to `blockToBeCommitted` queues.
7676

77-
From [https://github.com/hyperledger/fabric-x-committer/blob/main/service/sidecar/sidecar.go](https://github.com/hyperledger/fabric-x-committer/service/sidecar/sidecar.go#L138)
77+
From [service/sidecar/sidecar.go](/service/sidecar/sidecar.go#L138)
7878

7979
```go
8080
g.Go(func() error {
@@ -101,7 +101,7 @@ using the IP addresses provided in the configuration. It creates an `AtomicBroad
101101
(a.k.a Orderer Client) using the `NewAtomicBroadcastClient()` function provided by the `fabric-protos-go` library
102102
(`orderer/ab.pb.go`).
103103

104-
From [https://github.com/hyperledger/fabric-protos-go/orderer/ab.pb.go](https://github.com/hyperledger/fabric-protos-go/orderer/ab.pb.go)
104+
From [hyperledger/fabric-protos-go/orderer/ab.pb.go](https://github.com/hyperledger/fabric-protos-go/blob/main/orderer/ab.pb.go)
105105
```go
106106
func NewAtomicBroadcastClient(cc grpc.ClientConnInterface) AtomicBroadcastClient {
107107
return &atomicBroadcastClient{cc}
@@ -121,7 +121,7 @@ The Sidecar calls the `Deliver()` method on the `AtomicBroadcastClient` to estab
121121
gRPC stream (`AtomicBroadcast_DeliverClient`) with the Ordering Service specifically
122122
for receiving blocks.
123123

124-
From [https://github.com/hyperledger/fabric-protos-go/orderer/ab.pb.go](https://github.com/hyperledger/fabric-protos-go/orderer/ab.pb.go)
124+
From [hyperledger/fabric-protos-go/orderer/ab.pb.go](https://github.com/hyperledger/fabric-protos-go/blob/main/orderer/ab.pb.go)
125125

126126
```go
127127
type AtomicBroadcast_DeliverClient interface {
@@ -140,7 +140,7 @@ set the start position to block `0` and the stop position to `MaxUint64`. When t
140140
restarts after a failure, it determines the next needed block number and sets the start block
141141
number accordingly. It always sets the `SeekBehavior` to `BLOCK_UNTIL_READY`.
142142

143-
From [https://github.com/hyperledger/fabric-protos-go/orderer/ab.pb.go](https://github.com/hyperledger/fabric-protos-go/orderer/ab.pb.go) (illustrative fields)
143+
From [hyperledger/fabric-protos-go/orderer/ab.pb.go](https://github.com/hyperledger/fabric-protos-go/blob/main/orderer/ab.pb.go) (illustrative fields)
144144
```go
145145
message SeekInfo {
146146
SeekPosition start = 1; // The position to start the deliver from
@@ -183,7 +183,7 @@ Sidecar responsible for relaying them to the Coordinator.
183183
The following code runs *Task 2* which relays the blocks present in
184184
`blocksToBeCommitted` to coordinator and receive statuses.
185185

186-
From [https://github.com/hyperledger/fabric-x-committer/blob/main/service/sidecar/sidecar.go](https://github.com/hyperledger/fabric-x-committer/service/sidecar/sidecar.go#L152)
186+
From [service/sidecar/sidecar.go](/service/sidecar/sidecar.go#L152)
187187
```go
188188
relayService := newRelay(c.LastCommittedBlockSetInterval, metrics)
189189
...
@@ -277,7 +277,7 @@ Subsequently, this modified block is enqueued onto the `committedBlocks` output
277277
The following code runs *Task 3* which reads blocks present in the `committedBlocks`
278278
queue and store the block in the file system.
279279

280-
From [https://github.com/hyperledger/fabric-x-committer/blob/main/service/sidecar/sidecar.go](https://github.com/hyperledger/fabric-x-committer/service/sidecar/sidecar.go#L103)
280+
From [service/sidecar/sidecar.go](/service/sidecar/sidecar.go#L103)
281281

282282
```go
283283
g.Go(func() error {
@@ -333,7 +333,7 @@ using the IP:Port on which the ledger service (the Sidecar's block delivery serv
333333
is listening. It creates a `DeliverClient` using the `NewDeliverClient()` function
334334
provided by the `fabric-protos-go`` library (`peer/events.pb.go`).
335335

336-
From [https://github.com/hyperledger/fabric-protos-go/peer/events.pb.go](https://github.com/hyperledger/fabric-protos-go/peer/events.pb.go)
336+
From [hyperledger/fabric-protos-go/peer/events.pb.go](https://github.com/hyperledger/fabric-protos-go/blob/main/peer/events.pb.go)
337337
```go
338338
func NewDeliverClient(cc grpc.ClientConnInterface) DeliverClient {
339339
return &deliverClient{cc}
@@ -354,7 +354,7 @@ From [https://github.com/hyperledger/fabric-protos-go/peer/events.pb.go](https:/
354354
The sidecarclient calls the `Deliver()` method on the `DeliverClient` to establish a
355355
gRPC stream (`Deliver_DeliverClient`) with the Sidecar for receiving blocks.
356356

357-
From [https://github.com/hyperledger/fabric-protos-go/peer/events.pb.go](https://github.com/hyperledger/fabric-protos-go/peer/events.pb.go)
357+
From [hyperledger/fabric-protos-go/peer/events.pb.go](https://github.com/hyperledger/fabric-protos-go/blob/main/peer/events.pb.go)
358358
```go
359359
type Deliver_DeliverClient interface {
360360
Send(*common.Envelope) error

docs/validator-committer.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SPDX-License-Identifier: Apache-2.0
1818

1919
## 1. Overview
2020

21-
The [Validator-Committer (VC) service](https://github.com/hyperledger/fabric-x-committer/tree/main/service/vc) is a core component responsible for the final stages of transaction processing.
21+
The [Validator-Committer (VC) service](/service/vc) is a core component responsible for the final stages of transaction processing.
2222
It operates downstream from the Coordinator, receiving batches of transactions that are internally conflict-free.
2323
This means that these conflict-free transactions do not conflict with any other active transactions being processed concurrently.
2424
Its primary function is to perform optimistic concurrency control by validating each transaction's read-set against the current state in
@@ -37,7 +37,7 @@ write to the state database, ensuring consistent data access.
3737

3838
## 3. Configuration
3939

40-
The VC service requires the following configuration settings, provided in a YAML [configuration file](https://github.com/hyperledger/fabric-x-committer/blob/main/cmd/config/samples/vcservice.yaml):
40+
The VC service requires the following configuration settings, provided in a YAML [configuration file](/cmd/config/samples/vcservice.yaml):
4141

4242
* *Database Endpoints*: Address(es) of the state database nodes that the service will connect to.
4343
* *Listen Address*: The local address and port (e.g., 0.0.0.0:7056) where the VC service will host its gRPC service, enabling
@@ -125,7 +125,7 @@ Communication among these tasks is managed by a series of internal channels:
125125
This task consumes transaction batches from the `toPrepareTxs` channel and transforms them into a structured format optimized for validation.
126126
The primary goal is to organize the reads and writes from all transactions in the batch for efficient processing in the subsequent stages.
127127

128-
**a. Dequeueing Transaction Batches:** The [preparer](https://github.com/hyperledger/fabric-x-committer/blob/main/service/vc/preparer.go) reads a batch of transactions from the `toPrepareTxs` input queue.
128+
**a. Dequeueing Transaction Batches:** The [preparer](/service/vc/preparer.go) reads a batch of transactions from the `toPrepareTxs` input queue.
129129

130130
**b. Data Structuring:** It iterates through each transaction in the batch and populates a `preparedTransactions` struct. This involves:
131131

@@ -197,7 +197,7 @@ is known from the read phase, the new version is calculated by simply incrementi
197197
This task performs the core MVCC logic. It consumes `preparedTransactions` from its input channel, checks the read-sets against the database, and
198198
filters out any transactions that are invalidated by the check.
199199

200-
**a. Dequeueing Prepared Transactions:** The [validator](https://github.com/hyperledger/fabric-x-committer/blob/main/service/vc/validator.go) reads a `preparedTransactions` object from the `preparedTxs` queue.
200+
**a. Dequeueing Prepared Transactions:** The [validator](/service/vc/validator.go) reads a `preparedTransactions` object from the `preparedTxs` queue.
201201

202202
**b. Validating Reads:** For performance, instead of fetching each key's version individually, the validator invokes a stored procedure for each namespace.
203203
This procedure takes the entire read-set for that namespace as input and performs the version validation within the database itself, returning only the
@@ -229,7 +229,7 @@ type validatedTransactions struct {
229229
This final task consumes `validatedTransactions`, performs final write preparations, commits the valid data to the database, and
230230
reports the final status of all transactions back to the Coordinator.
231231

232-
**a. Dequeueing Validated Transactions:** The [committer](https://github.com/hyperledger/fabric-x-committer/blob/main/service/vc/committer.go) reads a `validatedTransactions` object from the `validatedTxs` queue.
232+
**a. Dequeueing Validated Transactions:** The [committer](/service/vc/committer.go) reads a `validatedTransactions` object from the `validatedTxs` queue.
233233

234234
**b. Resolving Blind Writes:** Before committing, the committer must resolve the "blind writes". It fetches the current versions of keys in
235235
the `validTxBlindWrites` set from the database. This allows it to categorize each blind write as either an update to an existing key or
@@ -262,7 +262,7 @@ back to the Coordinator, completing the workflow for the transaction batch.
262262

263263
## 6. gRPC Service API
264264

265-
The VC service exposes a [gRPC API](https://github.com/hyperledger/fabric-x-committer/blob/main/service/vc/validator_committer_service.go) (`ValidationAndCommitServiceClient`) for the Coordinator and other system components. The methods are:
265+
The VC service exposes a [gRPC API](/service/vc/validator_committer_service.go) (`ValidationAndCommitServiceClient`) for the Coordinator and other system components. The methods are:
266266

267267
```go
268268
StartValidateAndCommitStream(ctx context.Context, opts ...grpc.CallOption) (ValidationAndCommitService_StartValidateAndCommitStreamClient, error)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/cenkalti/backoff/v4 v4.3.0
1111
github.com/cockroachdb/errors v1.11.3
1212
github.com/consensys/gnark-crypto v0.14.0
13-
github.com/docker/docker v27.5.1+incompatible
13+
github.com/docker/docker v28.0.0+incompatible
1414
github.com/docker/go-connections v0.5.0
1515
github.com/fsouza/go-dockerclient v1.12.0
1616
github.com/gin-gonic/gin v1.10.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
698698
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
699699
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
700700
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
701-
github.com/docker/docker v27.5.1+incompatible h1:4PYU5dnBYqRQi0294d1FBECqT9ECWeQAIfE8q4YnPY8=
702-
github.com/docker/docker v27.5.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
701+
github.com/docker/docker v28.0.0+incompatible h1:Olh0KS820sJ7nPsBKChVhk5pzqcwDR15fumfAd/p9hM=
702+
github.com/docker/docker v28.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
703703
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
704704
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
705705
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=

0 commit comments

Comments
 (0)