Commit graph

400 commits

Author SHA1 Message Date
Daniel Liu
801e92b56d
XDCx, consensus: fix some typos (#1173) 2025-07-02 14:12:11 +08:00
JukLee0ira
c0315121b4
all: replace fmt.Errorf() with errors.New() if no param required #29126 (#1175) 2025-07-01 17:46:50 +08:00
wgr523
4ec4a5390f
Consecutive penalty upgrade (#1053)
* feat: penalty upgrade, consecutive epochs penalty
can be unpenalized

* feat: use binary search inside penalty hook

* style: modification on style

* feat: in penaltyHook change startRange

* fix: add lastPenalty condition in HookPenalty V2
2025-06-25 01:12:56 -07:00
Wanwiset Peerapatanapokin
4142debefc
Merge pull request #1104 from XinFinOrg/fix-getrewardbyaccount-edgecase
fix: getrewardbyaccount api edge case
2025-06-17 11:29:08 +04:00
Wanwiset Peerapatanapokin
aa84249c0d
simplify code 2025-06-16 13:53:34 +04:00
wgr523
e13265a7d7
record total minted into smart contract (#1026)
* feat: record total minted into smart contract

* feat: GetCurrentTotalMinted API
2025-06-16 02:31:33 -07:00
wanwiset25
796ee818e3 add condition to fix endIndex out of bounds 2025-06-11 18:37:02 +04:00
Wanwiset Peerapatanapokin
d21406c43e
Merge pull request #917 from XinFinOrg/update-reward-api
add new api XDPoS_getRewardByAccount
2025-05-07 15:29:32 +04:00
Wanwiset Peerapatanapokin
a9199d4140
Merge pull request #944 from nghiangovan/dev-upgrade
add-epoch-number-for-XDPoS_getMasternodesByNumber
2025-05-07 15:28:59 +04:00
wanwiset25
576bdfff79 change method and handle case with no reward 2025-05-05 18:09:29 +04:00
Daniel Liu
94b3ca1eeb
all: remove version field #25096 (#970) 2025-04-24 18:55:15 +08:00
Daniel Liu
4fb622bfd0
all: remove public field from rpc.API #25059 (#969) 2025-04-24 18:53:59 +08:00
wanwiset25
8ca51b6ee4 - compare both hash and block num from reward filename to blockchain state
- complete error handling
2025-04-24 13:42:35 +04:00
wanwiset25
4fc208b527 rename variables and optimize code 2025-04-24 13:42:35 +04:00
wanwiset25
65e3a5534a change approach to epochnumber search
add total rewards in response
2025-04-24 13:42:35 +04:00
wanwiset25
52f03dd9dc add new api XDPoS_getRewardByAccount 2025-04-24 13:42:35 +04:00
wgr523
6a38aa00aa
Reward float upgrade (#940)
* feat: use float type reward

* feat: add test of float reward
2025-04-16 02:03:41 -07:00
Anonymous
47c0382e2d add-epoch-number-for-XDPoS_getMasternodesByNumber 2025-04-15 22:21:07 +07:00
Wanwiset Peerapatanapokin
9a00e475b4
Merge pull request #930 from XinFinOrg/add-api-limit
consensus/XDPoS: add limit to high resource demand api
2025-04-08 15:31:50 +04:00
Daniel Liu
5b8c267122 trie: use trie.NewStackTrie instead of new(trie.Trie) (#22246) 2025-04-07 16:44:32 +08:00
Daniel Liu
a4c7d7f458 all: clean duplicate constants in package common 2025-04-07 16:43:01 +08:00
wanwiset25
f3a2577a76 simplify code 2025-04-04 09:56:41 +04:00
wanwiset25
229caf0125 add limit to high resource demand api 2025-03-31 06:00:27 +04:00
benjamin202410
b8a9a8bfb1
Merge pull request #924 from XinFinOrg/update-reward-percapita
Update reward percapita
2025-03-28 23:52:33 -07:00
Daniel Liu
c73a0aa929 core/state: fix state iterator (#19127) 2025-03-28 22:34:59 +08:00
Gerui Wang
6bac06b1e7 feat: fixed reward per node (per capita) 2025-03-25 22:33:49 +08:00
Gerui Wang
84ae914350 feat: add TIPEpochHalving, better style 2025-03-25 22:16:35 +08:00
Daniel Liu
a9b9f53701 core, eth, trie: add a prefix to contract code (21080) 2025-03-24 22:31:03 +08:00
wgr523
c36e4d54c0
Upgrade reward 2.0 (#865)
* refactor: reward hook gets prepared for upgrade

* feat: new reward hook, config change, unit tests

* add missing code

* feat: filter penalty in reward. add unit test

* update constant and config

---------

Co-authored-by: liam.lai <liam.lai@us>
2025-03-02 02:44:34 -08:00
JukLee0ira
51dac59e92 common: change type of variables for constants 2025-02-17 11:38:16 +08:00
Daniel Liu
cfc8cca674 common: refactor constants 2025-02-17 09:13:40 +08:00
JukLee0ira
d6b136ed7c
consensus, internal, contracts: remove extra hash and string conversions (#830)
* consensus, internal: remove extra hash conversions

* contracts: remove extra string conversions
2025-02-07 13:59:07 +08:00
Daniel Liu
4bbcd988b2 params: remove EIP150Hash from chainconfig (#27087) 2025-02-05 18:16:17 +08:00
Daniel Liu
b6f3007af1 core: move genesis alloc types to core/types (#29003) 2025-01-24 16:54:12 +08:00
Daniel Liu
4e951ed8fe all: use github.com/deckarep/golang-set/v2 (generic set) (#26159) 2025-01-24 16:54:11 +08:00
Daniel Liu
5b10b2441c all: use T.TempDir to create temporary test directories (#24633) 2025-01-24 16:54:08 +08:00
Daniel Liu
6d17a42edb all: replace t.Log(); t.FailNow() with t.Fatal() (#19849) 2025-01-24 16:18:29 +08:00
Daniel Liu
f542e463d3 accounts: implement simple checkpoint syncing (#19543) 2025-01-24 16:18:29 +08:00
Daniel Liu
97c50f97bb all: add read-only option to database 2025-01-24 14:24:39 +08:00
wgr523
537dc5e6fb
Exp timeout (#764)
* feat: write duration calculation in countdown as
interface. add more inputs as function argument

* feat: ExpTimeoutDuration

* fix: three dots usage

* feat: refine exp duration

* feat: add exp timeout config and use it in countdown

* feat: remove const countdown

* feat: remove use of interface in countdown, use error

* fix: countdown reset timer problem

* fix: add default ExpTimeoutConfig for config
2025-01-19 23:04:03 +08:00
wanwiset25
44ac46f676 add local xdpos function
add readme

changes to support xdpos2 protocol from block 0
2025-01-01 22:06:09 -05:00
benjamin202410
f8decab061
code refactor for performance (#782)
Co-authored-by: liam.lai <liam.lai@us>
2024-12-29 21:47:14 -08:00
benjamin202410
3e62a4c611
Merge pull request #778 from XinFinOrg/release-br-v2.4.6-beta1-dev-upgrade
Release br v2.4.6 beta1 merge back to dev upgrade
2024-12-27 20:07:41 -08:00
Daniel Liu
6e33633d28 common: drop BigMin and BigMax, they pollute our dep graph (#30645) 2024-12-28 09:06:31 +08:00
Péter Szilágyi
39e9d8f94d common/prque: generic priority queue (#26290) 2024-12-28 09:06:31 +08:00
Daniel Liu
28739d7863 common: remove usage of deprecated function (#21610) 2024-12-28 09:06:30 +08:00
liam.lai
77f9cc59ec merge from dev-upgrade 2024-12-27 10:03:54 -08:00
benjamin202410
c8aae5e537
Get right tc epoch (#773)
* get right tc epoch

* fix debug message

* merge test

* merge test

---------

Co-authored-by: liam.lai <liam.lai@us>
2024-12-24 01:53:40 -08:00
benjamin202410
332380c889
fix only timeout round exists in next epoch (#772)
* fix only timeout round exists in next epoch

* bump version

---------

Co-authored-by: liam.lai <liam.lai@us>
2024-12-23 23:09:45 -08:00
liam.lai
00785b096f fix tc cross epoch different masternode counts issue 2024-12-22 19:34:09 -08:00