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

chore: Merge develop to main #138

Merged
merged 23 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7ea754a
chore(helm): added sanchonet
rcmorano Dec 30, 2023
89aed23
chore(helm): fix values key name
rcmorano Dec 30, 2023
19766d2
chore(helm): fix sanchonet host and protomagic
rcmorano Dec 30, 2023
0a1a4c1
chore(helm): added default values for the missing preview/mainnet net…
rcmorano Jan 12, 2024
5c4c60a
chore(helm): fix mainnet's protocolMagic
rcmorano Jan 15, 2024
970caf2
chore: Added JVM settings env variable. Rename app class
satran004 Jan 22, 2024
2e2a803
Merge pull request #113 from cardano-foundation/fix_112
Sotatek-HuyLe3a Jan 23, 2024
26e1b16
ref: #114 renames packages
Sotatek-HuyLe3a Jan 24, 2024
ee2af49
Merge pull request #115 from cardano-foundation/issue_114
Sotatek-HuyLe3a Jan 24, 2024
60c1210
fix: #119 only rollback address token balance if needed
Sotatek-HuyLe3a Jan 25, 2024
853641d
Merge pull request #121 from cardano-foundation/fix_119
Sotatek-HuyLe3a Jan 29, 2024
6efda74
chore: migrate to spring boot 3.2.2 and bump version for other depend…
Sotatek-HuyLe3a Feb 2, 2024
be0d925
Merge pull request #123 from cardano-foundation/spring-boot-migration
satran004 Feb 5, 2024
d5c9c95
Add health endpoints (#122)
Sotatek-HuyLe3a Feb 16, 2024
56240b9
Revert the changes related to jOOQ
Sotatek-HuyLe3a Feb 23, 2024
f6497da
fix: #132 change logic to save correct index_arr
Sotatek-HuyLe3a Feb 27, 2024
76ac892
chore: update unit test for TxWitnessServiceImp.java
Sotatek-HuyLe3a Feb 27, 2024
33541f3
Merge pull request #131 from cardano-foundation/rollback_changes
Sotatek-HuyLe3a Feb 29, 2024
5480a7d
Merge pull request #133 from cardano-foundation/fix_132
Sotatek-HuyLe3a Feb 29, 2024
270e023
chore: update yaci-store version
Sotatek-HuyLe3a Feb 29, 2024
6f2fbad
chore: plutus v3 changes
Sotatek-HuyLe3a Feb 29, 2024
d54aa1b
Merge pull request #134 from cardano-foundation/issue_129
Sotatek-HuyLe3a Mar 1, 2024
affdc6e
chore: #136 upgrade yaci-store version (#137)
Sotatek-HuyLe3a Mar 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Build docker image


```shell
docker build -t cardanofoundation/ledger-sync:<version> .
docker build --target ledger-sync -t cardanofoundation/ledger-sync:<version> .
```

### Docker Run
Expand Down
6 changes: 4 additions & 2 deletions application/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
plugins {
id 'org.springframework.boot' version '3.1.4'
id 'nu.studer.jooq' version '8.2'
id 'org.springframework.boot' version '3.2.2'
id 'nu.studer.jooq' version '8.2.3'
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-configuration-processor'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-jooq'
Expand Down Expand Up @@ -57,6 +58,7 @@ ext {
}

jooq {
version = '3.18.9'
configurations {
main {
generateSchemaSourceOnCompilation = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.cardanofoundation.ledgersync.explorerconsumer;
package org.cardanofoundation.ledgersync;

import jakarta.annotation.PostConstruct;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
Expand All @@ -17,15 +18,21 @@
@ComponentScan(basePackages = "org.cardanofoundation.*")
@EntityScan("org.cardanofoundation.*")
@EnableJpaRepositories("org.cardanofoundation.*")
public class ExplorerConsumerApplication {
public class LedgerSyncApplication {

static {
System.setProperty("org.jooq.no-logo", "true");
System.setProperty("org.jooq.no-tips", "true");
}

public static void main(String[] args) {
SpringApplication.run(ExplorerConsumerApplication.class, args);
SpringApplication.run(LedgerSyncApplication.class, args);
}

@PostConstruct
public void postConstruct() {
long maxMemory = Runtime.getRuntime().maxMemory();
log.info("<< Max JVM heap memory: {} MB", maxMemory / (1024 * 1024) + " >>");
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.aggregate;
package org.cardanofoundation.ledgersync.aggregate;

import com.bloxbean.cardano.client.crypto.Base58;
import lombok.AccessLevel;
Expand All @@ -8,7 +8,7 @@
import lombok.experimental.FieldDefaults;
import org.cardanofoundation.ledgersync.common.common.address.ShelleyAddress;
import org.cardanofoundation.ledgersync.common.util.HexUtil;
import org.cardanofoundation.ledgersync.explorerconsumer.constant.ConsumerConstant;
import org.cardanofoundation.ledgersync.constant.ConsumerConstant;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.aggregate;
package org.cardanofoundation.ledgersync.aggregate;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.aggregate;
package org.cardanofoundation.ledgersync.aggregate;

import lombok.AccessLevel;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.aggregate;
package org.cardanofoundation.ledgersync.aggregate;

//import org.cardanofoundation.ledgersync.common.common.AuxData;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.aggregate;
package org.cardanofoundation.ledgersync.aggregate;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.aggregate;
package org.cardanofoundation.ledgersync.aggregate;

import com.bloxbean.cardano.yaci.core.model.Amount;
import com.bloxbean.cardano.yaci.core.model.Update;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.aggregate;
package org.cardanofoundation.ledgersync.aggregate;

import com.bloxbean.cardano.yaci.core.model.TransactionInput;
import com.bloxbean.cardano.yaci.core.model.byron.ByronTxIn;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.aggregate;
package org.cardanofoundation.ledgersync.aggregate;

//import org.cardanofoundation.ledgersync.common.common.Amount;
//import org.cardanofoundation.ledgersync.common.common.Datum;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.configuration;
package org.cardanofoundation.ledgersync.configuration;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.configuration;
package org.cardanofoundation.ledgersync.configuration;

import org.jooq.conf.MappedSchema;
import org.jooq.conf.RenderMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.configuration;
package org.cardanofoundation.ledgersync.configuration;

import io.micrometer.core.aop.TimedAspect;
import io.micrometer.core.instrument.MeterRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.constant;
package org.cardanofoundation.ledgersync.constant;

import org.cardanofoundation.ledgersync.common.common.constant.Constant;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.converter;
package org.cardanofoundation.ledgersync.converter;

import co.nstant.in.cbor.model.Array;
import co.nstant.in.cbor.model.ByteString;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.converter;
package org.cardanofoundation.ledgersync.converter;

import co.nstant.in.cbor.model.Array;
import co.nstant.in.cbor.model.Map;
Expand All @@ -14,7 +14,7 @@
import java.util.List;
import java.util.stream.IntStream;

import static org.cardanofoundation.ledgersync.explorerconsumer.service.impl.genesis.GenesisDataServiceImpl.convertObjecToBigInteger;
import static org.cardanofoundation.ledgersync.service.impl.genesis.GenesisDataServiceImpl.convertObjecToBigInteger;

@UtilityClass
public class CostModelConverter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.dto;
package org.cardanofoundation.ledgersync.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.cardanofoundation.ledgersync.explorerconsumer.dto;
package org.cardanofoundation.ledgersync.dto;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.FieldDefaults;
import org.cardanofoundation.explorer.consumercommon.entity.MaTxOut;
import org.cardanofoundation.explorer.consumercommon.entity.TxOut;
import org.cardanofoundation.ledgersync.consumercommon.entity.MaTxOut;
import org.cardanofoundation.ledgersync.consumercommon.entity.TxOut;
import org.springframework.util.CollectionUtils;

import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.cardanofoundation.ledgersync.explorerconsumer.dto;
package org.cardanofoundation.ledgersync.dto;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.cardanofoundation.explorer.consumercommon.entity.*;
import org.cardanofoundation.ledgersync.consumercommon.entity.*;

import java.sql.Timestamp;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.cardanofoundation.ledgersync.explorerconsumer.dto;
package org.cardanofoundation.ledgersync.dto;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.experimental.FieldDefaults;
import org.cardanofoundation.explorer.consumercommon.entity.MaTxOut;
import org.cardanofoundation.explorer.consumercommon.entity.TxOut;
import org.cardanofoundation.ledgersync.consumercommon.entity.MaTxOut;
import org.cardanofoundation.ledgersync.consumercommon.entity.TxOut;
import org.springframework.util.MultiValueMap;


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.dto.cache;
package org.cardanofoundation.ledgersync.dto.cache;

import lombok.*;
import lombok.experimental.FieldDefaults;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.dto.cache;
package org.cardanofoundation.ledgersync.dto.cache;

import lombok.*;
import lombok.experimental.FieldDefaults;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.cardanofoundation.ledgersync.dto.healthcheck;

import lombok.*;

import java.time.LocalDateTime;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class HealthStatus {
Boolean isHealthy;
String messageCode;
String messageDesc;
LocalDateTime latestBlockInsertTime;
Boolean hasStopSlot;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.cardanofoundation.ledgersync.dto.healthcheck;

import lombok.Getter;

@Getter
public enum Message {
READY_TO_SERVE("READY_TO_SERVE", "Data is ready to serve"),
IS_NOT_SYNCING("IS_NOT_SYNCING", "Connection to node is not healthy, data is not being synchronized"),
SYNCING_BUT_NOT_READY("SYNCING_BUT_NOT_READY", "Data is being synchronized, but it isn't ready to serve yet"),
CONNECTION_HEALTHY_BUT_BLOCK_CONSUMING_NOT_HEALTHY("CONNECTION_HEALTHY_BUT_BLOCK_CONSUMING_NOT_HEALTHY",
"Connection to node is healthy, but the latest block insertion time has exceeded the threshold"),
SYNCING_HAS_FINISHED("SYNCING_HAS_FINISHED",
"Connection to node is healthy, but the latest block insertion time has exceeded the threshold");

private final String code;
private final String desc;

Message(String code, String desc) {
this.code = code;
this.desc = desc;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cardanofoundation.ledgersync.explorerconsumer.exception;
package org.cardanofoundation.ledgersync.exception;

public class HashScriptException extends RuntimeException {
public HashScriptException(Exception e) {
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading