trialing some new grpc stuff
Some checks are pending
Some checks are pending
This commit is contained in:
parent
dc062984b3
commit
893fa2ec90
5 changed files with 300 additions and 68 deletions
133
build.gradle
133
build.gradle
|
@ -133,7 +133,8 @@ configure([project(':cli'),
|
||||||
project(':statsnode'),
|
project(':statsnode'),
|
||||||
project(':inventory'),
|
project(':inventory'),
|
||||||
project(':apitest'),
|
project(':apitest'),
|
||||||
project(':bot')]) {
|
//project(':bot')
|
||||||
|
]) {
|
||||||
|
|
||||||
apply plugin: 'application'
|
apply plugin: 'application'
|
||||||
|
|
||||||
|
@ -736,71 +737,71 @@ configure(project(':daemon')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(project(':bot')) {
|
//configure(project(':bot')) {
|
||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
// apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
apply plugin: 'application'
|
// apply plugin: 'application'
|
||||||
|
//
|
||||||
application {
|
// application {
|
||||||
mainClass = 'haveno.bot.app.HavenoBotMain'
|
// mainClass = 'haveno.bot.app.HavenoBotMain'
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
dependencies {
|
// dependencies {
|
||||||
implementation project(':proto')
|
// implementation project(':proto')
|
||||||
implementation project(':common')
|
// implementation project(':common')
|
||||||
implementation project(':p2p')
|
// implementation project(':p2p')
|
||||||
implementation project(':core')
|
// implementation project(':core')
|
||||||
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
// annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
||||||
compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
|
// compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
|
||||||
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
// compileOnly "org.projectlombok:lombok:$lombokVersion"
|
||||||
implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
// implementation "ch.qos.logback:logback-classic:$logbackVersion"
|
||||||
implementation "ch.qos.logback:logback-core:$logbackVersion"
|
// implementation "ch.qos.logback:logback-core:$logbackVersion"
|
||||||
implementation "com.google.code.gson:gson:$gsonVersion"
|
// implementation "com.google.code.gson:gson:$gsonVersion"
|
||||||
implementation "com.google.guava:guava:$guavaVersion"
|
// implementation "com.google.guava:guava:$guavaVersion"
|
||||||
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
// implementation "com.google.protobuf:protobuf-java:$protobufVersion"
|
||||||
implementation "org.apache.commons:commons-lang3:$langVersion"
|
// implementation "org.apache.commons:commons-lang3:$langVersion"
|
||||||
implementation "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
|
// implementation "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
|
||||||
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
// implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
||||||
implementation("com.github.bisq-network:bitcoinj:$bitcoinjVersion") {
|
// implementation("com.github.bisq-network:bitcoinj:$bitcoinjVersion") {
|
||||||
exclude(module: 'bcprov-jdk15on')
|
// exclude(module: 'bcprov-jdk15on')
|
||||||
exclude(module: 'guava')
|
// exclude(module: 'guava')
|
||||||
exclude(module: 'jsr305')
|
// exclude(module: 'jsr305')
|
||||||
exclude(module: 'okhttp')
|
// exclude(module: 'okhttp')
|
||||||
exclude(module: 'okio')
|
// exclude(module: 'okio')
|
||||||
exclude(module: 'protobuf-java')
|
// exclude(module: 'protobuf-java')
|
||||||
exclude(module: 'slf4j-api')
|
// exclude(module: 'slf4j-api')
|
||||||
}
|
// }
|
||||||
implementation("com.google.inject:guice:$guiceVersion") {
|
// implementation("com.google.inject:guice:$guiceVersion") {
|
||||||
exclude(module: 'guava')
|
// exclude(module: 'guava')
|
||||||
}
|
// }
|
||||||
implementation("io.grpc:grpc-protobuf:$grpcVersion") {
|
// implementation("io.grpc:grpc-protobuf:$grpcVersion") {
|
||||||
exclude(module: 'animal-sniffer-annotations')
|
// exclude(module: 'animal-sniffer-annotations')
|
||||||
exclude(module: 'guava')
|
// exclude(module: 'guava')
|
||||||
}
|
// }
|
||||||
implementation("io.grpc:grpc-stub:$grpcVersion") {
|
// implementation("io.grpc:grpc-stub:$grpcVersion") {
|
||||||
exclude(module: 'animal-sniffer-annotations')
|
// exclude(module: 'animal-sniffer-annotations')
|
||||||
exclude(module: 'guava')
|
// exclude(module: 'guava')
|
||||||
}
|
// }
|
||||||
runtimeOnly("io.grpc:grpc-netty-shaded:$grpcVersion") {
|
// runtimeOnly("io.grpc:grpc-netty-shaded:$grpcVersion") {
|
||||||
exclude(module: 'animal-sniffer-annotations')
|
// exclude(module: 'animal-sniffer-annotations')
|
||||||
exclude(module: 'guava')
|
// exclude(module: 'guava')
|
||||||
}
|
// }
|
||||||
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
// testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
||||||
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
// testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
// testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-params:$jupiterVersion"
|
// testImplementation "org.junit.jupiter:junit-jupiter-params:$jupiterVersion"
|
||||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jupiterVersion")
|
// testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jupiterVersion")
|
||||||
|
//
|
||||||
implementation("io.github.woodser:monero-java:$moneroJavaVersion") {
|
// implementation("io.github.woodser:monero-java:$moneroJavaVersion") {
|
||||||
exclude(module: 'jackson-core')
|
// exclude(module: 'jackson-core')
|
||||||
exclude(module: 'jackson-annotations')
|
// exclude(module: 'jackson-annotations')
|
||||||
exclude(module: 'jackson-databind')
|
// exclude(module: 'jackson-databind')
|
||||||
exclude(module: 'bcprov-jdk15on')
|
// exclude(module: 'bcprov-jdk15on')
|
||||||
exclude(group: 'org.slf4j', module: 'slf4j-simple')
|
// exclude(group: 'org.slf4j', module: 'slf4j-simple')
|
||||||
}
|
// }
|
||||||
implementation "org.openjfx:javafx-base:$javafxVersion:$os"
|
// implementation "org.openjfx:javafx-base:$javafxVersion:$os"
|
||||||
implementation "org.openjfx:javafx-graphics:$javafxVersion:$os"
|
// implementation "org.openjfx:javafx-graphics:$javafxVersion:$os"
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
configure(project(':inventory')) {
|
configure(project(':inventory')) {
|
||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# nodeaddress.onion:port [(@owner,@backup)] # Not an endorsment, it's a functional mainnet with no trade offers. Will be removed is mainnet trades begin to occur - MAINNET Testing purposes ONLY - Add your own seednodes in the client, DEFAULT NODES MOST BE ADDED TO FUNCTION
|
# nodeaddress.onion:port [(@owner,@backup)]
|
||||||
5i6blbmuflq4s4im6zby26a7g22oef6kyp7vbwyru6oq5e36akzo3ayd.onion:2001 (@op1)
|
5i6blbmuflq4s4im6zby26a7g22oef6kyp7vbwyru6oq5e36akzo3ayd.onion:2001 (@op1)
|
||||||
dx4ktxyiemjc354imehuaswbhqlidhy62b4ifzigk5p2rb37lxqbveqd.onion:2002 (@op2)
|
dx4ktxyiemjc354imehuaswbhqlidhy62b4ifzigk5p2rb37lxqbveqd.onion:2002 (@op2)
|
||||||
ajbqx4clnjlr7lmzoftuvpvmqafdiilidsgocvokx6bqj3okk56ccfqd.onion:2003 (@op3)
|
ajbqx4clnjlr7lmzoftuvpvmqafdiilidsgocvokx6bqj3okk56ccfqd.onion:2003 (@op3)
|
||||||
|
|
33
docker/Dockerfile.core
Normal file
33
docker/Dockerfile.core
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
FROM openjdk:21-jdk-bullseye
|
||||||
|
|
||||||
|
RUN set -ex && \
|
||||||
|
apt update && \
|
||||||
|
apt --no-install-recommends --yes install \
|
||||||
|
make \
|
||||||
|
git \
|
||||||
|
tor
|
||||||
|
|
||||||
|
RUN set -ex && adduser --system --group --disabled-password haveno && \
|
||||||
|
mkdir -p /home/haveno && \
|
||||||
|
chown -R haveno:haveno /home/haveno
|
||||||
|
|
||||||
|
USER haveno
|
||||||
|
|
||||||
|
WORKDIR /home/haveno
|
||||||
|
|
||||||
|
RUN set -ex && git clone https://git.haveno.com/haveno/haveno.git
|
||||||
|
|
||||||
|
WORKDIR /home/haveno/haveno
|
||||||
|
|
||||||
|
RUN git checkout master && \
|
||||||
|
git reset --hard
|
||||||
|
|
||||||
|
|
||||||
|
RUN make clean && make skip-tests
|
||||||
|
|
||||||
|
WORKDIR /home/haveno/haveno
|
||||||
|
|
||||||
|
ENTRYPOINT [ "./haveno-seednode" ]
|
||||||
|
|
||||||
|
## CMDs are conditional based on type
|
||||||
|
CMD ["--baseCurrencyNetwork=XMR_MAINNET", "--useLocalhostForP2P=false", "--useDevPrivilegeKeys=false", "--nodePort=2002"]
|
|
@ -1124,3 +1124,201 @@ message AddressBalanceInfo {
|
||||||
int64 num_confirmations = 3;
|
int64 num_confirmations = 3;
|
||||||
bool is_address_unused = 4;
|
bool is_address_unused = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Marketplace Protospec
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Orders
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
service Orders {
|
||||||
|
rpc GetOrder (GetOrderRequest) returns (GetOrderReply) {
|
||||||
|
}
|
||||||
|
rpc GetOrders (GetOrdersRequest) returns (GetOrdersReply) {
|
||||||
|
}
|
||||||
|
rpc MakeOrder (MakeOrderRequest) returns (MakeOrderReply) {
|
||||||
|
}
|
||||||
|
rpc ConfirmOrderAccepted (ConfirmOrderAcceptedRequest) returns (ConfirmOrderAcceptedReply) {
|
||||||
|
}
|
||||||
|
rpc ConfirmOrderProcessing (ConfirmOrderProcessingRequest) returns (ConfirmOrderProcessingReply) {
|
||||||
|
}
|
||||||
|
rpc ConfirmOrderShipped (ConfirmOrderShippedRequest) returns (ConfirmOrderShippedReply) {
|
||||||
|
}
|
||||||
|
rpc FinalizeOrder (FinalizeOrderRequest) returns (FinalizeOrderReply) {
|
||||||
|
}
|
||||||
|
rpc GetChatMessages (GetChatMessagesRequest) returns (GetChatMessagesReply) {
|
||||||
|
}
|
||||||
|
rpc SendChatMessage (SendChatMessageRequest) returns (SendChatMessageReply) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetMyOrderRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetMyOrderReply {
|
||||||
|
OrderInfo order = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetOrdersRequest {
|
||||||
|
string direction = 1;
|
||||||
|
string currency_code = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetOrdersReply {
|
||||||
|
repeated OfferInfo orders = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetMyOrdersRequest {
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetMyOrdersReply {
|
||||||
|
repeated OfferInfo orders = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MakeOrderRequest {
|
||||||
|
string currency_code = 1;
|
||||||
|
string direction = 2;
|
||||||
|
string price = 3;
|
||||||
|
bool use_market_based_price = 4;
|
||||||
|
double market_price_margin_pct = 5;
|
||||||
|
uint64 amount = 6 [jstype = JS_STRING];
|
||||||
|
uint64 min_amount = 7 [jstype = JS_STRING];
|
||||||
|
double security_deposit_pct = 8;
|
||||||
|
string trigger_price = 9;
|
||||||
|
bool reserve_exact_amount = 10;
|
||||||
|
string payment_account_id = 11;
|
||||||
|
bool is_private_order = 12;
|
||||||
|
bool buyer_as_taker_without_deposit = 13;
|
||||||
|
string extra_info = 14;
|
||||||
|
string source_order_id = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MakeOrderReply {
|
||||||
|
OrderInfo order = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CancelOrderRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CancelOrderReply {
|
||||||
|
}
|
||||||
|
|
||||||
|
message ConfirmOrderAcceptedRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ConfirmOrderAcceptedReply {
|
||||||
|
OrderInfo offer = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ConfirmOrderProcessingRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ConfirmOrderProcessingReply {
|
||||||
|
OrderInfo order = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ConfirmOrderShippedRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ConfirmOrderShippedReply {
|
||||||
|
OrderInfo order = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FinalizeOrderRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FinalizeOrderReply {
|
||||||
|
OrderInfo order = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message OrderInfo {
|
||||||
|
string id = 1;
|
||||||
|
string category = 2;
|
||||||
|
string purchase_price = 3;
|
||||||
|
bool use_market_based_price = 4;
|
||||||
|
double market_price_margin_pct = 5;
|
||||||
|
uint64 amount = 6 [jstype = JS_STRING];
|
||||||
|
uint64 quantity = 7 [jstype = JS_STRING];
|
||||||
|
double buyer_fee_pct = 8;
|
||||||
|
double seller_fee_pct = 9;
|
||||||
|
double penalty_fee_pct = 10;
|
||||||
|
double buyer_security_deposit_pct = 11;
|
||||||
|
double seller_security_deposit_pct = 12;
|
||||||
|
string max_purchase_quantity = 13;
|
||||||
|
ShippingOptionInfo shipping_option = 14;
|
||||||
|
string trigger_price = 15;
|
||||||
|
string payment_account_id = 16;
|
||||||
|
string payment_method_id = 17;
|
||||||
|
string payment_method_short_name = 18;
|
||||||
|
string base_currency_code = 19;
|
||||||
|
string seller_public_key = 20;
|
||||||
|
uint64 date = 21;
|
||||||
|
string state = 22;
|
||||||
|
bool is_activated = 23;
|
||||||
|
bool is_my_order = 24;
|
||||||
|
string store_node_address = 25;
|
||||||
|
string pub_key_ring = 26;
|
||||||
|
string version_nr = 27;
|
||||||
|
int32 protocol_version = 28;
|
||||||
|
string arbitrator_signer = 29;
|
||||||
|
string split_output_tx_hash = 30;
|
||||||
|
uint64 split_output_tx_fee = 31 [jstype = JS_STRING];
|
||||||
|
bool is_private_order = 32;
|
||||||
|
string challenge = 33;
|
||||||
|
string extra_info = 34;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetOrderRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetOrderReply {
|
||||||
|
OrderInfo order = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ShippingOptionInfo {
|
||||||
|
string id = 1;
|
||||||
|
string label = 2;
|
||||||
|
string price = 3;
|
||||||
|
StoreInfo store = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetShippingOptionRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetShippingOptionReply {
|
||||||
|
ShippingOptionInfo shipping_option = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message StoreInfo {
|
||||||
|
string id = 1;
|
||||||
|
string label = 2;
|
||||||
|
string name = 3;
|
||||||
|
bool is_active = 4;
|
||||||
|
double cost = 5;
|
||||||
|
uint64 estimated_days = 6 [jstype = JS_STRING];
|
||||||
|
uint64 quantity = 7 [jstype = JS_STRING];
|
||||||
|
StoreInfo store = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetStoreRequest {
|
||||||
|
string store_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetStoreReply {
|
||||||
|
StoreInfo store = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Products
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
@ -12,6 +12,6 @@ include 'seednode'
|
||||||
include 'statsnode'
|
include 'statsnode'
|
||||||
include 'inventory'
|
include 'inventory'
|
||||||
include 'apitest'
|
include 'apitest'
|
||||||
include 'bot'
|
//include 'bot'
|
||||||
|
|
||||||
rootProject.name = 'haveno'
|
rootProject.name = 'haveno'
|
||||||
|
|
Loading…
Reference in a new issue