Skip to content

Commit

Permalink
Merge pull request #65 from Leon1777/master
Browse files Browse the repository at this point in the history
[Fix] Batch upstream merge
  • Loading branch information
lemois-1337 authored Sep 19, 2024
2 parents 2ace100 + 07c174d commit 7cca4f4
Show file tree
Hide file tree
Showing 24 changed files with 632 additions and 242 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.23.1

- name: Update sources
if: matrix.TARGET == 'linux/aarch64' || matrix.TARGET == 'windows/x64'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
swap-size-gb: 12

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.23.1

- name: Test
shell: bash
Expand All @@ -59,9 +59,9 @@ jobs:
swap-size-gb: 12

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.23.1

- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -91,9 +91,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.23.1

- name: Delete the stability tests from coverage
run: rm -r stability-tests
Expand Down
3 changes: 2 additions & 1 deletion app/rpc/rpchandlers/submit_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ func HandleSubmitTransaction(context *rpccontext.Context, _ *router.Router, requ
}

log.Debugf("Rejected transaction %s: %s", transactionID, err)
errorMessage := &appmessage.SubmitTransactionResponseMessage{}
// Return the ID also in the case of error, so that clients can match the response to the correct transaction submit request
errorMessage := appmessage.NewSubmitTransactionResponseMessage(transactionID.String())
errorMessage.Error = appmessage.RPCErrorf("Rejected transaction %s: %s", transactionID, err)
return errorMessage, nil
}
Expand Down
52 changes: 52 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
Karlsend v2.2.1 - 2024-09-19
============================

* Wallet-related improvements and fixes

Karlsend v2.2.0 - 2024-09-03
============================

* Critical bug fix for difficulty adjustment after hardfork block

* Adjust difficulty managment between rusty and golang nodes during the first block window
* fix for integration test diff manager signature
* difficulty adjustment window fix
* Hardfork in devnet and simnet after the difficulty adjustment window
* Fix simnet pruning test

Karlsend v2.1.0 - 2024-08-29
============================

* Fishhash plus implementation with hard fork procedure
* hard fork procedure from `khashv1` to `khashv2`
* HF procedure with diff adjustment
* Mainnet HFDAAScore set to 26962009 to switch to `khashv2`

* First `fishhash` tests
* refresh seeder url
* add minor version
* fix logging
* Fix issue on word32 usage in kernel mixing step
* Fix the dataset and light cache generation
* Code cleanup and dag generation correct logging
* Added lock on mainnet connection
* Remove blocking tests on block version because node contains both algorithm
* fix critical bug in matrix generation
* align with rusty block version test
* Removed periodic race detection workflow
* Added `HFDAAScore` to `simnet` to pass tests
* Fixed pruning_test in `simnet` and `devnet` genesis from Rust node
* Fixed remaining integration tests and Go modules update
* Use 4-char abbreviation as rest of KLS logging system (POW->POWK)
* Increase windows runner pagefile to 32gb
* Remove Go cache in test workflow due to its constant failures
* Increase code coverage timeout to 120m due to `khashv2`
* Increase timeout in integration tests and sequential execution
* Fixed `BlockVersionKHashV2` in debug output and removed linebreak
* Moving `khashv2` pre-computed dag file during stability tests
* Give orphans stability test more time to process blocks
* Increase Linux swapfile size in GitHub runner to avoid OOM
* Increase swap size for code coverage to support `khashv2`
* Version bump to 2.1.0 for `khashv2`
* Updated README.md and added `khashv2` paragraph

Karlsend v1.2.0 - 2024-03-07
============================

Expand Down
20 changes: 18 additions & 2 deletions cmd/karlsenwallet/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const (
newAddressSubCmd = "new-address"
dumpUnencryptedDataSubCmd = "dump-unencrypted-data"
startDaemonSubCmd = "start-daemon"
versionSubCmd = "version"
getDaemonVersionSubCmd = "get-daemon-version"
)

const (
Expand All @@ -30,6 +32,7 @@ const (
)

type configFlags struct {
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`
config.NetworkFlags
}

Expand Down Expand Up @@ -57,9 +60,9 @@ type sendConfig struct {
Password string `long:"password" short:"p" description:"Wallet password"`
DaemonAddress string `long:"daemonaddress" short:"d" description:"Wallet daemon server to connect to"`
ToAddress string `long:"to-address" short:"t" description:"The public address to send Karlsen to" required:"true"`
FromAddresses []string `long:"from-address" short:"a" description:"Specific public address to send Karlsen from. Use multiple times to accept several addresses" required:"false"`
FromAddresses []string `long:"from-address" short:"a" description:"Specific public address to send Karlsen from. Repeat multiple times (adding -a before each) to accept several addresses" required:"false"`
SendAmount string `long:"send-amount" short:"v" description:"An amount to send in Karlsen (e.g. 1234.12345678)"`
IsSendAll bool `long:"send-all" description:"Send all the Karlsen in the wallet (mutually exclusive with --send-amount)"`
IsSendAll bool `long:"send-all" description:"Send all the Karlsen in the wallet (mutually exclusive with --send-amount). If --from-address was used, will send all only from the specified addresses."`
UseExistingChangeAddress bool `long:"use-existing-change-address" short:"u" description:"Will use an existing change address (in case no change address was ever used, it will use a new one)"`
Verbose bool `long:"show-serialized" short:"s" description:"Show a list of hex encoded sent transactions"`
config.NetworkFlags
Expand Down Expand Up @@ -130,6 +133,13 @@ type dumpUnencryptedDataConfig struct {
config.NetworkFlags
}

type versionConfig struct {
}

type getDaemonVersionConfig struct {
DaemonAddress string `long:"daemonaddress" short:"d" description:"Wallet daemon server to connect to"`
}

func parseCommandLine() (subCommand string, config interface{}) {
cfg := &configFlags{}
parser := flags.NewParser(cfg, flags.PrintErrors|flags.HelpFlag)
Expand Down Expand Up @@ -186,6 +196,9 @@ func parseCommandLine() (subCommand string, config interface{}) {
Listen: defaultListen,
}
parser.AddCommand(startDaemonSubCmd, "Start the wallet daemon", "Start the wallet daemon", startDaemonConf)
parser.AddCommand(versionSubCmd, "Get the wallet version", "Get the wallet version", &versionConfig{})
getDaemonVersionConf := &getDaemonVersionConfig{DaemonAddress: defaultListen}
parser.AddCommand(getDaemonVersionSubCmd, "Get the wallet daemon version", "Get the wallet daemon version", getDaemonVersionConf)

_, err := parser.Parse()
if err != nil {
Expand Down Expand Up @@ -291,6 +304,9 @@ func parseCommandLine() (subCommand string, config interface{}) {
printErrorAndExit(err)
}
config = startDaemonConf
case versionSubCmd:
case getDaemonVersionSubCmd:
config = getDaemonVersionConf
}

return parser.Command.Active.Name, config
Expand Down
Loading

0 comments on commit 7cca4f4

Please sign in to comment.