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

trigger build #611

Draft
wants to merge 105 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
82b9729
Test backend CI against core with relic dependency.
mattfoley8 Apr 7, 2023
6834066
Checkout specific branch just for testing purposes.
mattfoley8 Apr 7, 2023
6a65766
Update test Dockerfile.
mattfoley8 Jun 1, 2023
6fca7de
Merge branch 'main' into mf/add-bls-signature-utils
mattfoley8 Jun 1, 2023
5428fa7
Fix failing build stages.
mattfoley8 Jun 2, 2023
67ee851
Merge branch 'main' into mf/add-bls-signature-utils
mattfoley8 Jun 9, 2023
cc55761
Add new deps.
mattfoley8 Jun 12, 2023
06c8c36
Allow ParamUpdater to update PoS consensus params (#499)
mattfoley8 Jun 13, 2023
898b8aa
Mf/add validator registration endpoints (#500)
mattfoley8 Jun 13, 2023
cf62ed0
Add relic dependency to prod dockerfile.
mattfoley8 Jun 14, 2023
23a9171
Merge mf/add-bls-signature-utils. Resolve conflicts.
mattfoley8 Jun 14, 2023
32e6c56
Mf/add get validator by public key endpoint (#501)
mattfoley8 Jun 14, 2023
1f88c52
Rename VotingPublicKeySignature to VotingAuthorization. (#502)
mattfoley8 Jun 15, 2023
a64baa6
Refactor merging GlobalParamsEntry defaults. (#503)
mattfoley8 Jun 19, 2023
ea9c5d5
Update test.Dockerfile core branch. (#504)
mattfoley8 Jun 26, 2023
c40453c
Initial backend updates to conform to new function signatures in core…
lazynina Dec 5, 2023
f045518
Update backend to use BackendMempool interface instead of DeSoMempool…
lazynina Dec 5, 2023
f3932da
Add fee estimator arg to all txn construction calls (#514)
lazynina Dec 13, 2023
4bf1f10
merge main into feature pos (#519)
lazynina Jan 5, 2024
e392f7f
Remove fee estimator from txn construction calls (#520)
lazynina Jan 5, 2024
c70fa5c
Fix compilation errors (#521)
lazynina Jan 5, 2024
753f14d
Fix validator test (#522)
lazynina Jan 5, 2024
43493e3
Add DelegatedStakeCommissionBasisPoints to RegisterAsValidator txn co…
lazynina Jan 5, 2024
c5f420c
Add stake, unstake, and unlock stake txn construction endpoints (#524)
lazynina Jan 23, 2024
6b5ddf3
Add GET endpoints for stake and locked stake entries (#525)
lazynina Jan 23, 2024
36ec3e6
Merge branch 'main' into feature/proof-of-stake
lazynina Jan 24, 2024
91b9b8c
Add spending limits backend support for stake, unstake, unlock stake …
lazynina Jan 24, 2024
0cf96c1
Update Block Header Timestamps to int64 (#535)
tholonious Jan 31, 2024
c11ca20
Fix Backend To Run With Regtest PoS Node (#536)
tholonious Feb 2, 2024
734d12e
Add txn construction and get endpoints for lockups (#526)
lazynina Feb 2, 2024
7151d33
Add Unjail Validator endpoint (#532)
lazynina Feb 2, 2024
698a0bf
feature/pos-syncing-and-steady-state (#537)
tholonious Feb 7, 2024
e3d9a48
Fix compile error
tholonious Feb 7, 2024
8bf9ca7
Fix CI (#540)
tholonious Feb 8, 2024
e736361
Only set public keys if not the zero pkid (#533)
lazynina Feb 12, 2024
b33a0ab
Level 2 glog for price fetching logic (#541)
lazynina Feb 13, 2024
e0fe755
Remove datadir deletion from n0_test
tholonious Feb 14, 2024
91f7302
Update miner to pass params into RecomputeBlockRewardWithBlockRewardO…
lazynina Feb 15, 2024
0345c2e
feature/pos-networking-and-syncing (#556)
tholonious Mar 20, 2024
ee11a92
Merge branch 'main' into feature/proof-of-stake
tholonious Mar 20, 2024
53d53af
Update usages of EnumerateKeysForPrefix (#559)
lazynina Mar 21, 2024
6e0c3b8
Remove relic tag from validator test (#561)
lazynina Mar 21, 2024
42462cd
Allow orphans in block index (#567)
lazynina Mar 28, 2024
782ff5e
Fix max block size logic (#568)
lazynina Mar 29, 2024
5efbb3f
Empty commit to trigger CI
tholonious Mar 29, 2024
1c65e5f
Upgrade Badger version (#566)
diamondhands0 Apr 1, 2024
993b149
Fix Update global params tests (#571)
lazynina Apr 1, 2024
38c3cf7
trigger build (#572)
lazynina Apr 2, 2024
c323715
trigger build (#573)
lazynina Apr 2, 2024
323b8bd
trigger build (#574)
lazynina Apr 2, 2024
5e71daf
Empty commit to trigger CI
tholonious Apr 3, 2024
99e2e4a
bls pub key enhancements build (#576)
lazynina Apr 4, 2024
eb8bc22
allow txn relay in needs blocks build (#577)
lazynina Apr 4, 2024
c7c9a78
fix txn relay pos check build (#578)
lazynina Apr 4, 2024
01cff1f
Empty commit to trigger CI
tholonious Apr 4, 2024
998a1b6
Fix backend CI
tholonious Apr 4, 2024
08039b7
Use GetCurrentGlobalParamsEntry instead of GlobalParamsEntry (#580)
lazynina Apr 5, 2024
b93bb61
Empty commit for CI
tholonious Apr 5, 2024
e118401
Empty commit for CI
tholonious Apr 5, 2024
7573790
Atomic Transaction Support for Backend (#560)
poolcoke Apr 9, 2024
61ea638
Update usage of CreateAtomicTxnsWrapper (#581)
lazynina Apr 9, 2024
001661c
Add a Preceding Transaction Field to Transaction Endpoints. (#570)
poolcoke Apr 9, 2024
d2134ea
Add all new global params attributes to update global params txn cons…
lazynina Apr 9, 2024
911df1c
Trigger CI
tholonious Apr 9, 2024
9aa87a8
Add get committed tip info endpoint (#582)
lazynina Apr 9, 2024
de2e701
Trigger CI
tholonious Apr 9, 2024
df0500b
Empty commit for CI
tholonious Apr 9, 2024
4bcee2d
Update node info endpoint to return info about connections to validat…
lazynina Apr 11, 2024
53adfee
Upgrade go to 1.22 (#585)
lazynina Apr 11, 2024
9f10808
Upgrade deps (#569)
lazynina Apr 11, 2024
254a9ca
Empty commit for CI
tholonious Apr 11, 2024
cec7df9
Fix remote node to response (#587)
lazynina Apr 11, 2024
0f202c4
trigger build 04-11-24 (#588)
lazynina Apr 12, 2024
d50b28a
Empty commit to trigger CI
tholonious Apr 12, 2024
758d4f8
Block until read only view regenerates in afterProcessSubmitPostTrans…
lazynina Apr 12, 2024
15dcd32
Add LatestView to CheckpointBlockInfo endpoint (#589)
lazynina Apr 12, 2024
5db55b6
Empty trigger for CI
tholonious Apr 12, 2024
2918414
Empty commit to trigger CI
tholonious Apr 12, 2024
f8323c2
Empty commit to trigger CI
tholonious Apr 13, 2024
4ae79d7
Update usage of EstimateFeeRate (#592)
lazynina Apr 16, 2024
cb4acd9
Submit atomic transactions endpoint. (#594)
poolcoke Apr 16, 2024
cc9870b
Empty commit to trigger CI
tholonious Apr 16, 2024
a62423c
Make utxo ops nil on APITransactionToResponse for inner txns (#595)
lazynina Apr 17, 2024
e19e7ef
Empty commit to trigger CI
tholonious Apr 18, 2024
fca75d3
Empty commit to CI
tholonious Apr 18, 2024
e83b021
Add Script To Make Global Params Changes on Regtest Node (#597)
tholonious Apr 19, 2024
e06af2d
trigger build 041924 (#599)
lazynina Apr 19, 2024
20c5e08
Fix update_glboal_params package
tholonious Apr 19, 2024
b56c242
Merge branch 'main' into feature/proof-of-stake
lazynina Apr 22, 2024
5f3bae3
Support MinFeeRateNanosPerKB in atomic txn construction (#602)
lazynina Apr 22, 2024
ed304f6
update call site for EstimateFeeRate (#603)
lazynina Apr 23, 2024
1a29706
trigger build 042324
lazynina Apr 23, 2024
3ce33b5
trigger build 042324
lazynina Apr 23, 2024
7da2699
Gracefully Handle RemoteNode Response When Peer Is Not a Registered V…
tholonious Apr 23, 2024
5b073a4
Empty commit to trigger CI
tholonious Apr 23, 2024
89f1e50
Empty commit to trigger CI
tholonious Apr 23, 2024
30095a2
Gracefully Handle Nil Peer in RemoteNodeToResponse (#605)
tholonious Apr 24, 2024
a64e6f1
Empty commit to trigger CI
tholonious Apr 24, 2024
f743062
Fix panic in get block template (#606)
lazynina Apr 25, 2024
139b949
Empty commit to trigger CI
tholonious Apr 25, 2024
d33ed31
Fix Failing Unit Tests (#607)
tholonious Apr 25, 2024
00709df
Add simple status check for node to backend (#608)
diamondhands0 Apr 26, 2024
90fc2e0
Upgrades to support DeSo AMMs and CCV2 (#609)
diamondhands0 Apr 29, 2024
927e7ee
Add GetDaoCaoinLimitOrdersById (#610)
lazynina Apr 29, 2024
e55f414
trigger build
lazynina Apr 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
go-version: "1.22"

- name: Checkout branch
uses: actions/checkout@v3
Expand All @@ -32,7 +32,7 @@ jobs:
# - name: Install go
# uses: actions/setup-go@v3
# with:
# go-version: "1.20"
# go-version: "1.22"
#
# - name: Install os dependencies
# run: sudo apt-get install -y libvips-tools libvips-dev && vips -v
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ local_scripts/*
backend

.idea
.vscode
mem.log

__debug_*
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ FROM alpine:latest AS backend

RUN apk update
RUN apk upgrade
RUN apk add --update go gcc g++ vips-dev
RUN apk add --update bash cmake g++ gcc git make vips-dev

COPY --from=golang:1.22-alpine /usr/local/go/ /usr/local/go/
ENV PATH="/usr/local/go/bin:${PATH}"

WORKDIR /deso/src

Expand All @@ -25,10 +28,13 @@ COPY backend/countries countries
COPY backend/main.go .

# include core src
COPY core/desohash ../core/desohash
COPY core/cmd ../core/cmd
COPY core/lib ../core/lib
COPY core/migrate ../core/migrate
COPY core/bls ../core/bls
COPY core/cmd ../core/cmd
COPY core/collections ../core/collections
COPY core/consensus ../core/consensus
COPY core/desohash ../core/desohash
COPY core/lib ../core/lib
COPY core/migrate ../core/migrate

# Install Delve debugger, specifying the installation path explicitly
ENV GOPATH=/root/go
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,15 @@ go build github.com/h2non/bimg: invalid flag in pkg-config --cflags: -Xpreproces
```
export CGO_CFLAGS_ALLOW="-Xpreprocessor"
```

#### Error
```
ld: library not found for -lvips
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

#### Solution

```
go clean -cache
```
15 changes: 8 additions & 7 deletions apis/eth_price.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/golang/glog"
"github.com/montanaflynn/stats"
"io/ioutil"
"net/http"
"strconv"

"github.com/golang/glog"
"github.com/montanaflynn/stats"
)

type CoinbaseResponse struct {
Expand Down Expand Up @@ -194,7 +195,7 @@ func GetUSDToETHPrice() (float64, error) {
amount, err := getCoinbasePrice()
if err != nil {
// The amount will be zero in this case, which is fine
glog.Errorf("Error fetching Coinbase price: %v", err)
glog.V(2).Infof("Error fetching Coinbase price: %v", err)
}

if amount != 0 {
Expand All @@ -205,7 +206,7 @@ func GetUSDToETHPrice() (float64, error) {
amount, err := getCoingeckoPrice()
if err != nil {
// The amount will be zero in this case, which is fine
glog.Errorf("Error fetching Coingecko price: %v", err)
glog.V(2).Infof("Error fetching Coingecko price: %v", err)
}

if amount != 0 {
Expand All @@ -216,7 +217,7 @@ func GetUSDToETHPrice() (float64, error) {
amount, err := getBlockchainDotcomPrice()
if err != nil {
// The amount will be zero in this case, which is fine
glog.Errorf("Error fetching blockchain.com price: %v", err)
glog.V(2).Infof("Error fetching blockchain.com price: %v", err)
}

if amount != 0 {
Expand All @@ -227,7 +228,7 @@ func GetUSDToETHPrice() (float64, error) {
amount, err := getGeminiPrice()
if err != nil {
// The amount will be zero in this case, which is fine
glog.Errorf("Error fetching Gemini price: %v", err)
glog.V(2).Infof("Error fetching Gemini price: %v", err)
}

if amount != 0 {
Expand All @@ -238,7 +239,7 @@ func GetUSDToETHPrice() (float64, error) {
amount, err := getKrakenPrice()
if err != nil {
// The amount will be zero in this case, which is fine
glog.Errorf("Error fetching Kraken price: %v", err)
glog.V(2).Infof("Error fetching Kraken price: %v", err)
}

if amount != 0 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/deso-protocol/backend/routes"
coreCmd "github.com/deso-protocol/core/cmd"
"github.com/deso-protocol/core/lib"
"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v4"
"github.com/golang/glog"
"github.com/kevinburke/twilio-go"
)
Expand Down
7 changes: 7 additions & 0 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ func init() {
runCmd.PersistentFlags().String("amplitude-key", "", "Client-side amplitude key for instrumenting user behavior.")
runCmd.PersistentFlags().String("amplitude-domain", "api.amplitude.com", "Client-side amplitude API Endpoint.")

// Transactions
runCmd.PersistentFlags().Int("max-optional-preceding-transactions", 0,
"If set, enables certain transaction construction "+
"endpoints to accept transactions that should be connected "+
"before constructing the specified transaction. "+
"Setting this flag can aid in workflows that deal with atomic transaction construction.")

// User Interface
runCmd.PersistentFlags().String("support-email", "", "Show a support email to users of this node")
runCmd.PersistentFlags().Bool("show-processing-spinners", false,
Expand Down
8 changes: 7 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ type Config struct {
// Analytics
AmplitudeKey string

// Transactions
MaxOptionalPrecedingTransactions int

// Images
GCPCredentialsPath string
GCPBucketName string
Expand Down Expand Up @@ -148,6 +151,9 @@ func LoadConfig(coreConfig *coreCmd.Config) *Config {
// Analytics
config.AmplitudeKey = viper.GetString("amplitude-key")

// Transactions
config.MaxOptionalPrecedingTransactions = viper.GetInt("max-optional-preceding-transactions")

// Images
config.GCPCredentialsPath = viper.GetString("gcp-credentials-path")
config.GCPBucketName = viper.GetString("gcp-bucket-name")
Expand Down Expand Up @@ -228,7 +234,7 @@ func LoadConfig(coreConfig *coreCmd.Config) *Config {
panic(fmt.Sprintf("metamask-airdrop-eth-minimum value %v overflows uint256", metamaskAirdropMinStr))
}
} else {
config.MetamaskAirdropEthMinimum = uint256.NewInt()
config.MetamaskAirdropEthMinimum = uint256.NewInt(0)
}
config.MetamaskAirdropDESONanosAmount = viper.GetUint64("metamask-airdrop-deso-nanos-amount")

Expand Down
Loading
Loading