diff --git a/core/state/statedb_mdl.go b/core/state/statedb_mdl.go
index cd0c617f80..b998457447 100644
--- a/core/state/statedb_mdl.go
+++ b/core/state/statedb_mdl.go
@@ -42,7 +42,6 @@ func (s *StateDB) GetNum(addr common.Address) *big.Int {
}
// GetState returns a value in account storage.
-// func (s *StateDB) GetSolidityUint256(addr common.Address, slot common.Hash) ([]byte, error) {
func (s *StateDB) GetSolidityBytes(addr common.Address, slot common.Hash) ([]byte, error) {
length := s.GetState(addr, slot).Big().Uint64()
if length == uint64(0) {
diff --git a/go.mod b/go.mod
index 58a642be98..13687cc381 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1
github.com/CortexFoundation/inference v1.0.2-0.20230307032835-9197d586a4e8
github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66
- github.com/CortexFoundation/torrentfs v1.0.57-0.20231226110207-0dcdbe74690d
+ github.com/CortexFoundation/torrentfs v1.0.57
github.com/VictoriaMetrics/fastcache v1.12.2
github.com/arsham/figurine v1.3.0
github.com/aws/aws-sdk-go-v2 v1.24.0
@@ -21,7 +21,7 @@ require (
github.com/consensys/gnark-crypto v0.12.1
github.com/crate-crypto/go-kzg-4844 v0.7.0
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
- github.com/deckarep/golang-set/v2 v2.5.0
+ github.com/deckarep/golang-set/v2 v2.6.0
github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d
github.com/ethereum/c-kzg-4844 v0.4.0
github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e
@@ -59,7 +59,7 @@ require (
github.com/stretchr/testify v1.8.4
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d
github.com/ucwong/color v1.10.1-0.20200624105241-fba1e010fe1e
- github.com/urfave/cli/v2 v2.26.0
+ github.com/urfave/cli/v2 v2.27.0
go.uber.org/automaxprocs v1.5.3
golang.org/x/crypto v0.17.0
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
@@ -120,7 +120,7 @@ require (
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/benbjohnson/immutable v0.4.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
- github.com/bits-and-blooms/bitset v1.12.0 // indirect
+ github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect
github.com/bwmarrin/snowflake v0.3.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
@@ -148,7 +148,7 @@ require (
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
- github.com/go-resty/resty/v2 v2.10.0 // indirect
+ github.com/go-resty/resty/v2 v2.11.0 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
@@ -158,7 +158,7 @@ require (
github.com/google/btree v1.1.2 // indirect
github.com/google/flatbuffers v23.5.26+incompatible // indirect
github.com/google/go-querystring v1.1.0 // indirect
- github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect
+ github.com/google/pprof v0.0.0-20231229022155-5aaadb5f27d9 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
@@ -178,7 +178,7 @@ require (
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/naoina/go-stringutil v0.1.0 // indirect
- github.com/nutsdb/nutsdb v1.0.3-0.20231226101940-cfd8c3bba692 // indirect
+ github.com/nutsdb/nutsdb v1.0.3 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/oapi-codegen/runtime v1.1.0 // indirect
github.com/otiai10/copy v1.14.0 // indirect
@@ -200,7 +200,7 @@ require (
github.com/pion/webrtc/v3 v3.2.24 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
- github.com/prometheus/client_golang v1.17.0 // indirect
+ github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
@@ -218,7 +218,7 @@ require (
github.com/tklauser/numcpus v0.7.0 // indirect
github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd // indirect
github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb // indirect
- github.com/ucwong/golang-kv v1.0.24-0.20231226105423-b6530d5b2b9f // indirect
+ github.com/ucwong/golang-kv v1.0.24-0.20231227101232-3f231e2de6c0 // indirect
github.com/ucwong/shard v1.0.1-0.20231225143310-3022d14f9c3e // indirect
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect
github.com/xujiajun/mmap-go v1.0.1 // indirect
diff --git a/go.sum b/go.sum
index b8339c4f3a..9e043d8bb3 100644
--- a/go.sum
+++ b/go.sum
@@ -68,8 +68,8 @@ github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66/go.mod h1:
github.com/CortexFoundation/torrentfs v1.0.13-0.20200623060705-ce027f43f2f8/go.mod h1:Ma+tGhPPvz4CEZHaqEJQMOEGOfHeQBiAoNd1zyc/w3Q=
github.com/CortexFoundation/torrentfs v1.0.14-0.20200703071639-3fcabcabf274/go.mod h1:qnb3YlIJmuetVBtC6Lsejr0Xru+1DNmDCdTqnwy7lhk=
github.com/CortexFoundation/torrentfs v1.0.20-0.20200810031954-d36d26f82fcc/go.mod h1:N5BsicP5ynjXIi/Npl/SRzlJ630n1PJV2sRj0Z0t2HA=
-github.com/CortexFoundation/torrentfs v1.0.57-0.20231226110207-0dcdbe74690d h1:G8PSiVXEFh3swwEPpwLqhibmjPcanntH5naisKa3o7I=
-github.com/CortexFoundation/torrentfs v1.0.57-0.20231226110207-0dcdbe74690d/go.mod h1:Fipt0smvYNrXAyy+U96wJilL8RxtDWGLvk5xy7oRQXo=
+github.com/CortexFoundation/torrentfs v1.0.57 h1:sTTTU3N5g20jmtAAL5GFsRlSH7TwGp/4nfgjJaGRWGo=
+github.com/CortexFoundation/torrentfs v1.0.57/go.mod h1:KOMNUjgmptFC7H8F2i0qEdWyMAm4gNaG2Ai24cBq7Vo=
github.com/CortexFoundation/wormhole v0.0.2-0.20231221155549-5c938553b5fc h1:LkbBJvvbfraAg/joFxPZtDvmdrjuTqPfbGhdnrEq7GM=
github.com/CortexFoundation/wormhole v0.0.2-0.20231221155549-5c938553b5fc/go.mod h1:ipzmPabDgzYKUbXkGVe2gTkBEp+MsDx6pXGiuYzmP6s=
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
@@ -296,8 +296,9 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bitly/go-simplejson v0.5.1-0.20200416141419-39a59b1b2866/go.mod h1:bXegrmTNBg3jTbSwV0BSBcSSfHHctupCgavZr/gX5fo=
-github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA=
github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
+github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE=
+github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
@@ -397,8 +398,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/deckarep/golang-set/v2 v2.5.0 h1:hn6cEZtQ0h3J8kFrHR/NrzyOoTnjgW1+FmNJzQ7y/sA=
-github.com/deckarep/golang-set/v2 v2.5.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
+github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM=
+github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y=
github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs=
@@ -527,8 +528,8 @@ github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW
github.com/go-resty/resty/v2 v2.3.0-rc.1/go.mod h1:nYW/8rxqQCmI3bPz9Fsmjbr2FBjGuR2Mzt6kDh3zZ7w=
github.com/go-resty/resty/v2 v2.3.1-0.20200619075926-b87f65ce5ed5/go.mod h1:UpN9CgLZNsv4e9XG50UU8xdI0F43UQ4HmxLBDwaroHU=
github.com/go-resty/resty/v2 v2.3.1-0.20200717071130-ca7661ad51fe/go.mod h1:UpN9CgLZNsv4e9XG50UU8xdI0F43UQ4HmxLBDwaroHU=
-github.com/go-resty/resty/v2 v2.10.0 h1:Qla4W/+TMmv0fOeeRqzEpXPLfTUnR5HZ1+lGs+CkiCo=
-github.com/go-resty/resty/v2 v2.10.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A=
+github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8=
+github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
@@ -620,8 +621,8 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg=
-github.com/google/pprof v0.0.0-20231212022811-ec68065c825e h1:bwOy7hAFd0C91URzMIEBfr6BAz29yk7Qj0cy6S7DJlU=
-github.com/google/pprof v0.0.0-20231212022811-ec68065c825e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
+github.com/google/pprof v0.0.0-20231229022155-5aaadb5f27d9 h1:jmZrGBc6nAoZ1WUm6rDBnykKw8oXMmGCi1gc3nseeG4=
+github.com/google/pprof v0.0.0-20231229022155-5aaadb5f27d9/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@@ -896,8 +897,8 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
-github.com/nutsdb/nutsdb v1.0.3-0.20231226101940-cfd8c3bba692 h1:WvNBypHKKqE7QvEvtpix42QqmdRGTwwKAqBr93nAAT0=
-github.com/nutsdb/nutsdb v1.0.3-0.20231226101940-cfd8c3bba692/go.mod h1:jIbbpBXajzTMZ0o33Yn5zoYIo3v0Dz4WstkVce+sYuQ=
+github.com/nutsdb/nutsdb v1.0.3 h1:pDF+vhlqsgVnt1lzxKQxFUHK15vkBW/PUJcyGQh+wCc=
+github.com/nutsdb/nutsdb v1.0.3/go.mod h1:jIbbpBXajzTMZ0o33Yn5zoYIo3v0Dz4WstkVce+sYuQ=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
@@ -1056,8 +1057,8 @@ github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeD
github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4=
-github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
-github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
+github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk=
+github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -1245,8 +1246,8 @@ github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd h1:gBtlvLAsgLk+
github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd/go.mod h1:ddwX+NCjMZPdpzcGh1fcEbNTUTCtKgt2hC2rqvmLKgA=
github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb h1:dVZH3AH9f7zB3VBmsjn25B7lfcAyMP4QxdFYTrfj7tg=
github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb/go.mod h1:3yswsBsVuwsOjDvFfC5Na9XSEf4HC7mj3W3g6jvSY/s=
-github.com/ucwong/golang-kv v1.0.24-0.20231226105423-b6530d5b2b9f h1:Lxq8RXMH+fl6Chd/L5g+mF/fQwTU5+4cj3cLSdNLsgU=
-github.com/ucwong/golang-kv v1.0.24-0.20231226105423-b6530d5b2b9f/go.mod h1:1qR5+RPyBFiN3rnqnmZdrKTWIylmRZfvlduKS0aJfVc=
+github.com/ucwong/golang-kv v1.0.24-0.20231227101232-3f231e2de6c0 h1:tx0NHIwSlwihaREnFqGBpCF7giohMoJk0X/raZN5EJY=
+github.com/ucwong/golang-kv v1.0.24-0.20231227101232-3f231e2de6c0/go.mod h1:T+5kW5sPivEbr5L6lZKlFTfTUCe6XEfRymeGzjBrYwU=
github.com/ucwong/golang-set v1.8.1-0.20200419153428-d7b0b1ac2d43/go.mod h1:xu0FaiQFGbBcFZj2o7udZ5rbA8jRTsv47hkPoG5qQNM=
github.com/ucwong/goleveldb v1.0.3-0.20200508074755-578cba616f37/go.mod h1:dgJUTtDxq/ne6/JzZhHzF24OL/uqILz9IWk8HmT4V2g=
github.com/ucwong/goleveldb v1.0.3-0.20200618184106-f1c6bc3a428b/go.mod h1:7Sq6w7AfEZuB/a6mrlvHCSXCSkqojCMMrM3Ei12QAT0=
@@ -1261,8 +1262,8 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
-github.com/urfave/cli/v2 v2.26.0 h1:3f3AMg3HpThFNT4I++TKOejZO8yU55t3JnnSr4S4QEI=
-github.com/urfave/cli/v2 v2.26.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
+github.com/urfave/cli/v2 v2.27.0 h1:uNs1K8JwTFL84X68j5Fjny6hfANh9nTlJ6dRtZAFAHY=
+github.com/urfave/cli/v2 v2.27.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
diff --git a/vendor/github.com/CortexFoundation/torrentfs/backend/caffe/t.go b/vendor/github.com/CortexFoundation/torrentfs/backend/caffe/t.go
index 4fe168515a..ed852f4da1 100644
--- a/vendor/github.com/CortexFoundation/torrentfs/backend/caffe/t.go
+++ b/vendor/github.com/CortexFoundation/torrentfs/backend/caffe/t.go
@@ -106,9 +106,17 @@ func (t *Torrent) BytesRequested() int64 {
}
func (t *Torrent) SetBytesRequested(bytesRequested int64) {
- //t.Lock()
- //defer t.Unlock()
- //t.bytesRequested = bytesRequested
+ // Store the torrent information in a variable for reuse
+ info := t.Info()
+
+ // Check if the torrent has associated information
+ if info != nil {
+ // Limit the requested bytes to the total length of the torrent
+ if bytesRequested > t.Length() {
+ bytesRequested = t.Length()
+ }
+ }
+
t.bytesRequested.Store(bytesRequested)
}
diff --git a/vendor/github.com/CortexFoundation/torrentfs/backend/doc.go b/vendor/github.com/CortexFoundation/torrentfs/backend/doc.go
index 0582a90a18..d116c58310 100644
--- a/vendor/github.com/CortexFoundation/torrentfs/backend/doc.go
+++ b/vendor/github.com/CortexFoundation/torrentfs/backend/doc.go
@@ -25,7 +25,7 @@ const (
bucket = params.Bucket //it is best size is 1/3 full nodes
group = params.Group
taskChanBuffer = 1 //params.SyncBatch
- torrentChanSize = 1
+ torrentChanSize = 8
block = int64(params.PER_UPLOAD_BYTES)
//loops = 30
diff --git a/vendor/github.com/CortexFoundation/torrentfs/backend/handler.go b/vendor/github.com/CortexFoundation/torrentfs/backend/handler.go
index 523ab07b7e..aca630da21 100644
--- a/vendor/github.com/CortexFoundation/torrentfs/backend/handler.go
+++ b/vendor/github.com/CortexFoundation/torrentfs/backend/handler.go
@@ -918,21 +918,30 @@ func (tm *TorrentManager) commit(ctx context.Context, hex string, request uint64
func (tm *TorrentManager) Pending(t *caffe.Torrent) {
select {
case tm.pendingChan <- t:
+ log.Trace("Stable pending", "ih", t.InfoHash())
case <-tm.closeAll:
+ default:
+ log.Trace("Unstable pending", "ih", t.InfoHash())
}
}
func (tm *TorrentManager) Running(t *caffe.Torrent) {
select {
case tm.activeChan <- t:
+ log.Trace("Stable running", "ih", t.InfoHash())
case <-tm.closeAll:
+ default:
+ log.Trace("Unstable running", "ih", t.InfoHash())
}
}
func (tm *TorrentManager) Seeding(t *caffe.Torrent) {
select {
case tm.seedingChan <- t:
+ log.Debug("Stable seeding", "ih", t.InfoHash())
case <-tm.closeAll:
+ default:
+ log.Debug("Unstable seeding", "ih", t.InfoHash())
}
}
@@ -943,7 +952,11 @@ func (tm *TorrentManager) mainLoop() {
for {
select {
case msg := <-tm.taskChan:
- meta := msg.(*types.BitsFlow)
+ meta, ok := msg.(*types.BitsFlow)
+ if !ok {
+ continue
+ }
+
if params.IsBad(meta.InfoHash()) {
continue
}
@@ -1030,16 +1043,16 @@ func (tm *TorrentManager) pendingLoop() {
valid := func(a *caffe.Torrent) bool {
switch a.Status() {
case caffe.TorrentPending:
- log.Info("Caffe is pending", "ih", t.InfoHash())
+ log.Trace("Caffe is pending", "ih", t.InfoHash(), "complete", t.BytesCompleted(), "miss", t.BytesMissing(), "request", t.BytesRequested())
case caffe.TorrentPaused:
- log.Info("Caffe is pausing", "ih", t.InfoHash())
+ log.Trace("Caffe is pausing", "ih", t.InfoHash(), "complete", t.BytesCompleted(), "miss", t.BytesMissing(), "request", t.BytesRequested())
case caffe.TorrentRunning:
- log.Trace("Caffe is running", "ih", t.InfoHash())
+ log.Trace("Caffe is running", "ih", t.InfoHash(), "complete", t.BytesCompleted(), "miss", t.BytesMissing(), "request", t.BytesRequested())
case caffe.TorrentSeeding:
- log.Info("Caffe is seeding", "ih", t.InfoHash())
+ log.Info("Caffe is seeding", "ih", t.InfoHash(), "complete", t.BytesCompleted(), "miss", t.BytesMissing(), "request", t.BytesRequested())
return true
case caffe.TorrentStopping:
- log.Info("Caffe is stopping", "ih", t.InfoHash(), "complete", t.BytesCompleted(), "miss", t.BytesMissing())
+ log.Info("Caffe is stopping", "ih", t.InfoHash(), "complete", t.BytesCompleted(), "miss", t.BytesMissing(), "request", t.BytesRequested())
return true
}
return false
@@ -1330,6 +1343,7 @@ func (tm *TorrentManager) Dropping(ih string) error {
select {
case tm.droppingChan <- ih:
case <-tm.closeAll:
+ default:
}
return nil
}
diff --git a/vendor/github.com/CortexFoundation/torrentfs/backend/job/job.go b/vendor/github.com/CortexFoundation/torrentfs/backend/job/job.go
index b7d34c161b..7745b5b720 100644
--- a/vendor/github.com/CortexFoundation/torrentfs/backend/job/job.go
+++ b/vendor/github.com/CortexFoundation/torrentfs/backend/job/job.go
@@ -93,7 +93,7 @@ func (j *Job) Completed(fn func(t *caffe.Torrent) bool) (result chan bool) {
log.Trace("Waiting ... ...", "ih", j.ref.InfoHash())
}
case <-result:
- log.Info("Job channel closed", "ih", j.ref.InfoHash(), "id", j.id, "status", j.ref.Status(), "complete", j.ref.BytesCompleted(), "miss", j.ref.BytesMissing())
+ log.Info("Job channel closed", "ih", j.ref.InfoHash(), "id", j.id, "status", j.ref.Status(), "complete", j.ref.BytesCompleted(), "miss", j.ref.BytesMissing(), "request", j.ref.BytesRequested())
return
}
}
diff --git a/vendor/github.com/CortexFoundation/torrentfs/fs.go b/vendor/github.com/CortexFoundation/torrentfs/fs.go
index bc7beab8bb..83dc538244 100644
--- a/vendor/github.com/CortexFoundation/torrentfs/fs.go
+++ b/vendor/github.com/CortexFoundation/torrentfs/fs.go
@@ -276,10 +276,12 @@ func (fs *TorrentFS) listen() {
for {
select {
case msg := <-fs.callback:
- meta := msg.(*types.BitsFlow)
- //if meta.Request() > 0 || (params.IsGood(meta.InfoHash()) && fs.config.Mode != params.LAZY) {
- // if meta.Request() > 0 || params.IsGood(meta.InfoHash()) {
- fs.download(context.Background(), meta.InfoHash(), meta.Request())
+ meta, ok := msg.(*types.BitsFlow)
+ if ok {
+ //if meta.Request() > 0 || (params.IsGood(meta.InfoHash()) && fs.config.Mode != params.LAZY) {
+ // if meta.Request() > 0 || params.IsGood(meta.InfoHash()) {
+ fs.download(context.Background(), meta.InfoHash(), meta.Request())
+ }
// } else {
// fs.ttlchan <- msg
// }
diff --git a/vendor/github.com/bits-and-blooms/bitset/README.md b/vendor/github.com/bits-and-blooms/bitset/README.md
index 848234e2fc..fe7bca65eb 100644
--- a/vendor/github.com/bits-and-blooms/bitset/README.md
+++ b/vendor/github.com/bits-and-blooms/bitset/README.md
@@ -127,6 +127,13 @@ E.g.,
The memory usage of a bitset using `N` bits is at least `N/8` bytes. The number of bits in a bitset is at least as large as one plus the greatest bit index you have accessed. Thus it is possible to run out of memory while using a bitset. If you have lots of bits, you might prefer compressed bitsets, like the [Roaring bitmaps](http://roaringbitmap.org) and its [Go implementation](https://github.com/RoaringBitmap/roaring).
+The `roaring` library allows you to go back and forth between compressed Roaring bitmaps and the conventional bitset instances:
+```Go
+ mybitset := roaringbitmap.ToBitSet()
+ newroaringbitmap := roaring.FromBitSet(mybitset)
+```
+
+
## Implementation Note
Go 1.9 introduced a native `math/bits` library. We provide backward compatibility to Go 1.7, which might be removed.
diff --git a/vendor/github.com/bits-and-blooms/bitset/bitset.go b/vendor/github.com/bits-and-blooms/bitset/bitset.go
index 8fb9e9fa20..9f38ed3a9d 100644
--- a/vendor/github.com/bits-and-blooms/bitset/bitset.go
+++ b/vendor/github.com/bits-and-blooms/bitset/bitset.go
@@ -94,17 +94,17 @@ func (b *BitSet) SetBitsetFrom(buf []uint64) {
b.set = buf
}
-// From is a constructor used to create a BitSet from an array of integers
+// From is a constructor used to create a BitSet from an array of words
func From(buf []uint64) *BitSet {
return FromWithLength(uint(len(buf))*64, buf)
}
-// FromWithLength constructs from an array of integers and length.
+// FromWithLength constructs from an array of words and length.
func FromWithLength(len uint, set []uint64) *BitSet {
return &BitSet{len, set}
}
-// Bytes returns the bitset as array of integers
+// Bytes returns the bitset as array of words
func (b *BitSet) Bytes() []uint64 {
return b.set
}
@@ -551,6 +551,18 @@ func (b *BitSet) ClearAll() *BitSet {
return b
}
+// SetAll sets the entire BitSet
+func (b *BitSet) SetAll() *BitSet {
+ if b != nil && b.set != nil {
+ for i := range b.set {
+ b.set[i] = allBits
+ }
+
+ b.cleanLastWord()
+ }
+ return b
+}
+
// wordCount returns the number of words used in a bit set
func (b *BitSet) wordCount() int {
return wordsNeededUnbound(b.length)
@@ -944,7 +956,8 @@ func (b *BitSet) IsStrictSuperSet(other *BitSet) bool {
return b.Count() > other.Count() && b.IsSuperSet(other)
}
-// DumpAsBits dumps a bit set as a string of bits
+// DumpAsBits dumps a bit set as a string of bits. Following the usual convention in Go,
+// the least significant bits are printed last (index 0 is at the end of the string).
func (b *BitSet) DumpAsBits() string {
if b.set == nil {
return "."
@@ -1135,3 +1148,37 @@ func (b *BitSet) UnmarshalJSON(data []byte) error {
_, err = b.ReadFrom(bytes.NewReader(buf))
return err
}
+
+// Rank returns the nunber of set bits up to and including the index
+// that are set in the bitset.
+// See https://en.wikipedia.org/wiki/Ranking#Ranking_in_statistics
+func (b *BitSet) Rank(index uint) uint {
+ if index >= b.length {
+ return b.Count()
+ }
+ leftover := (index + 1) & 63
+ answer := uint(popcntSlice(b.set[:(index+1)>>6]))
+ if leftover != 0 {
+ answer += uint(popcount(b.set[(index+1)>>6] << (64 - leftover)))
+ }
+ return answer
+}
+
+// Select returns the index of the jth set bit, where j is the argument.
+// The caller is responsible to ensure that 0 <= j < Count(): when j is
+// out of range, the function returns the length of the bitset (b.length).
+//
+// Note that this function differs in convention from the Rank function which
+// returns 1 when ranking the smallest value. We follow the conventional
+// textbook definition of Select and Rank.
+func (b *BitSet) Select(index uint) uint {
+ leftover := index
+ for idx, word := range b.set {
+ w := uint(popcount(word))
+ if w > leftover {
+ return uint(idx)*64 + select64(word, leftover)
+ }
+ leftover -= w
+ }
+ return b.length
+}
diff --git a/vendor/github.com/bits-and-blooms/bitset/select.go b/vendor/github.com/bits-and-blooms/bitset/select.go
new file mode 100644
index 0000000000..f15e74a2c9
--- /dev/null
+++ b/vendor/github.com/bits-and-blooms/bitset/select.go
@@ -0,0 +1,45 @@
+package bitset
+
+func select64(w uint64, j uint) uint {
+ seen := 0
+ // Divide 64bit
+ part := w & 0xFFFFFFFF
+ n := uint(popcount(part))
+ if n <= j {
+ part = w >> 32
+ seen += 32
+ j -= n
+ }
+ ww := part
+
+ // Divide 32bit
+ part = ww & 0xFFFF
+
+ n = uint(popcount(part))
+ if n <= j {
+ part = ww >> 16
+ seen += 16
+ j -= n
+ }
+ ww = part
+
+ // Divide 16bit
+ part = ww & 0xFF
+ n = uint(popcount(part))
+ if n <= j {
+ part = ww >> 8
+ seen += 8
+ j -= n
+ }
+ ww = part
+
+ // Lookup in final byte
+ counter := 0
+ for ; counter < 8; counter++ {
+ j -= uint((ww >> counter) & 1)
+ if j+1 == 0 {
+ break
+ }
+ }
+ return uint(seen + counter)
+}
diff --git a/vendor/github.com/deckarep/golang-set/v2/set.go b/vendor/github.com/deckarep/golang-set/v2/set.go
index 28d2ada97e..292089dcf3 100644
--- a/vendor/github.com/deckarep/golang-set/v2/set.go
+++ b/vendor/github.com/deckarep/golang-set/v2/set.go
@@ -62,6 +62,13 @@ type Set[T comparable] interface {
// are all in the set.
Contains(val ...T) bool
+ // ContainsOne returns whether the given item
+ // is in the set.
+ //
+ // Contains may cause the argument to escape to the heap.
+ // See: https://github.com/deckarep/golang-set/issues/118
+ ContainsOne(val T) bool
+
// ContainsAny returns whether at least one of the
// given items are in the set.
ContainsAny(val ...T) bool
diff --git a/vendor/github.com/deckarep/golang-set/v2/threadsafe.go b/vendor/github.com/deckarep/golang-set/v2/threadsafe.go
index 6086f31b13..ad7a834b59 100644
--- a/vendor/github.com/deckarep/golang-set/v2/threadsafe.go
+++ b/vendor/github.com/deckarep/golang-set/v2/threadsafe.go
@@ -66,6 +66,14 @@ func (t *threadSafeSet[T]) Contains(v ...T) bool {
return ret
}
+func (t *threadSafeSet[T]) ContainsOne(v T) bool {
+ t.RLock()
+ ret := t.uss.ContainsOne(v)
+ t.RUnlock()
+
+ return ret
+}
+
func (t *threadSafeSet[T]) ContainsAny(v ...T) bool {
t.RLock()
ret := t.uss.ContainsAny(v...)
diff --git a/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go b/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go
index 228bada62a..8b17b01760 100644
--- a/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go
+++ b/vendor/github.com/deckarep/golang-set/v2/threadunsafe.go
@@ -93,6 +93,11 @@ func (s threadUnsafeSet[T]) Contains(v ...T) bool {
return true
}
+func (s threadUnsafeSet[T]) ContainsOne(v T) bool {
+ _, ok := s[v]
+ return ok
+}
+
func (s threadUnsafeSet[T]) ContainsAny(v ...T) bool {
for _, val := range v {
if _, ok := s[val]; ok {
diff --git a/vendor/github.com/go-resty/resty/v2/README.md b/vendor/github.com/go-resty/resty/v2/README.md
index 5949af0383..d6d501ef89 100644
--- a/vendor/github.com/go-resty/resty/v2/README.md
+++ b/vendor/github.com/go-resty/resty/v2/README.md
@@ -4,7 +4,7 @@
Features section describes in detail about Resty capabilities
-
+
Resty Communication Channels
@@ -13,7 +13,7 @@
## News
- * v2.10.0 [released](https://github.com/go-resty/resty/releases/tag/v2.10.0) and tagged on Oct 14, 2023.
+ * v2.11.0 [released](https://github.com/go-resty/resty/releases/tag/v2.11.0) and tagged on Dec 27, 2023.
* v2.0.0 [released](https://github.com/go-resty/resty/releases/tag/v2.0.0) and tagged on Jul 16, 2019.
* v1.12.0 [released](https://github.com/go-resty/resty/releases/tag/v1.12.0) and tagged on Feb 27, 2019.
* v1.0 released and tagged on Sep 25, 2017. - Resty's first version was released on Sep 15, 2015 then it grew gradually as a very handy and helpful library. Its been a two years since first release. I'm very thankful to Resty users and its [contributors](https://github.com/go-resty/resty/graphs/contributors).
@@ -110,7 +110,7 @@ Resty author also published following projects for Go Community.
```bash
# Go Modules
-require github.com/go-resty/resty/v2 v2.7.0
+require github.com/go-resty/resty/v2 v2.11.0
```
## Usage
diff --git a/vendor/github.com/go-resty/resty/v2/digest.go b/vendor/github.com/go-resty/resty/v2/digest.go
index a1088007a1..9dd3a13b57 100644
--- a/vendor/github.com/go-resty/resty/v2/digest.go
+++ b/vendor/github.com/go-resty/resty/v2/digest.go
@@ -133,14 +133,17 @@ func parseChallenge(input string) (*challenge, error) {
return nil, ErrDigestBadChallenge
}
s = strings.Trim(s[7:], ws)
- sl := strings.Split(s, ", ")
+ sl := strings.Split(s, ",")
c := &challenge{}
var r []string
for i := range sl {
+ sl[i] = strings.TrimSpace(sl[i])
r = strings.SplitN(sl[i], "=", 2)
if len(r) != 2 {
return nil, ErrDigestBadChallenge
}
+ r[0] = strings.TrimSpace(r[0])
+ r[1] = strings.TrimSpace(r[1])
switch r[0] {
case "realm":
c.realm = strings.Trim(r[1], qs)
@@ -151,9 +154,9 @@ func parseChallenge(input string) (*challenge, error) {
case "opaque":
c.opaque = strings.Trim(r[1], qs)
case "stale":
- c.stale = r[1]
+ c.stale = strings.Trim(r[1], qs)
case "algorithm":
- c.algorithm = r[1]
+ c.algorithm = strings.Trim(r[1], qs)
case "qop":
c.qop = strings.Trim(r[1], qs)
case "charset":
diff --git a/vendor/github.com/go-resty/resty/v2/middleware.go b/vendor/github.com/go-resty/resty/v2/middleware.go
index a43a41b5f3..ac2bbc9e88 100644
--- a/vendor/github.com/go-resty/resty/v2/middleware.go
+++ b/vendor/github.com/go-resty/resty/v2/middleware.go
@@ -481,7 +481,6 @@ func handleContentType(c *Client, r *Request) {
func handleRequestBody(c *Client, r *Request) error {
var bodyBytes []byte
- releaseBuffer(r.bodyBuf)
r.bodyBuf = nil
switch body := r.Body.(type) {
diff --git a/vendor/github.com/nutsdb/nutsdb/bucket.go b/vendor/github.com/nutsdb/nutsdb/bucket.go
index 815bab505f..1e20720bf1 100644
--- a/vendor/github.com/nutsdb/nutsdb/bucket.go
+++ b/vendor/github.com/nutsdb/nutsdb/bucket.go
@@ -21,14 +21,6 @@ const (
BucketDeleteOperation BucketOperation = 3
)
-type BucketStatus = uint8
-
-const BucketStatusExistAlready = 1
-const BucketStatusDelete = 2
-const BucketStatusNew = 3
-const BucketStatusUpdated = 4
-const BucketStatusUnknown = 4
-
var ErrBucketCrcInvalid = errors.New("bucket crc invalid")
func init() {
diff --git a/vendor/github.com/nutsdb/nutsdb/db.go b/vendor/github.com/nutsdb/nutsdb/db.go
index 43b8b0d665..8dc7e7a0fe 100644
--- a/vendor/github.com/nutsdb/nutsdb/db.go
+++ b/vendor/github.com/nutsdb/nutsdb/db.go
@@ -829,11 +829,11 @@ func (db *DB) managed(writable bool, fn func(tx *Tx) error) (err error) {
if err != nil {
return err
}
- //defer func() {
- // if r := recover(); r != nil {
- // err = fmt.Errorf("panic when executing tx, err is %+v", r)
- // }
- //}()
+ defer func() {
+ if r := recover(); r != nil {
+ err = fmt.Errorf("panic when executing tx, err is %+v", r)
+ }
+ }()
if err = fn(tx); err == nil {
err = tx.Commit()
diff --git a/vendor/github.com/nutsdb/nutsdb/pending.go b/vendor/github.com/nutsdb/nutsdb/pending.go
index d6fc62eb9d..89d4e5212c 100644
--- a/vendor/github.com/nutsdb/nutsdb/pending.go
+++ b/vendor/github.com/nutsdb/nutsdb/pending.go
@@ -1,5 +1,33 @@
package nutsdb
+// EntryStatus represents the Entry status in the current Tx
+type EntryStatus = uint8
+
+const (
+ // NotFoundEntry means there is no changes for this entry in current Tx
+ NotFoundEntry EntryStatus = 0
+ // EntryDeleted means this Entry has been deleted in the current Tx
+ EntryDeleted EntryStatus = 1
+ // EntryUpdated means this Entry has been updated in the current Tx
+ EntryUpdated EntryStatus = 2
+)
+
+// BucketStatus represents the current status of bucket in current Tx
+type BucketStatus = uint8
+
+const (
+ // BucketStatusExistAlready means this bucket already exists
+ BucketStatusExistAlready = 1
+ // BucketStatusDeleted means this bucket is already deleted
+ BucketStatusDeleted = 2
+ // BucketStatusNew means this bucket is created in current Tx
+ BucketStatusNew = 3
+ // BucketStatusUpdated means this bucket is updated in current Tx
+ BucketStatusUpdated = 4
+ // BucketStatusUnknown means this bucket doesn't exist
+ BucketStatusUnknown = 5
+)
+
// pendingBucketList the uncommitted bucket changes in this Tx
type pendingBucketList map[Ds]map[BucketName]*Bucket
@@ -13,7 +41,8 @@ type pendingEntryList struct {
size int
}
-func NewPendingEntriesList() *pendingEntryList {
+// newPendingEntriesList create a new pendingEntryList object for a Tx
+func newPendingEntriesList() *pendingEntryList {
pending := &pendingEntryList{
entriesInBTree: map[BucketName]map[string]*Entry{},
entries: map[Ds]map[BucketName][]*Entry{},
@@ -22,6 +51,7 @@ func NewPendingEntriesList() *pendingEntryList {
return pending
}
+// submitEntry submit an entry into pendingEntryList
func (pending *pendingEntryList) submitEntry(ds Ds, bucket string, e *Entry) {
switch ds {
case DataStructureBTree:
diff --git a/vendor/github.com/nutsdb/nutsdb/tx.go b/vendor/github.com/nutsdb/nutsdb/tx.go
index 9cc7158a2d..8291358d84 100644
--- a/vendor/github.com/nutsdb/nutsdb/tx.go
+++ b/vendor/github.com/nutsdb/nutsdb/tx.go
@@ -34,14 +34,6 @@ const (
txStatusClosed = 3
)
-type EntryStatus = uint8
-
-const (
- NotFoundEntry EntryStatus = 0
- EntryDeleted EntryStatus = 1
- EntryUpdated EntryStatus = 2
-)
-
// Tx represents a transaction.
type Tx struct {
id uint64
@@ -109,7 +101,7 @@ func newTx(db *DB, writable bool) (tx *Tx, err error) {
tx = &Tx{
db: db,
writable: writable,
- pendingWrites: NewPendingEntriesList(),
+ pendingWrites: newPendingEntriesList(),
pendingBucketList: make(map[Ds]map[BucketName]*Bucket),
}
@@ -604,7 +596,7 @@ func (tx *Tx) put(bucket string, key, value []byte, ttl uint32, flag uint16, tim
}
bucketStatus := tx.getBucketStatus(DataStructureBTree, bucket)
- if bucketStatus == BucketStatusDelete {
+ if bucketStatus == BucketStatusDeleted {
return ErrBucketNotFound
}
@@ -846,7 +838,7 @@ func (tx *Tx) getBucketStatus(ds Ds, name BucketName) BucketStatus {
case BucketInsertOperation:
return BucketStatusNew
case BucketDeleteOperation:
- return BucketStatusDelete
+ return BucketStatusDeleted
case BucketUpdateOperation:
return BucketStatusUpdated
}
diff --git a/vendor/github.com/nutsdb/nutsdb/tx_btree.go b/vendor/github.com/nutsdb/nutsdb/tx_btree.go
index f56955929a..46c2c81ffb 100644
--- a/vendor/github.com/nutsdb/nutsdb/tx_btree.go
+++ b/vendor/github.com/nutsdb/nutsdb/tx_btree.go
@@ -25,6 +25,12 @@ import (
"github.com/xujiajun/utils/strconv2"
)
+const (
+ getAllType uint8 = 0
+ getKeysType uint8 = 1
+ getValuesType uint8 = 2
+)
+
func (tx *Tx) PutWithTimestamp(bucket string, key, value []byte, ttl uint32, timestamp uint64) error {
return tx.put(bucket, key, value, ttl, DataSetFlag, timestamp, DataStructureBTree)
}
@@ -87,7 +93,7 @@ func (tx *Tx) get(bucket string, key []byte) (value []byte, err error) {
bucketId := b.Id
bucketStatus := tx.getBucketStatus(DataStructureBTree, bucket)
- if bucketStatus == BucketStatusDelete {
+ if bucketStatus == BucketStatusDeleted {
return nil, ErrBucketNotFound
}
@@ -174,35 +180,57 @@ func (tx *Tx) getMaxOrMinKey(bucket string, isMax bool) ([]byte, error) {
}
// GetAll returns all keys and values of the bucket stored at given bucket.
-func (tx *Tx) GetAll(bucket string) (values [][]byte, err error) {
+func (tx *Tx) GetAll(bucket string) ([][]byte, [][]byte, error) {
+ return tx.getAllOrKeysOrValues(bucket, getAllType)
+}
+
+// GetKeys returns all keys of the bucket stored at given bucket.
+func (tx *Tx) GetKeys(bucket string) ([][]byte, error) {
+ keys, _, err := tx.getAllOrKeysOrValues(bucket, getKeysType)
+ return keys, err
+}
+
+// GetValues returns all values of the bucket stored at given bucket.
+func (tx *Tx) GetValues(bucket string) ([][]byte, error) {
+ _, values, err := tx.getAllOrKeysOrValues(bucket, getValuesType)
+ return values, err
+}
+
+func (tx *Tx) getAllOrKeysOrValues(bucket string, typ uint8) ([][]byte, [][]byte, error) {
if err := tx.checkTxIsClosed(); err != nil {
- return nil, err
+ return nil, nil, err
}
- b, err := tx.db.bm.GetBucket(DataStructureBTree, bucket)
+ bucketId, err := tx.db.bm.GetBucketID(DataStructureBTree, bucket)
if err != nil {
- return nil, err
+ return nil, nil, err
}
- bucketId := b.Id
if index, ok := tx.db.Index.bTree.exist(bucketId); ok {
records := index.All()
- if len(records) == 0 {
- return nil, ErrBucketEmpty
+ var (
+ keys [][]byte
+ values [][]byte
+ )
+
+ switch typ {
+ case getAllType:
+ keys, values, err = tx.getHintIdxDataItemsWrapper(records, ScanNoLimit, bucketId, true, true)
+ case getKeysType:
+ keys, _, err = tx.getHintIdxDataItemsWrapper(records, ScanNoLimit, bucketId, true, false)
+ case getValuesType:
+ _, values, err = tx.getHintIdxDataItemsWrapper(records, ScanNoLimit, bucketId, false, true)
}
- values, err = tx.getHintIdxDataItemsWrapper(records, ScanNoLimit, bucketId)
if err != nil {
- return nil, ErrBucketEmpty
+ return nil, nil, err
}
- }
- if len(values) == 0 {
- return nil, ErrBucketEmpty
+ return keys, values, nil
}
- return
+ return nil, nil, nil
}
func (tx *Tx) GetSet(bucket string, key, value []byte) (oldValue []byte, err error) {
@@ -231,7 +259,7 @@ func (tx *Tx) RangeScan(bucket string, start, end []byte) (values [][]byte, err
return nil, ErrRangeScan
}
- values, err = tx.getHintIdxDataItemsWrapper(records, ScanNoLimit, bucketId)
+ _, values, err = tx.getHintIdxDataItemsWrapper(records, ScanNoLimit, bucketId, false, true)
if err != nil {
return nil, ErrRangeScan
}
@@ -258,7 +286,7 @@ func (tx *Tx) PrefixScan(bucket string, prefix []byte, offsetNum int, limitNum i
if idx, ok := tx.db.Index.bTree.exist(bucketId); ok {
records := idx.PrefixScan(prefix, offsetNum, limitNum)
- values, err = tx.getHintIdxDataItemsWrapper(records, limitNum, bucketId)
+ _, values, err = tx.getHintIdxDataItemsWrapper(records, limitNum, bucketId, false, true)
if err != nil {
return nil, ErrPrefixScan
}
@@ -285,7 +313,7 @@ func (tx *Tx) PrefixSearchScan(bucket string, prefix []byte, reg string, offsetN
if idx, ok := tx.db.Index.bTree.exist(bucketId); ok {
records := idx.PrefixSearchScan(prefix, reg, offsetNum, limitNum)
- values, err = tx.getHintIdxDataItemsWrapper(records, limitNum, bucketId)
+ _, values, err = tx.getHintIdxDataItemsWrapper(records, limitNum, bucketId, false, true)
if err != nil {
return nil, ErrPrefixSearchScan
}
@@ -320,27 +348,30 @@ func (tx *Tx) Delete(bucket string, key []byte) error {
return tx.put(bucket, key, nil, Persistent, DataDeleteFlag, uint64(time.Now().Unix()), DataStructureBTree)
}
-// getHintIdxDataItemsWrapper returns wrapped entries when prefix scanning or range scanning.
-func (tx *Tx) getHintIdxDataItemsWrapper(records []*Record, limitNum int, bucketId BucketId) (values [][]byte, err error) {
+// getHintIdxDataItemsWrapper returns keys and values when prefix scanning or range scanning.
+func (tx *Tx) getHintIdxDataItemsWrapper(records []*Record, limitNum int, bucketId BucketId, needKeys bool, needValues bool) (keys [][]byte, values [][]byte, err error) {
for _, record := range records {
- bucket, err := tx.db.bm.GetBucketById(bucketId)
- if err != nil {
- return nil, err
- }
if record.IsExpired() {
- tx.putDeleteLog(bucket.Id, record.Key, nil, Persistent, DataDeleteFlag, uint64(time.Now().Unix()), DataStructureBTree)
+ tx.putDeleteLog(bucketId, record.Key, nil, Persistent, DataDeleteFlag, uint64(time.Now().Unix()), DataStructureBTree)
continue
}
+
if limitNum > 0 && len(values) < limitNum || limitNum == ScanNoLimit {
- value, err := tx.db.getValueByRecord(record)
- if err != nil {
- return nil, err
+ if needKeys {
+ keys = append(keys, record.Key)
+ }
+
+ if needValues {
+ value, err := tx.db.getValueByRecord(record)
+ if err != nil {
+ return nil, nil, err
+ }
+ values = append(values, value)
}
- values = append(values, value)
}
}
- return values, nil
+ return keys, values, nil
}
func (tx *Tx) tryGet(bucket string, key []byte, solveRecord func(record *Record, found bool, bucketId BucketId) error) error {
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go
index 1feba62c6c..b5c8bcb395 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go
@@ -475,6 +475,9 @@ type HistogramOpts struct {
// now is for testing purposes, by default it's time.Now.
now func() time.Time
+
+ // afterFunc is for testing purposes, by default it's time.AfterFunc.
+ afterFunc func(time.Duration, func()) *time.Timer
}
// HistogramVecOpts bundles the options to create a HistogramVec metric.
@@ -526,7 +529,9 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr
if opts.now == nil {
opts.now = time.Now
}
-
+ if opts.afterFunc == nil {
+ opts.afterFunc = time.AfterFunc
+ }
h := &histogram{
desc: desc,
upperBounds: opts.Buckets,
@@ -536,6 +541,7 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr
nativeHistogramMinResetDuration: opts.NativeHistogramMinResetDuration,
lastResetTime: opts.now(),
now: opts.now,
+ afterFunc: opts.afterFunc,
}
if len(h.upperBounds) == 0 && opts.NativeHistogramBucketFactor <= 1 {
h.upperBounds = DefBuckets
@@ -716,9 +722,16 @@ type histogram struct {
nativeHistogramMinResetDuration time.Duration
// lastResetTime is protected by mtx. It is also used as created timestamp.
lastResetTime time.Time
+ // resetScheduled is protected by mtx. It is true if a reset is
+ // scheduled for a later time (when nativeHistogramMinResetDuration has
+ // passed).
+ resetScheduled bool
// now is for testing purposes, by default it's time.Now.
now func() time.Time
+
+ // afterFunc is for testing purposes, by default it's time.AfterFunc.
+ afterFunc func(time.Duration, func()) *time.Timer
}
func (h *histogram) Desc() *Desc {
@@ -874,21 +887,31 @@ func (h *histogram) limitBuckets(counts *histogramCounts, value float64, bucket
if h.maybeReset(hotCounts, coldCounts, coldIdx, value, bucket) {
return
}
+ // One of the other strategies will happen. To undo what they will do as
+ // soon as enough time has passed to satisfy
+ // h.nativeHistogramMinResetDuration, schedule a reset at the right time
+ // if we haven't done so already.
+ if h.nativeHistogramMinResetDuration > 0 && !h.resetScheduled {
+ h.resetScheduled = true
+ h.afterFunc(h.nativeHistogramMinResetDuration-h.now().Sub(h.lastResetTime), h.reset)
+ }
+
if h.maybeWidenZeroBucket(hotCounts, coldCounts) {
return
}
h.doubleBucketWidth(hotCounts, coldCounts)
}
-// maybeReset resets the whole histogram if at least h.nativeHistogramMinResetDuration
-// has been passed. It returns true if the histogram has been reset. The caller
-// must have locked h.mtx.
+// maybeReset resets the whole histogram if at least
+// h.nativeHistogramMinResetDuration has been passed. It returns true if the
+// histogram has been reset. The caller must have locked h.mtx.
func (h *histogram) maybeReset(
hot, cold *histogramCounts, coldIdx uint64, value float64, bucket int,
) bool {
// We are using the possibly mocked h.now() rather than
// time.Since(h.lastResetTime) to enable testing.
- if h.nativeHistogramMinResetDuration == 0 ||
+ if h.nativeHistogramMinResetDuration == 0 || // No reset configured.
+ h.resetScheduled || // Do not interefere if a reset is already scheduled.
h.now().Sub(h.lastResetTime) < h.nativeHistogramMinResetDuration {
return false
}
@@ -906,6 +929,29 @@ func (h *histogram) maybeReset(
return true
}
+// reset resets the whole histogram. It locks h.mtx itself, i.e. it has to be
+// called without having locked h.mtx.
+func (h *histogram) reset() {
+ h.mtx.Lock()
+ defer h.mtx.Unlock()
+
+ n := atomic.LoadUint64(&h.countAndHotIdx)
+ hotIdx := n >> 63
+ coldIdx := (^n) >> 63
+ hot := h.counts[hotIdx]
+ cold := h.counts[coldIdx]
+ // Completely reset coldCounts.
+ h.resetCounts(cold)
+ // Make coldCounts the new hot counts while resetting countAndHotIdx.
+ n = atomic.SwapUint64(&h.countAndHotIdx, coldIdx<<63)
+ count := n & ((1 << 63) - 1)
+ waitForCooldown(count, hot)
+ // Finally, reset the formerly hot counts, too.
+ h.resetCounts(hot)
+ h.lastResetTime = h.now()
+ h.resetScheduled = false
+}
+
// maybeWidenZeroBucket widens the zero bucket until it includes the existing
// buckets closest to the zero bucket (which could be two, if an equidistant
// negative and a positive bucket exists, but usually it's only one bucket to be
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/labels.go b/vendor/github.com/prometheus/client_golang/prometheus/labels.go
index b3c4eca2bc..c21911f292 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/labels.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/labels.go
@@ -165,6 +165,8 @@ func validateValuesInLabels(labels Labels, expectedNumberOfValues int) error {
func validateLabelValues(vals []string, expectedNumberOfValues int) error {
if len(vals) != expectedNumberOfValues {
+ // The call below makes vals escape, copy them to avoid that.
+ vals := append([]string(nil), vals...)
return fmt.Errorf(
"%w: expected %d label values but got %d in %#v",
errInconsistentCardinality, expectedNumberOfValues,
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go
index c0152cdb61..8c1136ceea 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go
@@ -11,8 +11,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-//go:build !windows && !js
-// +build !windows,!js
+//go:build !windows && !js && !wasip1
+// +build !windows,!js,!wasip1
package prometheus
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_wasip1.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_wasip1.go
new file mode 100644
index 0000000000..d8d9a6d7a2
--- /dev/null
+++ b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_wasip1.go
@@ -0,0 +1,26 @@
+// Copyright 2023 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//go:build wasip1
+// +build wasip1
+
+package prometheus
+
+func canCollectProcess() bool {
+ return false
+}
+
+func (*processCollector) processCollect(chan<- Metric) {
+ // noop on this platform
+ return
+}
diff --git a/vendor/github.com/ucwong/golang-kv/nutsdb/nutsdb.go b/vendor/github.com/ucwong/golang-kv/nutsdb/nutsdb.go
index afc167f5dd..30e0b4ef94 100644
--- a/vendor/github.com/ucwong/golang-kv/nutsdb/nutsdb.go
+++ b/vendor/github.com/ucwong/golang-kv/nutsdb/nutsdb.go
@@ -103,7 +103,7 @@ func (b *NutsDB) Prefix(prefix []byte) (res [][]byte) {
func (b *NutsDB) Suffix(suffix []byte) (res [][]byte) {
b.engine.View(func(tx *nutsdb.Tx) error {
- entries, err := tx.GetAll(GLOBAL)
+ _, entries, err := tx.GetAll(GLOBAL)
if err != nil {
return err
}
@@ -122,7 +122,7 @@ func (b *NutsDB) Suffix(suffix []byte) (res [][]byte) {
func (b *NutsDB) Scan() (res [][]byte) {
b.engine.View(func(tx *nutsdb.Tx) error {
- entries, err := tx.GetAll(GLOBAL)
+ _, entries, err := tx.GetAll(GLOBAL)
if err != nil {
return err
}
diff --git a/vendor/github.com/urfave/cli/v2/.golangci.yaml b/vendor/github.com/urfave/cli/v2/.golangci.yaml
new file mode 100644
index 0000000000..89b6e86615
--- /dev/null
+++ b/vendor/github.com/urfave/cli/v2/.golangci.yaml
@@ -0,0 +1,4 @@
+# https://golangci-lint.run/usage/configuration/
+linters:
+ enable:
+ - misspell
diff --git a/vendor/github.com/urfave/cli/v2/app.go b/vendor/github.com/urfave/cli/v2/app.go
index f69a1939b1..741163a744 100644
--- a/vendor/github.com/urfave/cli/v2/app.go
+++ b/vendor/github.com/urfave/cli/v2/app.go
@@ -39,6 +39,8 @@ type App struct {
Usage string
// Text to override the USAGE section of help
UsageText string
+ // Whether this command supports arguments
+ Args bool
// Description of the program argument format.
ArgsUsage string
// Version of the program
diff --git a/vendor/github.com/urfave/cli/v2/command.go b/vendor/github.com/urfave/cli/v2/command.go
index c318da989b..c20a571ee7 100644
--- a/vendor/github.com/urfave/cli/v2/command.go
+++ b/vendor/github.com/urfave/cli/v2/command.go
@@ -20,6 +20,8 @@ type Command struct {
UsageText string
// A longer explanation of how the command works
Description string
+ // Whether this command supports arguments
+ Args bool
// A short description of the arguments of this command
ArgsUsage string
// The category the command is part of
diff --git a/vendor/github.com/urfave/cli/v2/context.go b/vendor/github.com/urfave/cli/v2/context.go
index a45c120b55..8dd4765211 100644
--- a/vendor/github.com/urfave/cli/v2/context.go
+++ b/vendor/github.com/urfave/cli/v2/context.go
@@ -144,7 +144,7 @@ func (cCtx *Context) Lineage() []*Context {
return lineage
}
-// Count returns the num of occurences of this flag
+// Count returns the num of occurrences of this flag
func (cCtx *Context) Count(name string) int {
if fs := cCtx.lookupFlagSet(name); fs != nil {
if cf, ok := fs.Lookup(name).Value.(Countable); ok {
diff --git a/vendor/github.com/urfave/cli/v2/flag_uint64_slice.go b/vendor/github.com/urfave/cli/v2/flag_uint64_slice.go
index e845dd5257..d342018686 100644
--- a/vendor/github.com/urfave/cli/v2/flag_uint64_slice.go
+++ b/vendor/github.com/urfave/cli/v2/flag_uint64_slice.go
@@ -190,6 +190,15 @@ func (f *Uint64SliceFlag) Get(ctx *Context) []uint64 {
return ctx.Uint64Slice(f.Name)
}
+// RunAction executes flag action if set
+func (f *Uint64SliceFlag) RunAction(c *Context) error {
+ if f.Action != nil {
+ return f.Action(c, c.Uint64Slice(f.Name))
+ }
+
+ return nil
+}
+
// Uint64Slice looks up the value of a local Uint64SliceFlag, returns
// nil if not found
func (cCtx *Context) Uint64Slice(name string) []uint64 {
diff --git a/vendor/github.com/urfave/cli/v2/flag_uint_slice.go b/vendor/github.com/urfave/cli/v2/flag_uint_slice.go
index d2aed480d9..4dc13e126a 100644
--- a/vendor/github.com/urfave/cli/v2/flag_uint_slice.go
+++ b/vendor/github.com/urfave/cli/v2/flag_uint_slice.go
@@ -201,6 +201,15 @@ func (f *UintSliceFlag) Get(ctx *Context) []uint {
return ctx.UintSlice(f.Name)
}
+// RunAction executes flag action if set
+func (f *UintSliceFlag) RunAction(c *Context) error {
+ if f.Action != nil {
+ return f.Action(c, c.UintSlice(f.Name))
+ }
+
+ return nil
+}
+
// UintSlice looks up the value of a local UintSliceFlag, returns
// nil if not found
func (cCtx *Context) UintSlice(name string) []uint {
diff --git a/vendor/github.com/urfave/cli/v2/godoc-current.txt b/vendor/github.com/urfave/cli/v2/godoc-current.txt
index 6016bd82e7..e87b13a66c 100644
--- a/vendor/github.com/urfave/cli/v2/godoc-current.txt
+++ b/vendor/github.com/urfave/cli/v2/godoc-current.txt
@@ -35,7 +35,7 @@ var AppHelpTemplate = `NAME:
{{template "helpNameTemplate" .}}
USAGE:
- {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
+ {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}}[arguments...]{{end}}{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
VERSION:
{{.Version}}{{end}}{{end}}{{if .Description}}
@@ -136,7 +136,7 @@ var SubcommandHelpTemplate = `NAME:
{{template "helpNameTemplate" .}}
USAGE:
- {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}
+ {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}}[arguments...]{{end}}{{end}}{{end}}{{if .Description}}
DESCRIPTION:
{{template "descriptionTemplate" .}}{{end}}{{if .VisibleCommands}}
@@ -253,6 +253,8 @@ type App struct {
Usage string
// Text to override the USAGE section of help
UsageText string
+ // Whether this command supports arguments
+ Args bool
// Description of the program argument format.
ArgsUsage string
// Version of the program
@@ -523,6 +525,8 @@ type Command struct {
UsageText string
// A longer explanation of how the command works
Description string
+ // Whether this command supports arguments
+ Args bool
// A short description of the arguments of this command
ArgsUsage string
// The category the command is part of
@@ -649,7 +653,7 @@ func (cCtx *Context) Bool(name string) bool
Bool looks up the value of a local BoolFlag, returns false if not found
func (cCtx *Context) Count(name string) int
- Count returns the num of occurences of this flag
+ Count returns the num of occurrences of this flag
func (cCtx *Context) Duration(name string) time.Duration
Duration looks up the value of a local DurationFlag, returns 0 if not found
@@ -2142,6 +2146,9 @@ func (f *Uint64SliceFlag) IsVisible() bool
func (f *Uint64SliceFlag) Names() []string
Names returns the names of the flag
+func (f *Uint64SliceFlag) RunAction(c *Context) error
+ RunAction executes flag action if set
+
func (f *Uint64SliceFlag) String() string
String returns a readable representation of this value (for usage defaults)
@@ -2307,6 +2314,9 @@ func (f *UintSliceFlag) IsVisible() bool
func (f *UintSliceFlag) Names() []string
Names returns the names of the flag
+func (f *UintSliceFlag) RunAction(c *Context) error
+ RunAction executes flag action if set
+
func (f *UintSliceFlag) String() string
String returns a readable representation of this value (for usage defaults)
diff --git a/vendor/github.com/urfave/cli/v2/template.go b/vendor/github.com/urfave/cli/v2/template.go
index da98890ebb..daad470022 100644
--- a/vendor/github.com/urfave/cli/v2/template.go
+++ b/vendor/github.com/urfave/cli/v2/template.go
@@ -1,7 +1,7 @@
package cli
var helpNameTemplate = `{{$v := offset .HelpName 6}}{{wrap .HelpName 3}}{{if .Usage}} - {{wrap .Usage $v}}{{end}}`
-var usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}`
+var usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}}[arguments...]{{end}}[arguments...]{{end}}{{end}}`
var descriptionTemplate = `{{wrap .Description 3}}`
var authorsTemplate = `{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
{{range $index, $author := .Authors}}{{if $index}}
@@ -35,7 +35,7 @@ var AppHelpTemplate = `NAME:
{{template "helpNameTemplate" .}}
USAGE:
- {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
+ {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}}[arguments...]{{end}}{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
VERSION:
{{.Version}}{{end}}{{end}}{{if .Description}}
@@ -83,7 +83,7 @@ var SubcommandHelpTemplate = `NAME:
{{template "helpNameTemplate" .}}
USAGE:
- {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}
+ {{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}}[arguments...]{{end}}{{end}}{{end}}{{if .Description}}
DESCRIPTION:
{{template "descriptionTemplate" .}}{{end}}{{if .VisibleCommands}}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b1472d43db..46b213ceab 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -58,7 +58,7 @@ github.com/CortexFoundation/robot/backend
# github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66
## explicit; go 1.16
github.com/CortexFoundation/statik
-# github.com/CortexFoundation/torrentfs v1.0.57-0.20231226110207-0dcdbe74690d
+# github.com/CortexFoundation/torrentfs v1.0.57
## explicit; go 1.21
github.com/CortexFoundation/torrentfs
github.com/CortexFoundation/torrentfs/backend
@@ -320,7 +320,7 @@ github.com/benbjohnson/immutable
# github.com/beorn7/perks v1.0.1
## explicit; go 1.11
github.com/beorn7/perks/quantile
-# github.com/bits-and-blooms/bitset v1.12.0
+# github.com/bits-and-blooms/bitset v1.13.0
## explicit; go 1.16
github.com/bits-and-blooms/bitset
# github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8
@@ -464,7 +464,7 @@ github.com/crate-crypto/go-kzg-4844/internal/utils
# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
## explicit
github.com/davecgh/go-spew/spew
-# github.com/deckarep/golang-set/v2 v2.5.0
+# github.com/deckarep/golang-set/v2 v2.6.0
## explicit; go 1.18
github.com/deckarep/golang-set/v2
# github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
@@ -564,7 +564,7 @@ github.com/go-logr/stdr
## explicit; go 1.12
github.com/go-ole/go-ole
github.com/go-ole/go-ole/oleutil
-# github.com/go-resty/resty/v2 v2.10.0
+# github.com/go-resty/resty/v2 v2.11.0
## explicit; go 1.16
github.com/go-resty/resty/v2
# github.com/go-sourcemap/sourcemap v2.1.3+incompatible
@@ -619,7 +619,7 @@ github.com/google/go-querystring/query
## explicit; go 1.12
github.com/google/gofuzz
github.com/google/gofuzz/bytesource
-# github.com/google/pprof v0.0.0-20231212022811-ec68065c825e
+# github.com/google/pprof v0.0.0-20231229022155-5aaadb5f27d9
## explicit; go 1.19
github.com/google/pprof/profile
# github.com/google/uuid v1.5.0
@@ -786,7 +786,7 @@ github.com/naoina/go-stringutil
## explicit
github.com/naoina/toml
github.com/naoina/toml/ast
-# github.com/nutsdb/nutsdb v1.0.3-0.20231226101940-cfd8c3bba692
+# github.com/nutsdb/nutsdb v1.0.3
## explicit; go 1.18
github.com/nutsdb/nutsdb
# github.com/nxadm/tail v1.4.11
@@ -905,7 +905,7 @@ github.com/pkg/errors
# github.com/pmezard/go-difflib v1.0.0
## explicit
github.com/pmezard/go-difflib/difflib
-# github.com/prometheus/client_golang v1.17.0
+# github.com/prometheus/client_golang v1.18.0
## explicit; go 1.19
github.com/prometheus/client_golang/prometheus
github.com/prometheus/client_golang/prometheus/internal
@@ -999,7 +999,7 @@ github.com/ucwong/filecache
# github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb
## explicit; go 1.19
github.com/ucwong/go-ttlmap
-# github.com/ucwong/golang-kv v1.0.24-0.20231226105423-b6530d5b2b9f
+# github.com/ucwong/golang-kv v1.0.24-0.20231227101232-3f231e2de6c0
## explicit; go 1.21
github.com/ucwong/golang-kv
github.com/ucwong/golang-kv/badger
@@ -1011,7 +1011,7 @@ github.com/ucwong/golang-kv/pebble
# github.com/ucwong/shard v1.0.1-0.20231225143310-3022d14f9c3e
## explicit; go 1.20
github.com/ucwong/shard
-# github.com/urfave/cli/v2 v2.26.0
+# github.com/urfave/cli/v2 v2.27.0
## explicit; go 1.18
github.com/urfave/cli/v2
# github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e