主頁 > 區塊鏈 > webase1.5.3離線企業部署教程

webase1.5.3離線企業部署教程

2021-10-25 07:34:16 區塊鏈

文章目錄

  • 前言
  • 一、思路
  • 一、版本及兼容
      • WeBASE v1.5.3
  • 三、安裝步驟
    • 1.在有網路的電腦上下載相關的安裝包,如何上傳到沒有網路的服務器上
      • 1.1.下載WeBase v1.5.3相關的安裝包
      • 1.2.把下載的安裝包上傳到沒有網路的服務器中
    • 2.配置安裝WeBASE-Sign
      • 2.1.重點修改資料庫相關配置,需要提前創建好資料庫
      • 2.2.進入webase-sign的檔案夾.修改conf/application.yml
      • 2.3.給運行權限,啟動服務
    • 3.配置安裝WeBASE-Front
      • 3.1.將節點所在目錄nodes/${ip}/sdk下的所有檔案拷貝到當前conf目錄
      • 3.2.如果在企業部署中使用WeBASE-Front,必須配置下文中的keyServer,用于連接WeBASE-Sign服務
      • 3.3.給運行權限,啟動服務
      • 3.4.測驗
    • 4.配置安裝WeBASE-Node-Manager
      • 4.1.進入資料庫控制臺創建webase-node-mgr的資料庫
      • 4.2.修改/home/bcos/webase-node-mgr/script/webase.sh檔案配置如下(重點改資料庫鏈接配置):
      • 4.3.在/home/bcos/webase-node-mgr/script目錄下給權限,并執行腳本匯入資料庫檔案
      • 4.4.進入webase-node-mgr的檔案夾.修改conf/application.yml(重點修改資料庫連接配置和IP)
      • 4.5.給運行權限,啟動服務
    • 5.配置安裝WeBASE-Web
      • 5.1.WeBASE-Web是基于vue的web,所以只需配置nginx即可跑起來
      • 5.2.重啟nginx后,可以進行測驗,
  • 總結


前言

WeBASE(WeBank Blockchain Application Software Extension) 是在區塊鏈應用和FISCO-BCOS節點之間搭建的一套通用組件,圍繞交易、合約、密鑰管理,資料,可視化管理來設計各個模塊,開發者可以根據業務所需,選擇子系統進行部署,WeBASE屏蔽了區塊鏈底層的復雜度,降低開發者的門檻,大幅提高區塊鏈應用的開發效率,包含節點前置、節點管理、交易鏈路,資料匯出,Web管理平臺等子系統, WeBASE四個服務的部署架構如下圖:節點前置需要和區塊鏈節點部署在同一臺機器,簽名服務可以和節點前置分開部署,也可以同機部署;節點管理和WeBASE管理平臺可以同機部署,也可以分開部署,在企業生產環境,為了容災往往會在多個節點上部署節點前置,也會部署多個簽名服務、節點管理和WeBASE管理臺,本文主要講解如何在沒有網路的服務器中部署WeBASE,

在這里插入圖片描述


一、思路

先在在有網路的電腦上進行安裝包的下載,然后上傳至無網路的系統之中完成部署,

需要提前準備的環境(離線安裝以下環境教程點這里):

環境版本
JavaJDK8或以上版本
MySQLMySQL-5.6或以上版本
Nginxnginx1.6或以上版本(本文選擇1.17.8,不是硬性要求)

所以我們要安裝webase之前得先離線安裝上表中的環境,

一、版本及兼容

WeBASE v1.5.3

WeBASE v1.5.3 版本支持 FISCO-BCOS 2.5.x及以上版本,WeBASE 子系統推薦使用下表的版本搭配,FISCO-BCOS 推薦使用 FISCO BCOS 2.8.0版本,

WeBASE子系統名稱配套版本地址FISCO-BCOS 2.X.X
節點前置服務WeBASE-Front Release v1.5.3FISCO BCOS 2.8.0
節點管理服務WeBASE-Node-Manager Release v1.5.3FISCO BCOS 2.8.0
WeBASE管理平臺WeBASE-Web Release v1.5.3FISCO BCOS 2.8.0
簽名服務WeBASE-Sign Release v1.5.3FISCO BCOS 2.8.0
交易服務WeBASE-Transaction Release v1.4.0FISCO BCOS 2.8.0

更多兼容版本見:https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE/ChangeLOG.html

三、安裝步驟

1.在有網路的電腦上下載相關的安裝包,如何上傳到沒有網路的服務器上

PS:有的服務器可能需要用專業的防泄密盤進行傳輸

1.1.下載WeBase v1.5.3相關的安裝包

官方CDN加速下載地址:

wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.3/webase-front.zip
wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.3/webase-sign.zip
wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.3/webase-node-mgr.zip
wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.3/webase-web.zip

在這里插入圖片描述
在這里插入圖片描述
請添加圖片描述
在這里插入圖片描述

1.2.把下載的安裝包上傳到沒有網路的服務器中

在這里插入圖片描述

2.配置安裝WeBASE-Sign

2.1.重點修改資料庫相關配置,需要提前創建好資料庫

[root@localhost webase-sign]#  mysql -uroot -p
Enter password: 

mysql> create database webasesign;
Query OK, 1 row affected (0.01 sec)

2.2.進入webase-sign的檔案夾.修改conf/application.yml

server: 
  # 本工程服務埠,埠被占用則修改
  port: 5004
  context-path: /WeBASE-Sign

spring: 
  datasource: 
    # 資料庫連接資訊
    url: jdbc:mysql://127.0.0.1:3306/webasesign?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8
    # 資料庫用戶名
    username: dbUsername
    # 資料庫密碼
    password: dbPassword
    driver-class-name: com.mysql.cj.jdbc.Driver
    
constant: 
  # aes加密key(16位),如啟用,各互聯的子系統的加密key需保持一致
  aesKey: EfdsW23D23d3df43

2.3.給運行權限,啟動服務

[root@localhost webase-front]# cd ../webase-sign
[root@localhost webase-sign]# chmod +x *.sh
[root@localhost webase-sign]# ./start.sh 
===============================================================================================
Starting Server com.webank.webase.sign.Application Port 5004 ...PID(4175) [Starting]. Please check message through the log file (default path:./log/).
===============================================================================================

備注:服務行程起來后,需通過日志確認是否正常啟動,出現以下內容表示正常;如果服務出現例外,確認修改配置后,重啟提示服務行程在運行,則先執行stop.sh,再執行start.sh,

[root@localhost webase-sign]# tail -f log/WeBASE-Sign.log
2021-10-19 11:43:46.497 [main] INFO  SimpleUrlHandlerMapping() - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2021-10-19 11:43:46.986 [main] INFO  AnnotationMBeanExporter() - Registering beans for JMX exposure on startup
2021-10-19 11:43:47.003 [main] INFO  DefaultLifecycleProcessor() - Starting beans in phase 2147483647
2021-10-19 11:43:47.003 [main] INFO  DocumentationPluginsBootstrapper() - Context refreshed
2021-10-19 11:43:47.063 [main] INFO  DocumentationPluginsBootstrapper() - Found 1 custom documentation plugin(s)
2021-10-19 11:43:47.106 [main] INFO  ApiListingReferenceScanner() - Scanning for api listing references
2021-10-19 11:43:47.431 [main] INFO  ScheduledAnnotationBeanPostProcessor() - No TaskScheduler/ScheduledExecutorService bean found for scheduled processing
2021-10-19 11:43:47.546 [main] INFO  TomcatEmbeddedServletContainer() - Tomcat started on port(s): 5004 (http)
2021-10-19 11:43:47.550 [main] INFO  Application() - Started Application in 9.582 seconds (JVM running for 11.343)
2021-10-19 11:43:47.550 [main] INFO  Application() - main run success...

查看日志

全量日志:tail -f log/WeBASE-Sign.log
錯誤日志:tail -f log/WeBASE-Sign-error.log

3.配置安裝WeBASE-Front

注意: 將節點所在目錄nodes/${ip}/sdk下的所有檔案拷貝到當前conf目錄,供SDK與節點建立連接時使用(SDK會自動判斷是否為國密,且是否使用國密SSL)

  • 鏈的sdk目錄包含了ca.crt, sdk.crt, sdk.key和gm檔案夾,gm檔案夾包含了國密SSL所需的證書
  • 拷貝命令可使用cp -r nodes/${ip}/sdk/* ./conf/
  • 注,只有在建鏈時手動指定了-G(大寫)時節點才會使用國密SSL

3.1.將節點所在目錄nodes/${ip}/sdk下的所有檔案拷貝到當前conf目錄

在這里插入圖片描述
在這里插入圖片描述

3.2.如果在企業部署中使用WeBASE-Front,必須配置下文中的keyServer,用于連接WeBASE-Sign服務

修改前

# server version
version: v1.5.3

spring:
  datasource:
    url: jdbc:h2:file:../h2/webasefront;DB_CLOSE_ON_EXIT=FALSE
    databaseName: db
    driverClassName: org.h2.Driver
    serverName:
    username:
    password:
  jpa:
    database-platform: org.hibernate.dialect.H2Dialect
    database: H2
    openInView: false
    show_sql: false
    generate-ddl: true
    hibernate:
      ddl-auto: update
      naming-strategy: org.hibernate.cfg.EJB3NamingStrategy
      session:
        events:
          log: false
    properties:
      hibernate.cache.use_query_cache: false
      hibernate.generate_statistics: false
  h2:
    console:
      enabled: true
      path: /console
      settings:
        web-allow-others: false
        trace: true
  rabbitmq:
    host: 127.0.0.1
    port: 5672
    username:
    password:
    virtual-host:
    publisher-confirm: true
    ssl:
      enabled: false
  http:
    multipart:
      max-request-size: 30MB # request max size
      max-file-size: 20MB # single file size


server:
  port: 5002
  context-path: /WeBASE-Front
  connection-timeout: 30000
  tomcat:
    max-threads: 200
    max-connections: 10000

sdk:
  corePoolSize: 50
  maxPoolSize: 100
  queueCapacity: 100
  ip: 127.0.0.1
  channelPort: 20200
  certPath: conf  # cert path of relative or absolute

logging:
  config: classpath:log4j2.xml
  level:
    com.webank.webase.front: info

constant:
  keyServer: 127.0.0.1:5004 # webase-sign服務的IP:Port(單個)
  nodePath: /fisco/nodes/127.0.0.1/node0  # node's absolute path to read configuration and monitor node's log
  aesKey: EfdsW23D23d3df43
  transMaxWait: 30
  monitorDisk: /
  monitorEnabled: true
  http_read_timeOut: 100000
  http_connect_timeOut: 100000
  # event sync map task (unit: ms)
  eventRegisterTaskFixedDelay: 5000
  syncEventMapTaskFixedDelay: 60000
  # sync stat log data task (unit: ms)
  syncStatLogTime: 5000
  syncStatLogCountLimit: 10000
  statLogEnabled: false
  # get event callback wait (s)
  eventCallbackWait: 4

修改后:

# server version
version: v1.5.3

spring:
  datasource:
    url: jdbc:h2:file:../h2/webasefront;DB_CLOSE_ON_EXIT=FALSE
    databaseName: db
    driverClassName: org.h2.Driver
    serverName:
    username:
    password:
  jpa:
    database-platform: org.hibernate.dialect.H2Dialect
    database: H2
    openInView: false
    show_sql: false
    generate-ddl: true
    hibernate:
      ddl-auto: update
      naming-strategy: org.hibernate.cfg.EJB3NamingStrategy
      session:
        events:
          log: false
    properties:
      hibernate.cache.use_query_cache: false
      hibernate.generate_statistics: false
  h2:
    console:
      enabled: true
      path: /console
      settings:
        web-allow-others: false
        trace: true
  rabbitmq:
    host: 127.0.0.1
    port: 5672
    username:
    password:
    virtual-host:
    publisher-confirm: true
    ssl:
      enabled: false
  http:
    multipart:
      max-request-size: 30MB # request max size
      max-file-size: 20MB # single file size


server:
  port: 5002
  context-path: /WeBASE-Front
  connection-timeout: 30000
  tomcat:
    max-threads: 200
    max-connections: 10000

sdk:
  corePoolSize: 50
  maxPoolSize: 100
  queueCapacity: 100
  ip: 127.0.0.1
  channelPort: 20200
  certPath: conf  # cert path of relative or absolute

logging:
  config: classpath:log4j2.xml
  level:
    com.webank.webase.front: info

constant:
  keyServer: 127.0.0.1:5004 # webase-sign服務的IP:Port(單個)
  nodePath: /home/bcos/nodes/127.0.0.1/node0  # node's absolute path to read configuration and monitor node's log
  aesKey: EfdsW23D23d3df43
  transMaxWait: 30
  monitorDisk: /
  monitorEnabled: true
  http_read_timeOut: 100000
  http_connect_timeOut: 100000
  # event sync map task (unit: ms)
  eventRegisterTaskFixedDelay: 5000
  syncEventMapTaskFixedDelay: 60000
  # sync stat log data task (unit: ms)
  syncStatLogTime: 5000
  syncStatLogCountLimit: 10000
  statLogEnabled: false
  # get event callback wait (s)
  eventCallbackWait: 4

3.3.給運行權限,啟動服務

// 給運行權限
[root@localhost webase-front]# chmod +x *.sh
// 啟動服務
[root@localhost webase-front]# ./start.sh 
===============================================================================================
Server com.webank.webase.front.Application Port 5002 ...PID(3984) [Starting]. Please check message through the log file (default path:./log/).
===============================================================================================

3.4.測驗

訪問地址:http://192.168.119.132:5002/WeBASE-Front/#/home
在這里插入圖片描述
能正常顯示節點的數量說明服務正常

4.配置安裝WeBASE-Node-Manager

4.1.進入資料庫控制臺創建webase-node-mgr的資料庫

[root@localhost webase-front]#  mysql -uroot -p
Enter password: 

mysql> create database nodemgr;
Query OK, 1 row affected (0.01 sec)

4.2.修改/home/bcos/webase-node-mgr/script/webase.sh檔案配置如下(重點改資料庫鏈接配置):

#!/usr/bin/env bash


echo -e "\n init start...."

IP=${1}
PORT=${2}

if [[ ! $IP || ! $PORT ]] ; then
    echo "Usage: sh ${0} ip port"
    echo "eg: sh ${0} 127.0.0.1 8501"
    exit 1
fi

#dbUser
DBUSER="defaultAccount"
#dbPass
PASSWD="defaultPassword"
#dbName
DBNAME="webasenodemanager"


#connect to database then execute init
cat webase-sql.list | mysql --user=$DBUSER --password=$PASSWD --host=$IP --database=$DBNAME --port=$PORT --default-character-set=utf8;

if [ "$?" == "0" ]; then
    echo -e "init success... \n"
else
    echo -e "init fail... \n"
fi

exit

4.3.在/home/bcos/webase-node-mgr/script目錄下給權限,并執行腳本匯入資料庫檔案

[root@localhost webase-node-mgr]# cd script/
[root@localhost script]# ls
deploy  upgrade  webase-ddl.sql  webase-dml.sql  webase.sh  webase-sql.list
[root@localhost script]# chmod +x *.sh

[root@localhost script]# ./webase.sh 127.0.0.1 3306
 init start....
mysql: [Warning] Using a password on the command line interface can be insecure.
init success... 
[root@localhost script]# 

4.4.進入webase-node-mgr的檔案夾.修改conf/application.yml(重點修改資料庫連接配置和IP)

# server version
version: v1.5.3

#server config
server:
  port: 5001
  servlet:
    context-path: /WeBASE-Node-Manager


#mybatis config
mybatis:
  configuration:
    map-underscore-to-camel-case: true
  typeAliasesPackage: com.webank.webase.node.mgr
  mapperLocations: classpath:mapper/*.xml


# database connection configuration
spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/nodemanagerdb?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
    username: nodemanagerdb
    password: irsHBjmMJ74W3ryk
    initialSize: 10
    minIdle: 5
    maxActive: 30

  aop:
    proxy-target-class: true

#log config
logging:
  config: classpath:log/log4j2.xml
  level:
    com.webank.webase.node.mgr: info

#constants
constant:
  ###http request
  # login's authorization whether enable, if false, default login as `admin` account
  isUseSecurity: true
  # verification code expire time (s)
  verificationCodeMaxAge: 300
  # if disabled as false, code would be constant value
  enableVerificationCode: true
  # verification code constant value, only when enableVerificationCode is false works
  verificationCodeValue: "8888"
  # auth token code expire time (s)
  authTokenMaxAge: 3600
  ignoreCheckFront: /account/login,/account/pictureCheckCode,/login,/user/privateKey,/front/new,/front/find,,/group/generate,/group/start
  ###front http request
  frontUrl: http://%1s:%2d/WeBASE-Front/%3s
  httpTimeOut: 5000
  contractDeployTimeOut: 30000
  isPrivateKeyEncrypt: true
  maxRequestFail: 3
  sleepWhenHttpMaxFail: 60000

  ###common
  developerModeEnable: true
  deployedModifyEnable: true
  isDeleteInfo: true
  transRetainMax: 10000
  deleteInfoCron: "0 0/1 * * * ?"
  statisticsTransDailyCron: "0 0/1 * * * ?"
  resetGroupListCycle: 600000
  groupInvalidGrayscaleValue: 1M    # y:year, M:month, d:day of month, h:hour, m:minute, n:forever valid
  notSupportFrontIp:
  
  ###application integration
  # app request timestamp timeout (ms)
  appRequestTimeOut: 300000
  appStatusCheckCycle: 3000

  ###block info (pulling data from chain)
  isBlockPullFromZero: false
  pullBlockInitCnts: 1000
  pullBlockSleepTime: 200
  pullBlockTaskFixedDelay: 30000
  blockRetainMax: 10000
  ###transaction monitor
  transMonitorTaskFixedRate: 60000  #How long does it take to start the next task after the end (second)
  analysisSleepTime: 200
  monitorInfoRetainMax: 10000
  isMonitorIgnoreUser: false
  isMonitorIgnoreContract: false
  monitorUnusualMaxCount: 20
  ###alert mail monitor task interval: 5mins unit: ms
  auditMonitorTaskFixedDelay: 300000
  nodeStatusMonitorTaskFixedDelay: 60000  #must larger than @pullBlockTaskFixedDelay
  certMonitorTaskFixedDelay: 300000
  permitUrlArray: /account/login,/account/pictureCheckCode,/login,/user/privateKey/**,/config/encrypt,/config/version,/front/refresh,/api/*
  ###interval to async refresh group list locally
  resetGroupListInterval: 15000
  ###interval block statistic, unit: ms
  statBlockRetainMax: 100000
  statBlockFixedDelay: 10000
  statBlockPageSize: 20 # block stat data to pull in one time
  enableExternalFromBlock: true # enable record account and contract from block

  #### 1.4.0 visual deploy
  #### deployType 部署方式:
  # 0, 先使用 build_chain.sh 部署鏈并啟用 WeBASE-Front 服務,然后手動添加前置; 
  # 1, 使用可視化部署, 需要參考WeBASE檔案填寫下面引數
  deployType: 0
  #### if deployType = 0, ignore below properties ####
  # 鏡像名
  dockerRepository: "fiscoorg/fisco-webase"
  # WeBASE-Sign 訪問地址,供節點前置訪問,不能填寫localhost或127.0.0.1
  webaseSignAddress: "127.0.0.1:5004"
  # 可視化操作的后臺超時時間 (unit: ms),若機器較慢,可動態設定超時時間
  execDockerCheckTimeout: 55000
  execHostCheckTimeout: 55000
  execHostCheckPortTimeout: 50000
  execHostInitTimeout: 300000
  execHostConfigTimeout: 40000
  execBuildChainTimeout: 40000
  dockerRestartPeriodTime: 30000
  execShellTimeout: 600000
  execScpTimeout: 10000
  execAddNodeTimeout: 40000
  # runDockerSleepTime: 600000
  #### if deployType = 0, ignore upper properties ####

sdk:
  # 加密型別:0: 非國密;  1: 國密
  ## 可視化部署時,此配置將決定部署國密或非國密鏈
  ## 國密與非國密鏈的私鑰、合約資料不兼容
  encryptType: 0

# executor config for async pulling data from chain
executor:
  corePoolSize: 10
  maxPoolSize: 20
  queueSize: 50
  threadNamePrefix: "node-mgr-async-"

# scheduler config for sync scheduled task
scheduler:
  poolSize: 30
  threadNamePrefix: "node-mgr-task-"
  awaitTerminationSeconds: 600
  waitForTasksToCompleteOnShutdown: true

4.5.給運行權限,啟動服務

[root@localhost webase-node-mgr]# chmod +x *.sh
[root@localhost webase-node-mgr]# ./start.sh 
===============================================================================================
Server com.webank.webase.node.mgr.Application Port 5001 ...PID(4353) [Starting]. Please message check through the log file (default path:./log/).
===============================================================================================

備注:服務行程起來后,需通過日志確認是否正常啟動,出現以下內容表示正常;如果服務出現例外,確認修改配置后,重啟提示服務行程在運行,則先執行stop.sh,再執行start.sh,

Application() - main run success.

查看日志

全量日志:tail -f log/WeBASE-Node-Manager.log
錯誤日志:tail -f log/WeBASE-Node-Manager-error.log

5.配置安裝WeBASE-Web

5.1.WeBASE-Web是基于vue的web,所以只需配置nginx即可跑起來

PS: 因為我們的服務器已有nginx,可在原組態檔nginx.conf增加一個server:

upstream node_mgr_server{
    server 192.168.119.132:5001; # 節點管理服務ip和埠
}

server {
    listen       5000 default_server; # 前端埠(埠需要開通策略且不能被占用)
    server_name  192.168.119.132;           # 服務器ip,也可配置為域名
    location / {
            root   /home/bcos/webase-web;   # 前端檔案路徑(檔案需要有權限訪問)
            index  index.html index.htm;
            try_files $uri $uri/ /index.html =404;
    }

    location /mgr {
                proxy_pass    http://node_mgr_server/;    		
                proxy_set_header		Host			 $host;
                proxy_set_header		X-Real-IP		 $remote_addr;
                proxy_set_header		X-Forwarded-For	 $proxy_add_x_forwarded_for;
    }
}

5.2.重啟nginx后,可以進行測驗,

訪問http://192.168.119.132:5000/#/home

在這里插入圖片描述
默認用戶名:admin
默認密碼:Abcd1234

在這里插入圖片描述
檢查后發現正常,后續配置相關配置即可,本文重點是離線安裝而不是配置,所以不做過多的演示!
有需要的可以參考官方的檔案:https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE-Console-Suit/index.html#id16


總結

無網路離線安裝部署FISCO BCOS 中間件webase平臺,還是比較簡單 ,大家可以安裝教程一步一步的操作,希望可以幫助有需要的小伙伴快速入坑!

轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/335257.html

標籤:區塊鏈

上一篇:監聽Solidity合約事件

下一篇:如何將串列插入到特定位置的串列中?

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • JAVA使用 web3j 進行token轉賬

    最近新學習了下區塊鏈這方面的知識,所學不多,給大家分享下。 # 1. 關于web3j web3j是一個高度模塊化,反應性,型別安全的Java和Android庫,用于與智能合約配合并與以太坊網路上的客戶端(節點)集成。 # 2. 準備作業 jdk版本1.8 引入maven <dependency> < ......

    uj5u.com 2020-09-10 03:03:06 more
  • 以太坊智能合約開發框架Truffle

    前言 部署智能合約有多種方式,命令列的瀏覽器的渠道都有,但往往跟我們程式員的風格不太相符,因為我們習慣了在IDE里寫了代碼然后打包運行看效果。 雖然現在IDE中已經存在了Solidity插件,可以撰寫智能合約,但是部署智能合約卻要另走他路,沒辦法進行一個快捷的部署與測驗。 如果團隊管理的區塊節點多、 ......

    uj5u.com 2020-09-10 03:03:12 more
  • 谷歌二次驗證碼成為區塊鏈專用安全碼,你怎么看?

    前言 谷歌身份驗證器,前些年大家都比較陌生,但隨著國內互聯網安全的加強,它越來越多地出現在大家的視野中。 比較廣泛接觸的人群是國際3A游戲愛好者,游戲盜號現象嚴重+國外賬號安全應用廣泛,這類游戲一般都會要求用戶系結名為“兩步驗證”、“雙重驗證”等,平臺一般都推薦用谷歌身份驗證器。 后來區塊鏈業務風靡 ......

    uj5u.com 2020-09-10 03:03:17 more
  • 密碼學DAY1

    目錄 ##1.1 密碼學基本概念 密碼在我們的生活中有著重要的作用,那么密碼究竟來自何方,為何會產生呢? 密碼學是網路安全、資訊安全、區塊鏈等產品的基礎,常見的非對稱加密、對稱加密、散列函式等,都屬于密碼學范疇。 密碼學有數千年的歷史,從最開始的替換法到如今的非對稱加密演算法,經歷了古典密碼學,近代密 ......

    uj5u.com 2020-09-10 03:03:50 more
  • 密碼學DAY1_02

    目錄 ##1.1 ASCII編碼 ASCII(American Standard Code for Information Interchange,美國資訊交換標準代碼)是基于拉丁字母的一套電腦編碼系統,主要用于顯示現代英語和其他西歐語言。它是現今最通用的單位元組編碼系統,并等同于國際標準ISO/IE ......

    uj5u.com 2020-09-10 03:04:50 more
  • 密碼學DAY2

    ##1.1 加密模式 加密模式:https://docs.oracle.com/javase/8/docs/api/javax/crypto/Cipher.html ECB ECB : Electronic codebook, 電子密碼本. 需要加密的訊息按照塊密碼的塊大小被分為數個塊,并對每個塊進 ......

    uj5u.com 2020-09-10 03:05:42 more
  • NTP時鐘服務器的特點(京準電子)

    NTP時鐘服務器的特點(京準電子) NTP時鐘服務器的特點(京準電子) 京準電子官V——ahjzsz 首先對時間同步進行了背景介紹,然后討論了不同的時間同步網路技術,最后指出了建立全球或區域時間同步網存在的問題。 一、概 述 在通信領域,“同步”概念是指頻率的同步,即網路各個節點的時鐘頻率和相位同步 ......

    uj5u.com 2020-09-10 03:05:47 more
  • 標準化考場時鐘同步系統推進智能化校園建設

    標準化考場時鐘同步系統推進智能化校園建設 標準化考場時鐘同步系統推進智能化校園建設 安徽京準電子科技官微——ahjzsz 一、背景概述隨著教育事業的快速發展,學校建設如雨后春筍,隨之而來的學校教育、管理、安全方面的問題成了學校管理人員面臨的最大的挑戰,這些問題同時也是學生家長所擔心的。為了讓學生有更 ......

    uj5u.com 2020-09-10 03:05:51 more
  • 位元幣入門

    引言 位元幣基本結構 位元幣基礎知識 1)哈希演算法 2)非對稱加密技術 3)數字簽名 4)MerkleTree 5)哪有位元幣,有的是UTXO 6)位元幣挖礦與共識 7)區塊驗證(共識) 總結 引言 上一篇我們已經知道了什么是區塊鏈,此篇說一下區塊鏈的第一個應用——位元幣。其實先有位元幣,后有的區塊 ......

    uj5u.com 2020-09-10 03:06:15 more
  • 北斗對時服務器(北斗對時設備)電力系統應用

    北斗對時服務器(北斗對時設備)電力系統應用 北斗對時服務器(北斗對時設備)電力系統應用 京準電子科技官微(ahjzsz) 中國北斗衛星導航系統(英文名稱:BeiDou Navigation Satellite System,簡稱BDS),因為是目前世界范圍內唯一可以大面積提供免費定位服務的系統,所以 ......

    uj5u.com 2020-09-10 03:06:20 more
最新发布
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:46:47 more
  • Hyperledger Fabric 使用 CouchDB 和復雜智能合約開發

    在上個實驗中,我們已經實作了簡單智能合約實作及客戶端開發,但該實驗中智能合約只有基礎的增刪改查功能,且其中的資料管理功能與傳統 MySQL 比相差甚遠。本文將在前面實驗的基礎上,將 Hyperledger Fabric 的默認資料庫支持 LevelDB 改為 CouchDB 模式,以實作更復雜的資料... ......

    uj5u.com 2023-04-16 07:28:31 more
  • .NET Core 波場鏈離線簽名、廣播交易(發送 TRX和USDT)筆記

    Get Started NuGet You can run the following command to install the Tron.Wallet.Net in your project. PM> Install-Package Tron.Wallet.Net 配置 public reco ......

    uj5u.com 2023-04-14 08:08:00 more
  • DKP 黑客分析——不正確的代幣對比率計算

    概述: 2023 年 2 月 8 日,針對 DKP 協議的閃電貸攻擊導致該協議的用戶損失了 8 萬美元,因為 execute() 函式取決于 USDT-DKP 對中兩種代幣的余額比率。 智能合約黑客概述: 攻擊者的交易:0x0c850f,0x2d31 攻擊者地址:0xF38 利用合同:0xf34ad ......

    uj5u.com 2023-04-07 07:46:09 more
  • Defi開發簡介

    Defi開發簡介 介紹 Defi是去中心化金融的縮寫, 是一項旨在利用區塊鏈技術和智能合約創建更加開放,可訪問和透明的金融體系的運動. 這與傳統金融形成鮮明對比,傳統金融通常由少數大型銀行和金融機構控制 在Defi的世界里,用戶可以直接從他們的電腦或移動設備上訪問廣泛的金融服務,而不需要像銀行或者信 ......

    uj5u.com 2023-04-05 08:01:34 more
  • solidity簡單的ERC20代幣實作

    // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; import "hardhat/console.sol"; //ERC20 同質化代幣,每個代幣的本質或性質都是相同 //ETH 是原生代幣,它不是ERC20代幣, ......

    uj5u.com 2023-03-21 07:56:29 more
  • solidity 參考型別修飾符memory、calldata與storage 常量修飾符C

    在solidity語言中 參考型別修飾符(參考型別為存盤空間不固定的數值型別) memory、calldata與storage,它們只能修飾參考型別變數,比如字串、陣列、位元組等... memory 適用于方法傳參、返參或在方法體內使用,使用完就會清除掉,釋放記憶體 calldata 僅適用于方法傳參 ......

    uj5u.com 2023-03-08 07:57:54 more
  • solidity注解標簽

    在solidity語言中 注釋符為// 注解符為/* 內容*/ 或者 是 ///內容 注解中含有這幾個標簽給予我們使用 @title 一個應該描述合約/介面的標題 contract, library, interface @author 作者的名字 contract, library, interf ......

    uj5u.com 2023-03-08 07:57:49 more
  • 評價指標:相似度、GAS消耗

    【代碼注釋自動生成方法綜述】 這些評測指標主要來自機器翻譯和文本總結等研究領域,可以評估候選文本(即基于代碼注釋自動方法而生成)和參考文本(即基于手工方式而生成)的相似度. BLEU指標^[^?88^^?^]^:其全稱是bilingual evaluation understudy.該指標是最早用于 ......

    uj5u.com 2023-02-23 07:27:39 more
  • 基于NOSTR協議的“公有制”版本的Twitter,去中心化社交軟體Damus

    最近,一個幽靈,Web3的幽靈,在網路游蕩,它叫Damus,這玩意詮釋了什么叫做病毒式營銷,滑稽的是,一個Web3產品卻在Web2的產品鏈上瘋狂傳銷,各方大佬紛紛為其背書,到底發生了什么?Damus的葫蘆里,賣的是什么藥? 注冊和簡單實用 很少有什么產品在用戶注冊環節會有什么噱頭,但Damus確實出 ......

    uj5u.com 2023-02-05 06:48:39 more