Skip to content

Commit

Permalink
consensus.block-capacity=10000 and consensus.time-slot-duration=5000
Browse files Browse the repository at this point in the history
  • Loading branch information
physcom committed Oct 23, 2023
1 parent e9a9902 commit decdb67
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ class TransferTransactionController(
fun add(@Valid @RequestBody request: TransferTransactionRequest): TransferTransactionResponse =
TransferTransactionResponse(transactionManager.add(UnconfirmedTransferTransaction.of(request)))

@PostMapping("batch")
fun addBatch(@Valid @RequestBody requests: List<TransferTransactionRequest>): Int{
for (request in requests){
transactionManager.add(UnconfirmedTransferTransaction.of(request))
}
return requests.size
}


@CrossOrigin
@GetMapping
fun getAll(@Valid request: TransactionPageRequest): PageResponse<TransferTransactionResponse> =
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/application-chain-1.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# DATABASE
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3308/chain_1?allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.url=jdbc:h2:./db/chain_1;NON_KEYWORDS=value,key,blocks,timestamp;DATABASE_TO_UPPER=false;FILE_LOCK=NO;LOCK_TIMEOUT=10000;DB_CLOSE_DELAY=-1;MODE=MYSQL
spring.jpa.open-in-view=true
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.datasource.username=root
spring.datasource.password=123456
spring.jpa.open-in-view=true

# Logging
logging.level.io.openfuture.chain=INFO
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/application-chain-2.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# DATABASE
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3308/chain_2?allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.url=jdbc:h2:./db/chain_2;NON_KEYWORDS=value,key,blocks,timestamp;DATABASE_TO_UPPER=false;FILE_LOCK=NO;LOCK_TIMEOUT=10000;DB_CLOSE_DELAY=-1;MODE=MYSQL
spring.jpa.open-in-view=true
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.datasource.username=root
spring.datasource.password=123456
spring.jpa.open-in-view=true

# Logging
logging.level.io.openfuture.chain=INFO
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/application-chain-3.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# DATABASE
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3308/chain_3?allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.url=jdbc:h2:./db/chain_3;NON_KEYWORDS=value,key,blocks,timestamp;DATABASE_TO_UPPER=false;FILE_LOCK=NO;LOCK_TIMEOUT=10000;DB_CLOSE_DELAY=-1;MODE=MYSQL
spring.jpa.open-in-view=true
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.datasource.username=root
spring.datasource.password=123456
spring.jpa.open-in-view=true

# Logging
logging.level.io.openfuture.chain=INFO
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/application-chain-4.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# DATABASE
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3308/chain_4?allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.url=jdbc:h2:./db/chain_4;NON_KEYWORDS=value,key,blocks,timestamp;DATABASE_TO_UPPER=false;FILE_LOCK=NO;LOCK_TIMEOUT=10000;DB_CLOSE_DELAY=-1;MODE=MYSQL
spring.jpa.open-in-view=true
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.datasource.username=root
spring.datasource.password=123456
spring.jpa.open-in-view=true

# Logging
logging.level.io.openfuture.chain=INFO
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/application-chain-5.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# DATABASE
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3308/chain_5?allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.url=jdbc:h2:./db/chain_5;NON_KEYWORDS=value,key,blocks,timestamp;DATABASE_TO_UPPER=false;FILE_LOCK=NO;LOCK_TIMEOUT=10000;DB_CLOSE_DELAY=-1;MODE=MYSQL
spring.jpa.open-in-view=true
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.datasource.username=root
spring.datasource.password=123456
spring.jpa.open-in-view=true

# Logging
logging.level.io.openfuture.chain=INFO
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ node.ntp-offset-threshold=100
consensus.epoch-height=21
consensus.delegates-count=21
consensus.block-capacity=10000
consensus.time-slot-duration=50000
consensus.time-slot-interval=15000
consensus.time-slot-duration=5000
consensus.time-slot-interval=1500
consensus.genesis-address=0x0000000000000000000000000000000000000000
consensus.reward-block=10
consensus.fee-vote-tx-for=3
Expand Down

0 comments on commit decdb67

Please sign in to comment.