{"id":21713539,"url":"https://github.com/nexledger/accelerator","last_synced_at":"2025-04-12T18:46:12.668Z","repository":{"id":34150879,"uuid":"168659431","full_name":"nexledger/accelerator","owner":"nexledger","description":"Accelerating the transaction processing performance of the enterprise blockchain.","archived":false,"fork":false,"pushed_at":"2022-02-19T23:51:05.000Z","size":9092,"stargazers_count":66,"open_issues_count":6,"forks_count":24,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-26T13:04:45.494Z","etag":null,"topics":["accelerator","blockchain","caliper","fabric","hyperledger","nexledger","samsung","sds"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nexledger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-01T07:30:24.000Z","updated_at":"2024-04-09T04:11:39.000Z","dependencies_parsed_at":"2022-08-08T00:01:38.132Z","dependency_job_id":null,"html_url":"https://github.com/nexledger/accelerator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexledger%2Faccelerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexledger%2Faccelerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexledger%2Faccelerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexledger%2Faccelerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nexledger","download_url":"https://codeload.github.com/nexledger/accelerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617516,"owners_count":21134192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accelerator","blockchain","caliper","fabric","hyperledger","nexledger","samsung","sds"],"created_at":"2024-11-26T00:17:32.271Z","updated_at":"2025-04-12T18:46:12.632Z","avatar_url":"https://github.com/nexledger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexledger Accelerator\nNexledger Accelerator is a software component designed to improve the performance of a blockchain network, e.g. Hyperledger Fabric, in terms of transaction throughput. Accelerator enables the blockchain network to deal with explosive transaction requests from applications. \n\nAccelerator receives transactions from clients on behalf of blockchain nodes and provides transaction acceleration in terms of TPS (Transaction Per Second) by classifying, aggregating, and routing the transactions to blockchain network. The current version of Accelerator is compatible with Hyperledger Fabric v1.4.\n\n\n## Getting Started\n### Prerequisites\n- Go (1.11.0 or greater)\n- Docker (17.06.2-ce or greater)\n- Docker-compose (1.14.0 or greater)\n\n### Building Accelerator\nAccelerator supports go module for dependency management. To build the executable, please simply execute `go build`.\n```bash\n$ go build cmd/accelerator.go\n```\n\n## Running ping example\nThe ping example shows how to configure and run Accelerator. The example is placed in In `examples/ping`. \n\nTo bootstrap Fabric network, please run `start.sh` script. It boots up the Hyperledger Fabric network including install/instantiation of the example chaincode.\n```bash\n$ ./examples/ping/start.sh\n```\n  \nTo serve requests from clients, Accelerator should be up and running with proper configuration.\n```bash\n$ ./accelerator -f examples/ping/configs/accelerator.yaml\n```\n\nAccelerator is a gRPC server, and the gRPC services are described in `protos/accelerator.proto`.\nYou may send transactions using `examples/ping/ping_test.go` that has gRPC client for the ping example. \n```bash\n$  cd examples/ping\n$  go test\n```\n\nYou can terminate and remove the network by run `stop.sh` script.\n```bash\n(change dicrectory to root)\n$ ./examples/ping/stop.sh\n```\n\n### Under the hood\n#### Modifying chaincode\nAccelerator aggregates multiple transactions into a batched transaction and submits the batched transaction to the endorsers.\nTherefore, chaincodes operating with Accelerator should be modified to individually execute aggregated transactions.\n\n`contracts/src/ping/ping.go` is the example chaincode with simple KV write/read operations.\n`ping.go` imports `batchutil.go` for segregating batched transactions from Accelerator and delegates the invocations to `Invoke()` in `batchutil.go`.\n\n```go\nfunc (t *PingPongChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response {\n\tfnc := string(stub.GetArgs()[0])\n\tswitch fnc {\n\tcase \"ping\":\n\t\treturn Invoke(stub, t.ping)\n\tcase \"pong\":\n\t\treturn Invoke(stub, t.pong)\n\t}\n\treturn shim.Error(\"Unknown action, check the first argument, must be one of 'insert', 'query'\")\n}\n```  \n\n#### Configuring Accelerator\nAccelerator should be configured with target chaincode functions and corresponding batch configs. \nThe configuration file for `ping` example is placed at `configs/accelerator.yaml` \n```yaml\nsdk: \"examples/ping/configs/accelerator-sdk.yaml\"\nhost: \"localhost\"\nport: 8090\nuserName: \"Admin\"\norganization: \"peerorg1\"\nbatch:\n  - type: \"execute\"\n    channelId: \"accelerator\"\n    chaincodeName: \"ping\"\n    fcn: \"ping\"\n    queueSize: 1000\n    maxWaitTimeSeconds: 5\n    maxBatchItems: 10\n  - type: \"query\"\n    channelId: \"accelerator\"\n    chaincodeName: \"ping\"\n    fcn: \"pong\"\n    queueSize: 1000\n    maxWaitTimeSeconds: 5\n    maxBatchItems: 10\n```\n- `sdk`: Path to the fabric SDK configuration File\n- `host`: Host address of Accelerator\n- `port`: Port number of Accelerator\n- `queueSize`: The size of the in-memory queue that kept requested transactions until processing.\n- `maxWaitTimeSeconds`: Maximum waiting time in seconds to create a new batch transaction.\n- `maxBatchItems`: Maximum number of items for a new batch transaction. \n\n## Whitepaper\n[Whitepaper](https://github.com/nexledger/accelerator/blob/master/docs/Whitepaper-Acceleratoring%20Throughput%20in%20Permissioned%20Blockchain%20Networks.pdf) includes:\n- The key design features of Accelerator enabling high performance enterprise-wide blockchain technology\n- The evaluation results that show the performance improvement of Hyperledger Fabric by Accelerator in practical scenarios\n- The use cases that provide an insight for understanding industrial blockchain platforms\n\n## Further Information\nFor further information please contact Samsung SDS(nexledger@samsung.com).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexledger%2Faccelerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexledger%2Faccelerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexledger%2Faccelerator/lists"}