Skip to content

Commit

Permalink
Implement LIP 4
Browse files Browse the repository at this point in the history
  • Loading branch information
litecreator committed May 19, 2021
1 parent 282d875 commit fc1e83b
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 1,226 deletions.
1,084 changes: 0 additions & 1,084 deletions hs_err_pid25550.log

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,13 @@ private DynamicPropertiesStore(@Value("properties") String dbName) {
try {
this.getAssetIssueFee();
} catch (IllegalArgumentException e) {
this.saveAssetIssueFee(1024000000L);
this.saveAssetIssueFee(1024000000000L);
}

try {
this.getExchangeCreateFee();
} catch (IllegalArgumentException e) {
this.saveExchangeCreateFee(1024000000L);
this.saveExchangeCreateFee(1024000000000L);
}

try {
Expand Down
150 changes: 15 additions & 135 deletions src/main/resources/config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ node {
isOpenFullTcpDisconnect = true

p2p {
version = 11111 # 11111: mainnet; 20180622: testnet
version = 1 # 1: mainnet; 100: testnet
}

active = [
Expand Down Expand Up @@ -191,163 +191,43 @@ genesis.block = {
{
accountName = "Zion"
accountType = "AssetIssue"
address = "LUHGJPjFgAWREYcYbZDFdEd2VZWadyAqU5"
address = "LhkLyDg2hWsFRF7Eh3KoAoo7dy5VAgknM2"
balance = "99000000000000000"
},
{
accountName = "Sun"
accountType = "AssetIssue"
address = "Ld6N2T6mBtFACE5NrHcw5oLhenA46ut9Ea"
address = "LgkN5Q85aZWbej22B2nmH6UHvFDKvBpAhc"
balance = "0"
},
{
accountName = "Blackhole"
accountType = "AssetIssue"
address = "LKeEpV3REF646CzpUsWj9UkLh9RdzZVdTT"
address = "LetuHVRUTGwtaKXZUzaSkwrcm7sYCtbxuD"
balance = "-9223372036854775808"
}
]

witnesses = [
{
address: LXMScPHkM7o4VEzqF4sSyoGi6zj4CjyiUD,
url = "https://one.le.litetokens.org",
voteCount = 100000026
address: "LMVTsSroKEx6RJuqPm9EBFASuCS5D6TXTU",
url = "https://envoy.litetokens.org",
voteCount = 700000000
},
{
address: LZPecXnRzcZc7wXJokvo3cZ8RJsU6c9vn3,
url = "https://two.le.litetokens.org",
voteCount = 100000025
address: "LMVujiRhZ2G7wmpuJE1UQrshjxYsL7CujU",
url = "https://envoy.vapory.org",
voteCount = 200000000
},
{
address: LMP4ttThSEg5h4aBGoMoCAogm1M2TxLo4r,
url = "https://three.le.litetokens.org",
voteCount = 100000024
},
{
address: LM6rrFtHJqRDqMR8LKUSwJiX1nPkFfrDx9,
url = "https://four.le.litetokens.org",
voteCount = 100000023
},
{
address: LbunAHd9Ky46Cb1uWituzseb4Smkyqkzqu,
url = "https://five.le.litetokens.org",
voteCount = 100000022
},
{
address: Lbvri7YGv5ZkGUKFvCjkQfWwTxShjT3iSP,
url = "https://six.le.litetokens.org",
voteCount = 100000021
},
{
address: LQWgwB3oLxjJj4oFHQ8YZWfAfHq5esVteL,
url = "https://seven.le.litetokens.org",
voteCount = 100000020
address: "LeBqMPPTzGCH3Xiq9LqRg6piGFsDFtJs5a",
url = "https://envoy.xdv.io",
voteCount = 100000000
}
#{
# address: LTgnaAqcLMvDxRygci92Qi1Ste65ykJbAY,
# url = "https://eight.sr.litetokens.org",
# voteCount = 100000019
#},
#{
# address: LdENa1zSegvxZhftMrxqte7KFuVHsBThV4,
# url = "https://nine.sr.litetokens.org",
# voteCount = 100000018
#},
#{
# address: LYA2RZFXc4J7PYgT42hG1PfSdrSM9kCZCo,
# url = "https://ten.sr.litetokens.org",
# voteCount = 100000017
#},
#{
# address: LcY47DmaCPUzj2YFzGbB4kbNLHRQESdvEp,
# url = "https://eleven.sr.litetokens.org",
# voteCount = 100000016
#},
#{
# address: LVCUjpJUBM312jGYAsN4m7uK1KJqUtHLNU,
# url = "https://twelve.sr.litetokens.org",
# voteCount = 100000015
#},
#{
# address: LY9ohchzL4widWtcqsp6AGDN5hhjHZe5f4,
# url = "https://thirteen.sr.litetokens.org",
# voteCount = 100000014
#},
#{
# address: Le8NhZedp6QuNtu77angXV1du4jYesqimn,
# url = "https://fourteen.sr.litetokens.org",
# voteCount = 100000013
#},
#{
# address: Lgs8X474Kb3MSif3HNbSgtq5Mg7PDzTbr6,
# url = "https://fifteen.sr.litetokens.org",
# voteCount = 100000012
#},
#{
# address: LgUP5ngRz1qcZH1dixC4ocDjH3vQTj3bH8,
# url = "https://sixteen.sr.litetokens.org",
# voteCount = 100000011
#},
#{
# address: LZdgf1sLKTprmbvommUU4L8VUszFecNa9o,
# url = "https://seventeen.sr.litetokens.org",
# voteCount = 100000010
#},
#{
# address: LZQ8kxj4JQxmDHLVjAkwVgWHbrTMZP29n2,
# url = "https://eightteen.sr.litetokens.org",
# voteCount = 100000009
#},
#{
# address: LfpT2CWX2VdxibCXJYK4i4iWZQjbM6z62r,
# url = "https://nineteen.sr.litetokens.org",
# voteCount = 100000008
#},
#{
# address: LKZfT5mdvg7NNdKcteNZK3sF9AGGTqc791,
# url = "https://twenty.sr.litetokens.org",
# voteCount = 100000007
#},
#{
# address: Lgk6U77Ftmhk9yTYXaWkwh99ERLMaZYAzL,
# url = "https://twentyone.sr.litetokens.org",
# voteCount = 100000006
#},
#{
# address: LMmQHhRbGLi5jRLbCiNiRjcd63DirweUbf,
# url = "https://twentytwo.sr.litetokens.org",
# voteCount = 100000005
#},
#{
# address: LgZNJKNxLGJnktKHu2G9Sm2JfqwaAPKDAZ,
# url = "https://twentythree.sr.litetokens.org",
# voteCount = 100000004
#},
#{
# address: LMH4z88XJrhi5DTKbDbqtFgLCbKXze7H95,
# url = "https://twentyfour.sr.litetokens.org",
# voteCount = 100000003
#},
#{
# address: LaG8jw5zEBVoXgPm32Zj9ZjeGfzZFSA6Kr,
# url = "https://twentyfive.sr.litetokens.org",
# voteCount = 100000002
#},
#{
# address: LNs3rPBqz1VjPZpRygu9VQiF4ruE7RYdi2,
# url = "https://twentysix.sr.litetokens.org",
# voteCount = 100000001
#},
#{
# address: LXCwo7SF9xTD9yv5yeR1PD3apo8XMr9axM,
# url = "https://twentyseven.sr.litetokens.org",
# voteCount = 100000000
#}
]

timestamp = "1545883189000" # Thu, 27 Dec 2018 03:59:49 GMT
parentHash = "0x0000000000000000f1fc15655669340793f47c9f541b419d7621112a07163ac6"
timestamp = "1620400001000" # Fri, 07 May 2021 15:06:41 GMT
parentHash = "0x0000000000000000000000000000000000004c697465746f6b656e7320584c54"
}

localwitness = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void testGetChainParameters() {
defaultCommitteeMap.put("ACCOUNT_UPGRADE_COST",9999000000L);
defaultCommitteeMap.put("CREATE_ACCOUNT_FEE",100000L);
defaultCommitteeMap.put("TRANSACTION_FEE",10L);
defaultCommitteeMap.put("ASSET_ISSUE_FEE",1024000000L);
defaultCommitteeMap.put("ASSET_ISSUE_FEE",1024000000000L);
defaultCommitteeMap.put("WITNESS_PAY_PER_BLOCK",32000000L);
defaultCommitteeMap.put("WITNESS_STANDBY_ALLOWANCE",115200000000L);
defaultCommitteeMap.put("CREATE_NEW_ACCOUNT_FEE_IN_SYSTEM_CONTRACT",0L);
Expand All @@ -206,7 +206,7 @@ public void testGetChainParameters() {
Assert.assertTrue(getChainParameters.get()
.getChainParameter(1).getValue() == 9999000000L);
Assert.assertTrue(getChainParameters.get().getChainParameter(4)
.getValue() == 1024000000L);
.getValue() == 1024000000000L);
Assert.assertTrue(getChainParameters.get().getChainParameter(7).getValue() == 0);
Assert.assertTrue(getChainParameters.get().getChainParameter(8).getValue() == 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ public void test1CreateUsedAsset() {
PublicMethed.printAddress(exchange001Key);
PublicMethed.printAddress(secondExchange001Key);

Assert.assertTrue(PublicMethed.sendcoin(exchange001Address, 10240000000L, fromAddress,
Assert.assertTrue(PublicMethed.sendcoin(exchange001Address, 10240000000000L, fromAddress,
testKey002, blockingStubFull));
Assert.assertTrue(PublicMethed.sendcoin(secondExchange001Address, 10240000000L, fromAddress,
Assert.assertTrue(PublicMethed.sendcoin(secondExchange001Address, 10240000000000L, fromAddress,
testKey002, blockingStubFull));

Long start = System.currentTimeMillis() + 5000L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public void testGetChainParameters() {
defaultCommitteeMap.put("ACCOUNT_UPGRADE_COST",9999000000L);
defaultCommitteeMap.put("CREATE_ACCOUNT_FEE",100000L);
defaultCommitteeMap.put("TRANSACTION_FEE",10L);
defaultCommitteeMap.put("ASSET_ISSUE_FEE",1024000000L);
defaultCommitteeMap.put("ASSET_ISSUE_FEE",1024000000000L);
defaultCommitteeMap.put("WITNESS_PAY_PER_BLOCK",32000000L);
defaultCommitteeMap.put("WITNESS_STANDBY_ALLOWANCE",115200000000L);
defaultCommitteeMap.put("CREATE_NEW_ACCOUNT_FEE_IN_SYSTEM_CONTRACT",0L);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit fc1e83b

Please sign in to comment.